Alrighty, so... I haven't heard any objections to this particular style, and I like it. Shall I start working on doing it this way?
Daniel > I combined all nice ideas suggested here. Comments are welcome. > I may help implementing new commands. > > Currently we have multiple titles per menu. Several menu operations > require that a menu has only one title and I suggest to force this. > A title should be a property of the menu, not an item. Current non-top > titles may be simulated by "separator, centered item, separator" with no > item action. > > There are 4 commands that work with a menu by its name: > > DestroyMenu - just like the current one > AddToMenu - the old syntax, may be obsoleted later > AddMenuProperties - the new syntax > AddMenuItems - the new syntax > > And probably DestroyMenuProperties and DestroyMenuItems. > > The old syntax example: > > DestroyMenu RootMenu > AddToMenu "[EMAIL PROTECTED]@^black^" > + "Root Menu" Title > + "&Shells%mini-term.xpm%" Popup Shells > + "&Remote Shells%mini-red_term.xpm%" Popup Remote-Shells > + "" Nop > + "S&creensaver%mini-monitor.xpm%" Exec xlock -nolock > + "&Quit%mini-stop.xpm%" Quit > > The same using the new syntax (it is longer, but more readable): > > DestroyMenu RootMenu > > AddMenuProperties RootMenu > + SidePixmap "side.fvwm2.xpm" > + SideColor black > + Title "Root Menu" > > AddMenuItems RootMenu > + I "Shells" > + P Icon mini-term.xpm > + P Hotkey s > + A Popup Shells > + I "Remote Shells" > + P Icon mini-red_term.xpm > + P Hotkey r > + A Popup Remote-Shells > + S > + I "Screensaver" > + P Icon mini-monitor.xpm > + P Hotkey c > + A Exec xlock -nolock > + I "Quit" > + P Icon mini-stop.xpm > + P Hotkey q > + A Quit > > One more example, here a menu has several columns and no title. > > DestroyMenu WindowList > AddMenuItems WindowList > + I "Desk: 0" "Geometry" > + A (Mouse 2) FuncDoSomething > + S > + I "Some xterm" "80x40+100+100" > + A FuncDeiconifyAndWarp > + A (Mouse 3) Menu SomeMenu > + I "Some iconified xterm" "80x40+200+200" > + A FuncDeiconifyAndWarp > + A (Mouse 3) Menu SomeMenu > + P Disabled # or: Greyed > > Now, a formal description of new commands: > > AddMenuProperties gets parameters: > > DynamicPopUpAction > DynamicPopDownAction > MissingSubmenuFunction > SidePixmap > SideColor # probably SideColorset > Title > WindowTitle # used instead of Title on tear-off > > AddMenuItems gets parameters: > > I or Item - starts a new item > parameters: one or more labels > S or Separator - starts a new "item", i.e. separator > parameters: TearOff? > P or Property - defines the current item property > parameters: > Icon (or Image) - multiple Icon parameters may be given > BottomImage - if we are going to continue support this > Hotkey - defines a hotkey char, here locale should be used I think > Centered - this is to emulate non-top titles > Disabled (or Greyed) > A or Action - defines the current item action > parameters: > command > (Mouse n) command > (Key k) command - maybe in the future > > By default, the title is separated from items using a tear-off separator, > but this may be configured. > > The title (and possibly a separator) is removed when the menu is enclosed > into a window. But now the question is what to do with multi-column > titles: > > AddMenuProperties my-menu > + Title "one column" "another column" > > There are several solutions and I tend to the first one: > > 1) don't allow multi-column title, use multi-column item instead > 2) allow multi-column title, but don't remove it on tear-off, > otherwise the menu losses some information, and it is not clear > what separator to use to join columns in a window title > 3) allow multi-column titles, remove it on tear-off > > Regards, > Mikhael. > -- > Visit the official FVWM web page at <URL:http://www.fvwm.org/>. > To unsubscribe from the list, send "unsubscribe fvwm-workers" in the > body of a message to [EMAIL PROTECTED] > To report problems, send mail to [EMAIL PROTECTED] > -- /\\\----------------------------------------------------------------------///\ \ \\\ Daniel Henninger http://www.vorpalcloud.org/ /// / \_\\\ North Carolina State University - Systems Programmer ///_/ \\\ Information Technology <IT> /// """--------------------------------------------------------------""" -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]