• 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: "Louis C. Sacha" <email@hidden>
  • Date: Sat, 22 May 2004 04:16:34 -0700

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.

Hope that helps,

Louis


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/
_______________________________________________
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>)

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