• 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: Receiving modifer-clicks on open menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Receiving modifer-clicks on open menus


  • Subject: Re: Receiving modifer-clicks on open menus
  • From: Dustin Voss <email@hidden>
  • Date: Tue, 20 Apr 2004 12:59:29 -0700

On 19 Apr, 2004, at 10:54 PM, Jim Witte wrote:

That might work, if I understand what you mean (something like the way the 'choose modifer' menus in Panthers Expose, etc panels work?)

The specific application is Camino: You have a bookmark-bar, which can contain items which activate on a click, or folders, which drop down a menu on a click. You can also control-click (or right-click) on an item to bring up a menu that has Get Info (Cmd-I), Delete, Open Item in New Tab, etc. I'd like the same functionality for items in the folder menus: I'd click on a folder to drop it's menu down, and then control-click on one of the items to drop down a "sub-contextual menu" that would apply to just that item.

Your users would be confused by a separate menu appearing on top of a normal menu item, so that's no good. I doubt Carbon's event handling could cope with a nested menu tracking loop anyway.

But it sounds like you could have menu items switch between normal operation and having a sub-menu. The sub-menu would contain Get Info, etc.

You won't be able to use the built-in dynamic menu item support. That support is based on command-keys, and items in the folder menus won't necessarily have command-keys.

According to Menus.h, you could customize the way your menu items respond to modifier keys by implementing a Carbon event handler to catch modifier key changes. See the comment titled "Dynamic menu item support". Then you could replace the normal menu item with an item-with-a-sub-menu when the user holds down the control key. I don't know how this would interact with a second mouse button.

Another alternative would be to give all the folder menu items a sub-menu containing Get Info, etc., but have the item itself selectable as well. Then the user could select the item for a default "Open" operation, or use the sub-menu for Get Info, etc. This can also be done via Carbon. I don't know how to set an appropriate Cocoa target/action.

I suppose I could do a work-around where you'd control-click on a folder *icon* (which currently brings up a "folder contextual menu": Open All Links As Tabs, Delete, Get Info, etc), and then have that create a list view or something that would *look* like a menu, and have parts of it respond to control-clicks. But that just seems ugly.. (And if you actually wanted to get info on the folder, you'd have to control-click it twice or something, unless I wanted to have this "list view behavior" be used for *all* clicks on folders and not use real menus at all, which would be even *more* ugly..

This is probably the worst solution. You'd have to duplicate all the built-in menu behavior: pressing ESC to cancel; arrow keys; dragging instead of clicking to select an item; running the appropriate command based on the menu selection; voice-activated menus.
_______________________________________________
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.


References: 
 >Receiving modifer-clicks on open menus (From: Jim Witte <email@hidden>)
 >Re: Receiving modifer-clicks on open menus (From: "M. Uli Kusterer" <email@hidden>)
 >Re: Receiving modifer-clicks on open menus (From: Jim Witte <email@hidden>)

  • Prev by Date: Re: pesky nib file problems
  • Next by Date: Re: Getting keyDown for option key
  • Previous by thread: Re: Receiving modifer-clicks on open menus
  • Next by thread: Re: Receiving modifer-clicks on open menus
  • Index(es):
    • Date
    • Thread