Re: Capture highlighted menu name
Re: Capture highlighted menu name
- Subject: Re: Capture highlighted menu name
- From: Graham Cox <email@hidden>
- Date: Wed, 25 Feb 2009 01:50:33 +1100
On 25/02/2009, at 1:15 AM, Cauvery K wrote:
Hi There,
Any updates on this guys?
Regards,
Cauvery
Hi There,
[...]
I'm going to ignore the approach you mentioned because it sounds
incredibly painful for what could very well turn out to be a very
simple thing. The problem is that it's hard to tell exactly what
you're trying to do because you didn't explain your goals very well.
We are developing a screen capture application and menu capture is
one of the features. If you consider the default
Apple object capture, it captures the menu but not along with its
title. But we want to capture the menu along with its title.
Sounds like it would be useful for the standard "window" screen
capture (cmd-shift-4, spacebar) to grab the menu's title along with
the menu itself. Currently it treats the menu bar and the pulled down
menu as two separate targets (which they are in terms of windows, but
not in terms of the user's perception). Including just the title as a
"tab" above the menu would be very useful for screenshots for manuals.
Have you tried filing an enhancement request? They do seem to work
eventually - a screen capture feature I asked for around 10.2 time
turned up in Leopard (though I've no idea if it was because I asked or
not, or just because it was an obviously good idea).
There is virtually no API for getting at the menu bar layout metrics,
even in Carbon (it used to be possible to ferret out some of the info,
but I think much of that stuff - MBDFs and so on - has long gone). So
I'd guess that the short-term prospects for a solution are poor. You
might be able to come up with a way to get the title rect using a
combination of the -locationForSubmenu: method, the title string
length, system font metrics, menu bar height, and some fiddle factors.
Expect it to break in future releases. File another enhancement
request to get an API for the titleRect to be returned.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden