• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Menu-less popup buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Menu-less popup buttons
      • From: Gwynne <email@hidden>
References: 
 >Menu-less popup buttons (From: Gwynne <email@hidden>)
 >Re: Menu-less popup buttons (From: Shaun Wexler <email@hidden>)
 >Re: Menu-less popup buttons (From: Gwynne <email@hidden>)
 >Re: Menu-less popup buttons (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: Re: NSTask problems with the path
  • Next by Date: Export panel like iPhoto
  • Previous by thread: Re: Menu-less popup buttons
  • Next by thread: Re: Menu-less popup buttons
  • Index(es):
    • Date
    • Thread