Skip navigation.
 
mlrollovers with standardWindowButtons
FROM : Mark Eaton
DATE : Wed Jan 29 21:25:39 2003

Hi,

I apologize if this topic has been covered before, I did look through
the list archives first and didn't seen anything related.

I'm trying to use the buttons that are created using the
standardWindowButton API:

NSButton* standardCloseButton = [NSWindow
standardWindowButton:NSWindowCloseButton
                                                 forStyleMask:NSClosableWindowMask];

When I add this button to the view hierarchy of my window and set my
window as the target, they seem to perform as expected when clicked.
However, they don't handle mouse roll overs automatically.

The window that I'm adding them to actually has the
NSBorderlessWindowMask styleMask (which it seems is the only logical
window mask that you would even need to use these buttons with, since
standard window styles already have the window buttons -- maybe I'm
wrong).

Can anyone tell me how to use these things? The documentation is pretty
much nonexistant. class-dump doesn't reveal any obvious clues, and I'd
hate to ship an app that relied in info discovered that way anyways.
I'm hoping there is something basic that I'm missing (not being a 10
year appkit vet.. ;-) I fear though, that there is collusion between
these widgets and the NSThemeFrame class (just guessing from the names
of some of the methods I see in class-dump). If so I will have to
implement my own buttons, which seems a shame.

thanks,
-mark


Related mailsAuthorDate
No related mails found.