Re: Menu-less popup buttons
Re: Menu-less popup buttons
- Subject: Re: Menu-less popup buttons
- From: Gwynne <email@hidden>
- Date: Sat, 22 May 2004 09:42:24 -0400
On May 22, 2004, at 7:16 AM, Louis C. Sacha wrote:
Hello...
Have you seen the Carbon HIToolbox stuff?
Based on the release notes, it would be easier to use since it doesn't
rely on Quickdraw.
http://developer.apple.com/documentation/ReleaseNotes/Carbon/
HIToolbox.html
If you scroll down there is a section with the heading "Appearance
Manager" and subheading "Header files (HIToolbox): Appearance.h,
HITheme.h". If you do an command-F find for "2816257" in the text of
that page it should take you to the right place.
Oh yes, the HITheme stuff would be much simpler to use, there's no
question of that. Only one problem: It's Panther-only, and my
application has to run on Jaguar.
This didn't work; it continued to draw the button overlapped with the
menu item area. NSButtonCell's -setUsesItemFromMenu failed as well. I
finally found a Carbon Appearance API to draw the proper button:
DrawThemeButton(), with various options. Only one problem: I can't
seem to get a proper conversion from a view-local CoreGraphics-based
NSRect to the QuickDraw screen coordinates the Appearance APIs
require. I've tried various combinations of manual mathematics,
NSWindow's convertBaseToScreen, NSView's convertRect:toView:, etc.
etc., and nothing comes up quite right without hard-coding
coordinates. I've even overriden isFlipped to return YES, without any
effect that I can see. How do I convert an NSRect specifying
bottom-up coordinates in view-local coordinates to a (QuickDraw) Rect
specifying top-down screen coordinates? Or, how do I find a
Cocoa/CoreGraphics equivalent to the Appearance APIs?
-- Gwynne, key to the Code that runs us all
Formerly known as Sailor Quasar.
Email: email@hidden
Web: http://musicimage.plasticchicken.com/
-- Gwynne, key to the Code that runs us all
Formerly known as Sailor Quasar.
Email: email@hidden
Web:
http://musicimage.plasticchicken.com/
_______________________________________________
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.