• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Intercepting clicks on the toolbar widget
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: err_sys
  • Next by Date: Re: Cocoa downgrade from openstep?
  • Previous by thread: Intercepting clicks on the toolbar widget
  • Next by thread: NSUserDefaults
  • Index(es):
    • Date
    • Thread