Re: Please point me in the right direction for contextual menus
Re: Please point me in the right direction for contextual menus
- Subject: Re: Please point me in the right direction for contextual menus
- From: Ondra Cada <email@hidden>
- Date: Fri, 31 Aug 2001 12:22:00 +0200
dougknowles,
>
>>>>> email@hidden (d) wrote at Thu, 30 Aug 2001 22:38:47 -0400:
d> I'd like to implement contextual menus on the contents of an
d> NSOutlineView; the contents of the menu (or at least the highlighted
d> state of the items in it) need to vary depending on which cell (i.e.,
d> item/column) is underneath the cursor when the menu is brought up.
d>
d> I've looked at adding a menu to my NSOutlineView, but it's not clear how
d> to tell where the cursor is when the menu is brought up; will event
d> notifications for the view tell me what I need to know?
I guess the NSView.html is what you want to study, focusing on
menuForEvent:. Subclassing NSOutlineView seems to be indicated.
Incidentally, cells don't have their own menus -- see eg. how NSMatrix does
that. You might check whether NSOutlineView does not have similar
functionality, but I guess not (I'm not that sure -- outline view being a
new, non-OpenStep class, I don't know it that well).
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc