Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get utility window with document window proportions?




On Jun 29, 2006, at 1:27 PM, David Niemeijer wrote:

I would like to have utility window style behavior and layering and have document window size of size box and title bar. Basically, a utility window with a taller title bar and bigger size box. Is there an easy way to get that? I though about using a regular document window and then setting the window group to the utility window group, but then the looks and the behavior do not match regular utility windows (like different looks when app is in foreground and when app is in background). Is there some kind of trick for this or must one make a custom window?

This should do it:

WindowDefSpec defSpec;
defSpec.defType = kWindowDefProcID;
defSpec.u.procID = kWindowFullZoomGrowDocumentProc;
CreateCustomWindow( &defSpec, kUtilityWindowClass, kWindowStandardDocumentAttributes | kOtherAttributesYouWant, &bounds, &window );


Creating a window with the utility class causes some private state to be set to get the utility behavior that isn't settable any other way. I'm hoping to provide some new window attributes in Leopard so you can enable or disable this state yourself on any type of window, but for now this approach should work.

-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >How to get utility window with document window proportions? (From: David Niemeijer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.