[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menu-item-actions

>         Dialog-item-actions take a single parameter: the dialog item
> itself.  However, menu-item-actions don't take any parameters.  Why is
> that?  I would like to refer to a menu-item from within its
> menu-item-action.  
>         Can anyone suggest anything?
I suggest that MCL be made more uniform by making menu items, menus, and menubars be 
views. They should look as much like views as possible to the programmer.
A menu item should be as much like a button-dialog-item as possible.
In particular, menu-item-action should be renamed dialog-item-action. The containing view 
is the menu that its installed in, and the containing view of the menu is the menubar that 
IT is installed in. Sizing and positioning methods on these guys should just error I 
guess. [Though it would be nice to have the vertical position gettable/settable
of a menu item within its menu gettable and settable. This would not be in pixels, but in 
menu item order, ie top menu item in a menu has position 0, 2nd has position 1, etc.
Setting a menu item to position -1 or any position >= number of items in the menu puts the 
item on the bottom of the menu.]

If you want to "install" a menu in a window instead of the menubar, that should be no 
problem. Likewise, if you want to put a button on a menu.
I guess accellerator keys should just be ignored for menus installed in windows.