Re: Intercepting clicks on the toolbar widget
Re: Intercepting clicks on the toolbar widget
- Subject: Re: Intercepting clicks on the toolbar widget
- From: Brian Webster <email@hidden>
- Date: Fri, 10 Aug 2001 15:55:24 -0500
On Friday, August 10, 2001, at 03:09 PM, Rick Roe wrote:
I'd like to override the default behavior that happens when the
user clicks the hide/show toolbar widget in the upper right hand
corner of the window. I've tried subclassing NSWindow and
overriding -toggleToolbarShown:, but it never gets called. This
must be doable, since OmniWeb seems to do it quite nicely. What
am I missing?
-toggleToolbarShown: is called by the standard Hide/Show
Toolbar menu item,
but clicking the widget doesn't call it. Instead, it calls a
private API on
NSWindow, which you'll have to subclass if you wish to customize the
hide/show behavior.
Is this what OmniWeb does?
Please exercise caution in extending this behaviour... I've
already seen too
many apps where they've added the standard toolbar widget in
order to toggle
the visibility of things that don't look at all like standard toolbars,
collapsing them to the side of the window instead of the top,
and other such
nonsense.
Well, I want to use a drawer to hold some controls for viewing
options, but my window consists of just an OpenGL view, so
there's not really any good place to put a button to open the
drawer. Maybe I'll have to resort to rendering some sort of
control in my OpenGL view to toggle the drawer, but that sounds
yucky.
--
Brian Webster
email@hidden
http://www.owlnet.rice.edu/~bwebster