On Aug 22, 2008, at 2:13 PM, Charles Srstka wrote:

On Aug 21, 2008, at 10:02 PM, Ricky Sharp wrote:

Creating a non-movable, non-titled window is _trivial_. Just create a tiny subclass and away you go. I do this myself, along with following the guidelines of that technote.

Why would it be necessary to make a subclass? Shouldn't it be possible to pass NSBorderlessWindowMask as the "styleMask" parameter in -[NSWindow initWithContentRect:styleMask:backing:defer:] to get a window with no title bar (which thus can't be dragged)?


I suppose depending upon your needs, you may be able to avoid a subclass.

For my stuff, my subclass provides a bit more than just an override to the designated initializer:

- Provides a mouse-moved delegate

- Overrides canBecomeKeyWindow and canBecomeMainWindow (content window always returns YES for these APIs; blanking window always returns NO)

- Accessibility overrides - to mainly route 'confirm' and 'cancel' actions to appropriate controls.

- Misc APIs that provide conveniences to my custom UI framework.


A category was not possible in my case since I needed to add ivars.

___________________________________________________________
Ricky A. Sharp         mailto:[EMAIL PROTECTED]
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to