Re: standardWindowButtons
Re: standardWindowButtons
On Fri, Jan 17, 2003 at 06:50:26PM -0800, Mark Eaton wrote:
>
So I'm using a borderless window, but I want the standard window
>
widgets, so I call [NSWindow standardWindowButton:forStyleMask:] and
>
add each type as a subview of a little grouper view.
>
>
All seems well, except that it appears that I need to mimic the
>
rollover behavior of the standard window widgets myself. I added a
>
tracking rect to the grouper view and pass mouseEntered: and
>
mouseExited: to the standard window buttons, to no effect (actually
>
this crashes due to a recursive mouseEntered: for some reason, but
>
fixing it yields no visible results). Calling highlight gives the
>
pressed state.
>
>
How should one configure these widgets in order to get the proper
>
rollover behavior?
I believe there's another widget perhaps underneath the standard
window buttons which controls this. If I remove one of the buttons
from a window which has them to begin with, if I hover the mouse over
the place where a button used to be, the remaining buttons gain color.
As far as I know there is no API for accessing this, but you might be
able to figure out what method/class is used by inspecting the view
hierarchy. (*plug* F-Script Anywhere's "Associate with Interface"
feature is very good for this :)
Of course, none of this would be necessary if Cocoa utility windows'
titlebars behaved sensibly like Carbon ones, hiding the minimize and
zoom buttons if they were not specified to leave more room for the
title, and becoming shorter if no title was specified. Why on earth
after two major releases of OS X do the Cocoa utility window titlebars
have a different font (such that the text isn't vertically centered
and looks bizarre) and appearance to the Carbon ones? Apparently it
doesn't annoy anyone else as it annoys me every time I see it... :/
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.