FROM : Roland Torres
DATE : Tue Apr 03 22:28:51 2007
I have a 64x64 NSMatrix of NSCells. I've subclassed NSCell to capture
the -drawWithFrame:inView: invocations so I can change the color of
the cells that the user clicks on. This works great.
Now I need to color the cells by clicking and dragging the mouse over
them (not explicitly clicking on each one, just a downclick on the
first one, and an upclick on the last one), but I don't know how to
find out (from within NSCell's -drawWithFrame:inView: method) that
I'm in a mouse down state. The -mouseDownFlags method returns nonzero
only when the mouse is downclicked on the first cell, but the other
cells that get dragged over return 0.
Is there some way to know, when an NSCell's -drawWithFrame:inView:
method gets invoked, that it's in a mouseDown event?
Roland
DATE : Tue Apr 03 22:28:51 2007
I have a 64x64 NSMatrix of NSCells. I've subclassed NSCell to capture
the -drawWithFrame:inView: invocations so I can change the color of
the cells that the user clicks on. This works great.
Now I need to color the cells by clicking and dragging the mouse over
them (not explicitly clicking on each one, just a downclick on the
first one, and an upclick on the last one), but I don't know how to
find out (from within NSCell's -drawWithFrame:inView: method) that
I'm in a mouse down state. The -mouseDownFlags method returns nonzero
only when the mouse is downclicked on the first cell, but the other
cells that get dragged over return 0.
Is there some way to know, when an NSCell's -drawWithFrame:inView:
method gets invoked, that it's in a mouseDown event?
Roland
| Related mails | Author | Date |
|---|---|---|
| Roland Torres | Apr 3, 22:28 | |
| Andreas Mayer | Apr 4, 04:57 |






Cocoa mail archive

