'\" t .\" Title: fvwm3menus .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-03-09 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "FVWM3MENUS" "1" "2024-03-09" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" fvwm3menus \- fvwm menus .SH "MENUS" .sp Before a menu can be opened, it has to be populated with menu items using the \fBAddToMenu\fP command and bound to a key or mouse button with the \fBKey\fP, \fBPointerKey\fP or \fBMouse\fP command (there are many other ways to invoke a menu too). This is usually done in the configuration file. .sp Fvwm menus are extremely configurable in look and feel. Even the slightest nuances can be changed to the user\(cqs liking, including the menu item fonts, the background, delays before popping up sub menus, generating menus dynamically and many other features. Please refer to the \fBMenuStyle\fP command to learn more. .sp \fBTypes of Menus\fP .RS 4 There are four slightly different types of menus: .sp Popup menus can appear everywhere on the screen on their own or attached to a part of a window. The \fBPopup\fP command opens popup menus. If the popup menu was invoked with a mouse button held down, it is closed when the button is released. The item under the pointer is then activated and the associated action is executed. .sp Normal menus are very similar command, but slightly transient. When invoked by clicking a mouse button, they stay open and can be navigated with no button held. But if invoked by a button press followed by mouse motion, it behaves exactly like a popup menu. The \fBMenu\fP command creates normal menus. .sp "Sub menus" are menus inside other menus. When a menu item that has the \fBPopup\fP command as its action is selected, the named menu is opened as a sub menu to the parent. Any type of menu can have sub menus. .sp "Tear off menus" are menus that have been "torn off" their original context on the desktop like a normal window. They are created from other menus by certain key presses or mouse sequences or with the \fBTearMenuOff\fP command from inside a menu. .RE .sp \fBMenu Anatomy\fP .RS 4 Menus consist of any number of titles which are inactive menu items that usually appear at the top of the menu, normal items triggering various actions when selected, separator lines between the items, tear off bars (a horizontal broken line) that tear off the menu when selected, and sub menu items indicated with a triangle pointing left or right, depending on the direction in which the sub menu appears. All the above menu items are optional. .sp Additionally, if the menu is too long to fit on the screen, the excess menu items are put in a continuation menu and a sub menu with the string "More..." is placed at the bottom of the menu. The "More..." string honors the locale settings. .sp Finally, there may be a picture running up either side of the menu (a "side bar"). .RE .sp \fBMenu Navigation\fP .RS 4 Menus are navigated with the keyboard and the mouse. Many people prefer to use the mouse, but it can be tedious. Keyboard navigation can be much faster. While fvwm displays a menu, it can do nothing else. For example, new windows do not appear before the menu is closed. However, this is not exactly true for tear off menus. See the \fBTear Off Menus\fP section for details. .RE .sp \fBMouse Navigation\fP .RS 4 Moving the pointer over a menu selects the item below it. Normally this is indicated by a 3d border around the item, but not all parts of a menu can be selected. Pressing any mouse button while a menu is open by default activates the item below it. Items of a popup menu are also activated by releasing a held mouse button. In case of an item that hides a sub menu, the sub menu is displayed if the pointer hovers over the item long enough or moves close to the triangle indicating the sub menu. This behaviour can be tuned with menu styles. .sp Scrolling a mouse wheel over a menu either wraps the pointer along the menu (default), scrolls the menu under the pointer or act as if the menu was clicked depending on the \fIMouseWheel\fP menu style. .sp Clicking on a selected item activates it \- what happens exactly depends on the type of the item. .sp Clicking on a title, a separator, the side bar, or outside the menu closes the menu (exception: tear off menus can not be closed this way). Pressing mouse button 2 over a menu title or activating a tear off bar creates a tear off menu from the current menu. Clicking on a normal menu item invokes the command that is bound to it, and clicking on a sub menu item either closes all open menus and replaces them with the sub menu or posts the menu (default). .sp Posting menus is meant to ease mouse navigation. Once a sub menu is posted, only items from that sub menu can be selected. This can be very useful to navigate the menu if the pointer tends to stray off the menu. To unpost the menu and revert back to normal operation, either click on the same sub menu item or press any key. .RE .sp \fBKeyboard Navigation\fP .RS 4 Just like with mouse navigation, the item below the pointer is selected. This is achieved by warping the pointer to the menu items when necessary. While a menu is open, all key presses are intercepted by the menu. No other application can get keyboard input (although this is not the case for tear off menus). .sp Items can be selected directly by pressing a hotkey that can be configured individually for each menu item. The hotkey is indicated by underlining it in the menu item label. With the \fIAutomaticHotkeys\fP menu style fvwm automatically assigns hotkeys to all menu items. .sp The most basic keys to navigate through menus are the cursor keys (move up or down one item, enter or leave a sub menu), .sp (activate item) and .sp (close menu). Numerous other keys can be used to navigate through menus by default: .sp \fIEnter\fP, \fIReturn\fP, \fISpace\fP activate the current item. .sp \fIEscape\fP, \fIDelete\fP, \fICtrl\-G\fP exit the current sequence of menus or destroy a tear off menu. .sp \fIJ\fP, \fIN\fP, \fICursor\-Down\fP, \fITab\fP, \fIMeta\-Tab\fP, \fICtrl\-F\fP, move to the next item. .sp \fIK\fP, \fIP\fP, \fICursor\-Up\fP, \fIShift\-Tab\fP, \fIShift\-Meta\-Tab\fP, \fICtrl\-B\fP, move to the prior item. .sp \fIL\fP, \fICursor\-Right\fP, \fIF\fP enter a sub menu. .sp \fIH\fP, \fICursor\-Left\fP, \fIB\fP return to the prior menu. .sp \fICtrl\-Cursor\-Up\fP, \fICtrl\-K\fP \fICtrl\-P\fP, \fIShift\-Ctrl\-Meta\-Tab\fP, \fIPage\-Up\fP move up five items. .sp \fICtrl\-Cursor\-Down\fP, \fICtrl\-J\fP \fICtrl\-N\fP, \fICtrl\-Meta\-Tab\fP \fIPage\-Down\fP move down five items. .sp \fIShift\-P\fP, \fIHome\fP, \fIShift\-Cursor\-Up\fP, \fICtrl\-A\fP move to the first item. .sp \fIShift\-N\fP, \fIEnd\fP, \fIShift\-Cursor\-Down\fP, \fICtrl\-E\fP move to the last item. .sp \fIMeta\-P\fP, \fIMeta\-Cursor\-Up\fP, \fICtrl\-Cursor\-Left\fP, \fIShift\-Ctrl\-Tab\fP, move up just below the next separator. .sp \fIMeta\-N\fP, \fIMeta\-Cursor\-Down\fP, \fICtrl\-Cursor\-Right\fP, \fICtrl\-Tab\fP, move down just below the next separator. .sp \fIInsert\fP opens the "More..." sub menu if any. .sp \fIBackspace\fP tears off the menu. .RE .sp \fBMenu Bindings\fP .RS 4 The keys and mouse buttons used to navigate the menu can be configured using the \fBKey\fP and \fBMouse\fP commands with the special context \*(AqM\*(Aq, possible combined with \*(AqT\*(Aq for the menu title, \*(AqI\*(Aq for other menu items, \*(AqS\*(Aq for any border or sidepic, \*(Aq[\*(Aq for left border including a left sidepic, \*(Aq]\*(Aq for right border including a right sidepic, \*(Aq\-\*(Aq for top border, \*(Aq\fI\*(Aq for bottom border. The menu context uses its own set of actions that can be bound to keys and mouse buttons. These are _MenuClose\fP, \fIMenuCloseAndExec\fP, \fIMenuEnterContinuation\fP, \fIMenuEnterSubmenu\fP, \fIMenuLeaveSubmenu\fP, \fIMenuMoveCursor\fP, \fIMenuCursorLeft\fP, \fIMenuCursorRight\fP, \fIMenuSelectItem\fP, \fIMenuScroll\fP and \fIMenuTearOff\fP. .sp It is not possible to override the key Escape with no modifiers for closing the menu. Neither is it possible to undefine mouse button 1, the arrow keys or the enter key for minimal navigation. .sp \fBMenuClose\fP exits from the current sequence of menus or destroys a tear off menu. .sp \fBMenuCloseAndExec\fP exits from the current sequence of menus or destroys a tear off menu and executes the rest of the line as a command. .sp \fBMenuEnterContinuation\fP opens the "More..." sub menu if any. .sp \fBMenuEnterSubmenu\fP enters a sub menu. .sp \fBMenuLeaveSubmenu\fP returns to the prior menu. .sp \fBMenuMoveCursor\fP \fIn\fP [\fIm\fP] moves the selection to another item. If the first argument is zero the second argument specifies an absolute item in the menu to move the pointer to. Negative items are counted from the end of the menu. If the first argument is non\-zero, the second argument must be omitted, and the first argument specifies a relative change in the selected item. The positions may be suffixed with a \*(Aqs\*(Aq to indicate that the items should refer only to the first items after separators. .sp \fBMenuCursorLeft\fP enters a sub menu with the \fISubmenusLeft\fP menu style, and returns to the prior menu with the \fISubmenusRight\fP menu style. .sp \fBMenuCursorRight\fP enters a sub menu with the \fISubmenusRight\fP menu style, and returns to the prior menu with the \fISubmenusLeft\fP menu style. .sp \fBMenuSelectItem\fP triggers the action for the menu item. .sp \fBMenuScroll \fP\fIn\fP performs menu scrolling according to the \fIMouseWheel\fP menu style with \fIn\fP items. The distance can be suffixed with an \*(Aqs\*(Aq to indicate the items should refer only to the first items after separators. .sp \fBMenuTearOff\fP turns a normal menu into a "torn off" menu. See \fBTear Off Menus\fP for details. .RE .sp \fBTear Off Menus\fP .RS 4 A tear off menu is any menu that has been "torn off" the window it was attached to and pinned to the root window. There are three ways to tear off a menu: click on the menu title with mouse button 2, press .sp in the menu or activate its tear off bar (a horizontal bar with a broken line). Tear off bars must be added to the menu as any other item by assigning them the command \fBTearMenuOff\fP. .sp The builtin tear off actions can be overridden by undefining the builtin menu actions bound to tear off. To remove the builtin mouse button 2 binding, use: .sp .if n .RS 4 .nf .fam C Mouse 2 MT A \- .fam .fi .if n .RE .sp and to remove the builtin backspace binding, use: .sp .if n .RS 4 .nf .fam C Key Backspace M A \- .fam .fi .if n .RE .sp See the section \fBMenu Bindings\fP for details on how to assign other bindings for tear off. .sp Note that prior to fvwm 2.5.20 the tear off mouse bindings were redefined in different way, which no longer work. .sp The window containing the menu is placed as any other window would be. If you find it confusing to have your tear off menus appear at random positions on the screen, put this line in your configuration file: .sp .if n .RS 4 .nf .fam C Style fvwm_menu UsePPosition .fam .fi .if n .RE .sp To remove borders and buttons from a tear\-off menu but keep the menu title, you can use .sp .if n .RS 4 .nf .fam C Style fvwm_menu !Button 0, !Button 1 Style fvwm_menu !Button 2, !Button 3 Style fvwm_menu !Button 4, !Button 5 Style fvwm_menu !Button 6, !Button 7 Style fvwm_menu !Button 8, !Button 9 Style fvwm_menu Title, HandleWidth 0 .fam .fi .if n .RE .sp A tear off menu is a cross breeding between a window and a menu. The menu is swallowed by a window and its title is stripped off and displayed in the window title. The main advantage is that the menu becomes permanent \- activating an item does not close the menu. Therefore, it can be used multiple times without reopening it. To destroy such a menu, close its window or press the Escape key. .sp Tear off menus behave somewhat differently than normal menus and windows. They do not take the keyboard focus, but while the pointer is over one of them, all key presses are sent to the menu. Other fvwm key bindings are disabled as long as the pointer is inside the tear off menu or one of its sub menus. When the pointer leaves this area, all sub menus are closed immediately. Note that the window containing a tear off menu is never hilighted as if it had the focus. .sp A tear off menu is an independent copy of the menu it originated from. As such, it is not affected by adding items to that menu or changing its menu style. .sp To create a tear off menu without opening the normal menu first, the option \fITearOffImmediately\fP can be added to the \fBMenu\fP or \fBPopup\fP command. .RE .SS "Building menu contents" .sp \fBAddToMenu\fP \fImenu\-name\fP [\fImenu\-label\fP \fIaction\fP] .RS 4 Begins or adds to a menu definition. Typically a menu definition looks like this: .sp .if n .RS 4 .nf .fam C AddToMenu Utilities Utilities Title + Xterm Exec exec xterm \-e tcsh + Rxvt Exec exec rxvt + "Remote Logins" Popup Remote\-Logins + Top Exec exec rxvt \-T Top \-n Top \-e top + Calculator Exec exec xcalc + Xman Exec exec xman + Xmag Exec exec xmag + emacs Exec exec xemacs + Mail MailFunction xmh "\-font fixed" + "" Nop + Modules Popup Module\-Popup + "" Nop + Exit Fvwm Popup Quit\-Verify .fam .fi .if n .RE .sp The menu could be invoked via .sp .if n .RS 4 .nf .fam C Mouse 1 R A Menu Utilities Nop .fam .fi .if n .RE .sp or .sp .if n .RS 4 .nf .fam C Mouse 1 R A Popup Utilities .fam .fi .if n .RE .sp There is no end\-of\-menu symbol. Menus do not have to be defined in a contiguous region of the \fIconfig\fP file. The quoted (or first word) portion in the above examples is the menu label, which appears in the menu when the user pops it up. The remaining portion is an fvwm command which is executed if the user selects that menu item. An empty menu\-label ("") and the \fBNop\fP function are used to insert a separator into the menu. .sp The keywords \fIDynamicPopUpAction\fP and \fIDynamicPopDownAction\fP have a special meaning when used as the name of a menu item. The action following the keyword is executed whenever the menu is popped up or down. This way you can implement dynamic menus. It is even possible to destroy itself with \fBDestroyMenu\fP and the rebuild from scratch. When the menu has been destroyed (unless you used the \fIrecreate\fP option when destroying the menu), do not forget to add the dynamic action again. .sp Note: Do not trigger actions that require user interaction. They may fail and may screw up your menus. See the \fBSilent\fP command. .sp \fBWarning\fP Do not issue \fBMenuStyle\fP commands as dynamic menu actions. Chances are good that this crashes fvwm. .sp The keyword \fIGreyed\fP will still render the menu item, but will grey it out making the option unselectable. .sp There are several configurable scripts installed together with fvwm for automatic menu generation. They have their own man pages. Some of them, specifically \fBfvwm\-menu\-directory\fP and \fBfvwm\-menu\-desktop\fP, may be used with \fIDynamicPopupAction\fP to create a directory listing or GNOME/KDE application listing. .sp Example (File browser): .sp .if n .RS 4 .nf .fam C # You can find the shell script fvwm_make_browse_menu.sh # in the utils/ directory of the distribution. AddToMenu BrowseMenu + DynamicPopupAction PipeRead \(rs \*(Aqfvwm_make_browse_menu.sh BrowseMenu\*(Aq .fam .fi .if n .RE .sp Example (Picture menu): .sp .if n .RS 4 .nf .fam C # Build a menu of all .jpg files in # $HOME/Pictures AddToMenu JpgMenu foo title + DynamicPopupAction Function MakeJpgMenu AddToFunc MakeJpgMenu + I DestroyMenu recreate JpgMenu + I AddToMenu JpgMenu Pictures Title + I PipeRead \*(Aqfor i in $HOME/Pictures/*.jpg; \(rs do echo AddToMenu JpgMenu "`basename $i`" Exec xv $i; done\*(Aq .fam .fi .if n .RE .sp The keyword \fIMissingSubmenuFunction\fP has a similar meaning. It is executed whenever you try to pop up a sub menu that does not exist. With this function you can define and destroy menus on the fly. You can use any command after the keyword, but if the name of an item (that is a submenu) defined with \fBAddToFunc\fP follows it, fvwm executes this command: .sp .if n .RS 4 .nf .fam C Function .fam .fi .if n .RE .sp i.e. the name is passed to the function as its first argument and can be referred to with "$0". .sp The \fBfvwm\-menu\-directory\fP script mentioned above may be used with \fIMissingSubmenuFunction\fP to create an up to date recursive directory listing. .sp Example: .sp .if n .RS 4 .nf .fam C # There is another shell script fvwm_make_directory_menu.sh # in the utils/ directory of the distribution. To use it, # define this function in your configuration file: DestroyFunc MakeMissingDirectoryMenu AddToFunc MakeMissingDirectoryMenu + I PipeRead fvwm_make_directory_menu.sh $0 DestroyMenu SomeMenu AddToMenu SomeMenu + MissingSubmenuFunction MakeMissingDirectoryMenu + "Root directory" Popup / .fam .fi .if n .RE .sp This is another implementation of the file browser that uses sub menus for subdirectories. .sp Titles can be used within the menu. If you add the option \fItop\fP behind the keyword \fBTitle\fP, the title is added to the top of the menu. If there was a title already, it is overwritten. .sp .if n .RS 4 .nf .fam C AddToMenu Utilities Tools Title top .fam .fi .if n .RE .sp All text up to the first Tab in the menu label is aligned to the left side of t the menu, all text right of the first is aligned to the left in a second column and all text thereafter is placed right aligned in the third column. All other s are replaced by spaces. Note that you can change this format with the \fIItemFormat\fP option of the \fBMenuStyle\fP command. .sp If the menu\-label contains an ampersand (\*(Aq&\*(Aq), the next character is taken as a hot\-key for the menu item. Hot\-keys are underlined in the label. To get a literal \*(Aq&\*(Aq, insert "&&". Pressing the hot\-key moves through the list of menu items with this hot\-key or selects an item that is the only one with this hot\-key. .sp If the menu\-label contains a sub\-string which is set off by stars, then the text between the stars is expected to be the name of an image file to insert in the menu. To get a literal \*(Aq\fB\*(Aq, insert "\fP*". For example .sp .if n .RS 4 .nf .fam C + Calculator*xcalc.xpm* Exec exec xcalc .fam .fi .if n .RE .sp inserts a menu item labeled "Calculator" with a picture of a calculator above it. The following: .sp .if n .RS 4 .nf .fam C + *xcalc.xpm* Exec exec xcalc .fam .fi .if n .RE .sp Omits the "Calculator" label, but leaves the picture. .sp If the menu\-label contains a sub\-string which is set off by percent signs, then the text between the percent signs is expected to be the name of image file (a so called mini icon to insert to the left of the menu label. A second mini icon that is drawn at the right side of the menu can be given in the same way. To get a literal \*(Aq%\*(Aq, insert "%%". For example .sp .if n .RS 4 .nf .fam C + Calculator%xcalc.xpm% Exec exec xcalc .fam .fi .if n .RE .sp inserts a menu item labeled "Calculator" with a picture of a calculator to the left. The following: .sp .if n .RS 4 .nf .fam C + %xcalc.xpm% Exec exec xcalc .fam .fi .if n .RE .sp Omits the "Calculator" label, but leaves the picture. The pictures used with this feature should be small (perhaps 16x16). .sp If the menu\-name (not the label) contains a sub\-string which is set off by at signs (\*(Aq@\*(Aq), then the text between them is expected to be the name of an image file to draw along the left side of the menu (a side pixmap). You may want to use the \fISidePic\fP option of the \fBMenuStyle\fP command instead. To get a literal \*(Aq@\*(Aq, insert "@@". For example .sp .if n .RS 4 .nf .fam C AddToMenu StartMenu@linux\-menu.xpm@ .fam .fi .if n .RE .sp creates a menu with a picture in its bottom left corner. .sp If the menu\-name also contains a sub\-string surrounded by \*(Aq^\*(Aqs, then the text between \*(Aq^\*(Aqs is expected to be the name of an X11 color and the column containing the side picture is colored with that color. You can set this color for a menu style using the \fISideColor\fP option of the \fBMenuStyle\fP command. To get a literal \*(Aq^\*(Aq, insert "^^". Example: .sp .if n .RS 4 .nf .fam C AddToMenu StartMenu@linux\-menu.xpm@^blue^ .fam .fi .if n .RE .sp creates a menu with a picture in its bottom left corner and colors with blue the region of the menu containing the picture. .sp In all the above cases, the name of the resulting menu is name specified, stripped of the substrings between the various delimiters. .RE .sp \fBDestroyMenu\fP [recreate] \fImenu\fP .RS 4 Deletes a menu, so that subsequent references to it are no longer valid. You can use this to change the contents of a menu during an fvwm session. The menu can be rebuilt using \fBAddToMenu\fP. The optional parameter \fIrecreate\fP tells fvwm not to throw away the menu completely but to throw away all the menu items (including the title). .sp .if n .RS 4 .nf .fam C DestroyMenu Utilities .fam .fi .if n .RE .RE .sp \fBTitle\fP .RS 4 Does nothing. It is used to insert a title line in a popup or menu. .RE .SS "Commands that open menus" .sp \fBMenu\fP \fImenu\-name\fP [\fIposition\fP] [\fIdouble\-click\-action\fP] .RS 4 Causes a previously defined menu to be popped up in a sticky manner. That is, if the user invokes the menu with a click action instead of a drag action, the menu stays up. The command \fIdouble\-click\-action\fP is invoked if the user double\-clicks a button (or hits the key rapidly twice if the menu is bound to a key) when bringing up the menu. If the double click action is not specified, double clicking on the menu does nothing. However, if the menu begins with a menu item (i.e. not with a title or a separator) and the double click action is not given, double clicking invokes the first item of the menu (but only if the pointer really was over the item). .sp The pointer is warped to where it was when the menu was invoked if it was both invoked and closed with a keystroke. .sp The \fIposition\fP arguments allow placement of the menu somewhere on the screen, for example centered on the visible screen or above a title bar. Basically it works like this: you specify a \fIcontext\-rectangle\fP and an offset to this rectangle by which the upper left corner of the menu is moved from the upper left corner of the rectangle. The \fIposition\fP arguments consist of several parts: .sp [\fIcontext\-rectangle\fP] \fIx\fP \fIy\fP [\fIspecial options\fP] .sp The \fIcontext\-rectangle\fP can be one of: .sp \fIRoot\fP .RS 4 the root window of the current screen. .RE .sp \fIMonitor\fP .RS 4 the area of the current RandR screen. .RE .sp \fIMouse\fP .RS 4 a 1x1 rectangle at the mouse position. .RE .sp \fIWindow\fP .RS 4 the frame of the context window. .RE .sp \fIInterior\fP .RS 4 the inside of the context window. .RE .sp \fITitle\fP .RS 4 the title of the context window or icon. .RE .sp \fIButton\fP .RS 4 button of the context window. .RE .sp \fIIcon\fP .RS 4 the icon of the context window. .RE .sp \fIMenu\fP .RS 4 the current menu. .RE .sp \fIItem\fP .RS 4 the current menu item. .RE .sp \fIContext\fP .RS 4 the current window, menu or icon. .RE .sp \fIThis\fP .RS 4 whatever widget the pointer is on (e.g. a corner of a window or the root window). .RE .sp \fIRectangle\fP <_geometry_> .RS 4 the rectangle defined by <_geometry_> in X geometry format. Width and height default to 1 if omitted. .sp If the context\-rectangle is omitted or invalid (e.g. "item" on a window), "Mouse" is the default. Note that not all of these make sense under all circumstances (e.g. "Icon" if the pointer is on a menu). .sp The offset values \fIx\fP and \fIy\fP specify how far the menu is moved from its default position. By default, the numeric value given is interpreted as a percentage of the context rectangle\(cqs width (height), but with a trailing \*(Aq\fIm\fP\*(Aq the menu\(cqs width (height) is used instead. Furthermore a trailing \*(Aq\fIp\fP\*(Aq changes the interpretation to mean pixels. .sp Instead of a single value you can use a list of values. All additional numbers after the first one are separated from their predecessor by their sign. Do not use any other separators. .sp If \fIx\fP or \fIy\fP are prefixed with "\*(Aq\fIo\fP" where is an integer, the menu and the rectangle are moved to overlap at the specified position before any other offsets are applied. The menu and the rectangle are placed so that the pixel at percent of the rectangle\(cqs width/height is right over the pixel at percent of the menu\(cqs width/height. So "o0" means that the top/left borders of the menu and the rectangle overlap, with "o100" it\(cqs the bottom/right borders and if you use "o50" they are centered upon each other (try it and you will see it is much simpler than this description). The default is "o0". The prefix "o" is an abbreviation for "+\-m". .sp A prefix of \*(Aq\fIc\fP\*(Aq is equivalent to "o50". Examples: .sp .if n .RS 4 .nf .fam C # window list in the middle of the screen WindowList Root c c # menu to the left of a window Menu name window \-100m c+0 # popup menu 8 pixels above the mouse pointer Popup name mouse c \-100m\-8p # somewhere on the screen Menu name rectangle 512x384+1+1 +0 +0 # centered vertically around a menu item AddToMenu foobar\-menu + "first item" Nop + "special item" Popup "another menu" item +100 c + "last item" Nop # above the first menu item AddToMenu foobar\-menu + "first item" Popup "another menu" item +0 \-100m .fam .fi .if n .RE .sp Note that you can put a sub menu far off the current menu so you could not reach it with the mouse without leaving the menu. If the pointer leaves the current menu in the general direction of the sub menu the menu stays up. .RE .sp \fISpecial options\fP .RS 4 .sp To create a tear off menu without opening the normal menu, add the option \fITearOffImmediately\fP. Normally the menu opens in normal state for a split second before being torn off. As tearing off places the menu like any other window, a position should be specified explicitly: .sp .if n .RS 4 .nf .fam C # Forbid fvwm to place the menu window Style UsePPosition # Menu at top left corner of screen Menu Root 0p 0p TearOffImmediately .fam .fi .if n .RE .sp The \fIAnimated\fP and \fIMwm\fP or \fIWin\fP menu styles may move a menu somewhere else on the screen. If you do not want this you can add \fIFixed\fP as an option. This might happen for example if you want the menu always in the top right corner of the screen. .sp Where do you want a menu to appear when you click on its menu item? The default is to place the title under the cursor, but if you want it where the position arguments say, use the \fISelectInPlace\fP option. If you want the pointer on the title of the menu, use \fISelectWarp\fP too. Note that these options apply only if the \fIPopupAsRootMenu\fP \fBMenuStyle\fP option is used. .sp The pointer is warped to the title of a sub menu whenever the pointer would be on an item when the sub menu is popped up (\fIfvwm\fP menu style) or never warped to the title at all (\fIMwm\fP or \fIWin\fP menu styles). You can force (forbid) warping whenever the sub menu is opened with the \fIWarpTitle\fP (\fINoWarp\fP) option. .sp Note that the \fIspecial\-options\fP do work with a normal menu that has no other position arguments. .RE .RE .sp \fBPopup\fP \fIPopupName\fP [\fIposition\fP] [\fIdefault\-action\fP] .RS 4 This command has two purposes: to bind a menu to a key or mouse button, and to bind a sub menu into a menu. The formats for the two purposes differ slightly. The \fIposition\fP arguments are the same as for \fBMenu\fP. The command \fIdefault\-action\fP is invoked if the user clicks a button to invoke the menu and releases it immediately again (or hits the key rapidly twice if the menu is bound to a key). If the default action is not specified, double clicking on the menu does nothing. However, if the menu begins with a menu item (i.e. not with a title or a separator) and the default action is not given, double clicking invokes the first item of the menu (but only if the pointer really was over the item). .sp To bind a previously defined pop\-up menu to a key or mouse button: .sp The following example binds mouse buttons 2 and 3 to a pop\-up called "Window Ops". The menu pops up if the buttons 2 or 3 are pressed in the window frame, side\-bar, or title\-bar, with no modifiers (none of shift, control, or meta). .sp .if n .RS 4 .nf .fam C Mouse 2 FST N Popup "Window Ops" Mouse 3 FST N Popup "Window Ops" .fam .fi .if n .RE .sp Pop\-ups can be bound to keys through the use of the \fBKey\fP command. Pop\-ups can be operated without using the mouse by binding to keys and operating via the up arrow, down arrow, and enter keys. .sp To bind a previously defined pop\-up menu to another menu, for use as a sub menu: .sp The following example defines a sub menu "Quit\-Verify" and binds it into a main menu, called "RootMenu": .sp .if n .RS 4 .nf .fam C AddToMenu Quit\-Verify + "Really Quit Fvwm?" Title + "Yes, Really Quit" Quit + "Restart Fvwm" Restart + "Restart Fvwm 1.xx" Restart fvwm1 \-s + "" Nop + "No, Don\*(Aqt Quit" Nop AddToMenu RootMenu "Root Menu" Title + "Open XTerm Window" Popup NewWindowMenu + "Login as Root" Exec exec xterm \-T Root \-n Root \-e su \- + "Login as Anyone" Popup AnyoneMenu + "Remote Hosts" Popup HostMenu + "" Nop + "X utilities" Popup Xutils + "" Nop + "Fvwm Modules" Popup Module\-Popup + "Fvwm Window Ops" Popup Window\-Ops + "" Nop + "Previous Focus" Prev (AcceptsFocus) Focus + "Next Focus" Next (AcceptsFocus) Focus + "" Nop + "Refresh screen" Refresh + "" Nop + "Reset X defaults" Exec xrdb \-load \(rs $HOME/.Xdefaults + "" Nop + "" Nop + Quit Popup Quit\-Verify .fam .fi .if n .RE .sp Popup differs from \fBMenu\fP in that pop\-ups do not stay up if the user simply clicks. These are popup\-menus, which are a little hard on the wrist. \fBMenu\fP menus stay up on a click action. See the \fBMenu\fP command for an explanation of the interactive behavior of menus. A menu can be open up to ten times at once, so a menu may even use itself or any of its predecessors as a sub menu. .RE .sp \fBTearMenuOff\fP .RS 4 When assigned to a menu item, it inserts a tear off bar into the menu (a horizontal broken line). Activating that item tears off the menu. If the menu item has a label, it is shown instead of the broken line. If used outside menus, this command does nothing. Examples: .sp .if n .RS 4 .nf .fam C AddToMenu WindowMenu + I "" TearMenuOff AddToMenu RootMenu + I "click here to tear me off" TearMenuOff .fam .fi .if n .RE .RE .SS "Menu style commands" .sp Menu styles describe the looks and behaviour like normal styles do for windows. Menu styles are assigned to individual or all menus, and changing the menu style immediately affects all menus that use it. (If a menu style is used from within a menu, the changes are applied the next time an affected menu is opened.) .sp \fBChangeMenuStyle\fP \fImenustyle\fP \fImenu\fP ... .RS 4 Changes the menu style of \fImenu\fP to \fImenustyle\fP. You may specify more than one menu in each call of \fBChangeMenuStyle\fP. .RE .sp \fBCopyMenuStyle\fP \fIorig\-menustyle\fP \fIdest\-menustyle\fP .RS 4 Copy \fIorig\-menustyle\fP to \fIdest\-menustyle\fP, where \fIorig\-menustyle\fP is an existing menu style. If the menu style \fIdest_menustyle\fP does not exist, then it is created. .RE .sp \fBDestroyMenuStyle\fP \fImenustyle\fP .RS 4 Deletes the menu style named \fImenustyle\fP and changes all menus using this style to the default style, you cannot destroy the default menu style. .sp .if n .RS 4 .nf .fam C DestroyMenuStyle pixmap1 .fam .fi .if n .RE .RE .sp \fBMenuStyle\fP \fIstylename\fP [\fIoptions\fP] .RS 4 Sets a new menu style or changes a previously defined style. The \fIstylename\fP is the style name; if it contains spaces or tabs it has to be quoted. The name "\fB" is reserved for the default menu style. The default menu style is used for every menu\-like object (e.g. the window created by the *WindowList\fP command) that had not be assigned a style using the \fBChangeMenuStyle\fP. See also \fBDestroyMenuStyle\fP. When using monochrome color options are ignored. .sp \fIoptions\fP is a comma separated list containing some of the keywords Fvwm / Mwm / Win, BorderWidth, HilightBack / !HilightBack, HilightTitleBack, ActiveFore / !ActiveFore, MenuColorset, ActiveColorset, GreyedColorset, TitleColorset, Hilight3DThick / Hilight3DThin / Hilight3DOff, Hilight3DThickness, Animation / !Animation, Font, TitleFont, PopupDelay, PopupOffset, TitleWarp / !TitleWarp, TitleUnderlines0 / TitleUnderlines1 / TitleUnderlines2, SeparatorsLong / SeparatorsShort, TrianglesSolid / TrianglesRelief, PopupImmediately / PopupDelayed, PopdownImmediately / PopdownDelayed, PopupActiveArea, DoubleClickTime, SidePic, SideColor, PopupAsRootMenu / PopupAsSubmenu / PopupIgnore / PopupClose, RemoveSubmenus / HoldSubmenus, SubmenusRight / SubmenusLeft, SelectOnRelease, ItemFormat, VerticalItemSpacing, VerticalMargins, VerticalTitleSpacing, AutomaticHotkeys / !AutomaticHotkeys, UniqueHotkeyActivatesImmediate / !UniqueHotkeyActivatesImmediate, MouseWheel, ScrollOffPage / !ScrollOffPage, TrianglesUseFore / !TrianglesUseFore, Translucent / !Translucent. .sp In the above list some options are listed as option pairs or triples with a \*(Aq/\*(Aq in between. These options exclude each other. All paired options can be negated to have the effect of the counterpart option by prefixing ! to the option. .sp \fIFvwm\fP, \fIMwm\fP, \fIWin\fP reset all options to the style with the same name in former versions of fvwm. The default for new menu styles is \fIFvwm\fP style. These options override all others except \fIHilightBack\fP, \fIActiveFore\fP and \fIPopupDelay\fP, so they should be used only as the first option specified for a menu style or to reset the style to defined behavior. The same effect can be created by setting all the other options one by one. .sp \fIMwm\fP and \fIWin\fP style menus popup sub menus automatically. \fIWin\fP menus indicate the current menu item by changing the background to dark. \fIFvwm\fP sub menus overlap the parent menu, \fIMwm\fP and \fIWin\fP style menus never overlap the parent menu. .sp \fIFvwm\fP style is equivalent to !HilightBack, Hilight3DThin, !ActiveFore, !Animation, Font, PopupOffset 0 67, TitleWarp, TitleUnderlines1, SeparatorsShort, TrianglesRelief, PopupDelayed, PopdownDelayed, PopupDelay 150, PopdownDelay 150, PopupAsSubmenu, HoldSubmenus, SubmenusRight, BorderWidth 2, !AutomaticHotkeys, UniqueHotkeyActivatesImmediate, PopupActiveArea 75. .sp \fIMwm\fP style is equivalent to !HilightBack, Hilight3DThick, !ActiveFore, !Animation, Font, PopupOffset \-3 100, !TitleWarp, TitleUnderlines2, SeparatorsLong, TrianglesRelief, PopupImmediately, PopdownDelayed, PopdownDelay 150, PopupAsSubmenu, HoldSubmenus, SubmenusRight, BorderWidth 2, UniqueHotkeyActivatesImmediate, !AutomaticHotkeys, PopupActiveArea 75. .sp \fIWin\fP style is equivalent to HilightBack, Hilight3DOff, ActiveFore, !Animation, Font, PopupOffset \-5 100, !TitleWarp, TitleUnderlines1, SeparatorsShort, TrianglesSolid, PopupImmediately, PopdownDelayed, PopdownDelay 150, PopupAsSubmenu, RemoveSubmenus, SubmenusRight, BorderWidth 2, UniqueHotkeyActivatesImmediate, !AutomaticHotkeys, PopupActiveArea 75. .sp \fIBorderWidth\fP takes the thickness of the border around the menus in pixels. It may be zero to 50 pixels. The default is 2. Using an invalid value reverts the border width to the default. .sp \fIHilightBack\fP and \fI!HilightBack\fP switch hilighting the background of the selected menu item on and off. The \fIActiveColorset\fP background color is used for the hilighting. .sp \fIHilightTitleBack\fP switches hilighting the background of menu titles on. The \fITitleColorset\fP background color is used for the hilighting. .sp \fIActiveFore\fP and \fI!ActiveFore\fP switch hilighting the foreground of the selected menu item on and off. The \fIActiveColorset\fP foreground color is used for the hilighting. .sp \fIMenuColorset\fP controls the colorset used to color the menu. If the colorset has a pixmap or gradient defined, this is used as the background of the menu. The shape mask from the colorset is used to shape the menu. Please refer to the \fBColorsets\fP section for details about colorsets. .sp \fIActiveColorset\fP controls the color of the active menu item, provided the \fIHilightBack\fP or \fIActiveFore\fP menu styles are used. If specified, the hilight and shadow colors from the colorset are used too. The pixmap and shape mask from the colorset are not used. Hilighting the background or foreground can be turned off individually with the \fI!ActiveFore\fP or \fI!HilightBack\fP menu styles. .sp \fIGreyedColorset\fP works exactly like \fIMenuColorset\fP, but the foreground from the colorset replaces the color given with the \fIGreyed\fP menu style. No other parts of the colorset are used. .sp \fITitleColorset\fP works exactly like \fIMenuColorset\fP, but is used only for menu titles. .sp \fITranslucent\fP controls a pseudo transparent effect that uses a image of the desktop under the menu as its background image. This option takes one value that is a number between 0 (fully translucent) and 100 (not translucent), which is the percent of the translucency. Use \fI!Translucent\fP (or no additional value) to turn the effect off. The translucent effect only applies to normal menus and does not apply to "torn off" menus. Note, only the menu background is translucent, the \fIHilightBack\fP of the active item and \fIHilightTitleBack\fP of the title are not. To have a fully translucent menu use the following. .sp .if n .RS 4 .nf .fam C MenuStyle * Translucent 60, !HilightBack, !HilightTitleBack, ActiveFore .fam .fi .if n .RE .sp \fIHilight3DThick\fP, \fIHilight3DThin\fP and \fIHilight3DOff\fP determine if the selected menu item is hilighted with a 3D relief. Thick reliefs are two pixels wide, thin reliefs are one pixel wide. .sp \fIHilight3DThickness\fP takes one numeric argument that may be between \-50 and +50 pixels. With negative values the menu item gets a pressed in look. The above three commands are equivalent to a thickness of 2, 1 and 0. .sp \fIAnimation\fP and \fI!Animation\fP turn menu animation on or off. When animation is on, sub menus that do not fit on the screen cause the parent menu to be shifted to the left so the sub menu can be seen. .sp \fIFont\fP and \fITitleFont\fP take a font name as an argument. If a font by this name exists it is used for the text of all menu items. If it does not exist or if the name is left blank the built\-in default is used. If a \fITitleFont\fP is given, it is used for all menu titles instead of the normal font. .sp \fIPopupDelay\fP requires one numeric argument. This value is the delay in milliseconds before a sub menu is popped up when the pointer moves over a menu item that has a sub menu. If the value is zero no automatic pop up is done. If the argument is omitted the built\-in default is used. Note that the popup delay has no effect if the \fIPopupImmediately\fP option is used since sub menus pop up immediately then. .sp \fIPopupImmediately\fP makes menu items with sub menus pop up it up as soon as the pointer enters the item. The \fIPopupDelay option\fP is ignored then. If \fIPopupDelayed\fP is used fvwm looks at the \fIPopupDelay\fP option if or when this automatic popup happens. .sp \fIPopdownDelay\fP works exactly like \fIPopupDelay\fP but determines the timeout of the \fIPopupDelayed\fP style. .sp \fIPopdownImmediately\fP makes sub menus vanish as soon as the pointer leaves the sub menu and the correspondent item in the parent menu. With the opposite option \fIPopdownDelayed\fP the sub menu only pops down after the time specified with the \fIPopdownDelay\fP option. This comes handy when the pointer often strays off the menu item when trying to move into the sub menu. Whenever there is a conflict between the \fIPopupImmediately\fP, \fIPopupDelayed\fP, \fIPopupDelay\fP styles and the \fIPopdownImmediately\fP, \fIPopdownDelayed\fP, \fIPopdownDelay\fP styles, the \fIPopup...\fP styles win when using mouse navigation and the \fIPopdown...\fP styles win when navigating with the keyboard. .sp \fIPopupOffset\fP requires two integer arguments. Both values affect where sub menus are placed relative to the parent menu. If both values are zero, the left edge of the sub menu overlaps the left edge of the parent menu. If the first value is non\-zero the sub menu is shifted that many pixels to the right (or left if negative). If the second value is non\-zero the menu is moved by that many percent of the parent menu\(cqs width to the right or left. .sp \fIPopupActiveArea\fP requires an integer value between 51 and 100. Normally, when the pointer is over a menu item with a sub menu and the pointer enters the area that starts at 75% of the menu width, the sub menu is shown immediately. This percentage can be changed with \fIPopupActiveArea\fP. Setting this value to 100 disables this kind of automatic popups altogether. The default value is restored if no or an invalid value is given. .sp \fITitleWarp\fP and \fI!TitleWarp\fP affect if the pointer warps to the menu title when a sub menu is opened or not. Note that regardless of this setting the pointer is not warped if the menu does not pop up under the pointer. .sp \fITitleUnderlines0\fP, \fITitleUnderlines1\fP and \fITitleUnderlines2\fP specify how many lines are drawn below a menu title. .sp \fISeparatorsLong\fP and \fISeparatorsShort\fP set the length of menu separators. Long separators run from the left edge all the way to the right edge. Short separators leave a few pixels to the edges of the menu. .sp \fITrianglesSolid\fP and \fITrianglesRelief\fP affect how the small triangles for sub menus is drawn. Solid triangles are filled with a color while relief triangles are hollow. .sp \fIDoubleClickTime\fP requires one numeric argument. This value is the time in milliseconds between two mouse clicks in a menu to be considered as a double click. The default is 450 milliseconds. If the argument is omitted the double click time is reset to this default. .sp \fISidePic\fP takes the name of an image file as an argument. The picture is drawn along the left side of the menu. The \fISidePic\fP option can be overridden by a menu specific side pixmap (see \fBAddToMenu\fP). If the file name is omitted an existing side pixmap is removed from the menu style. .sp \fISideColor\fP takes the name of an X11 color as an argument. This color is used to color the column containing the side picture (see above). The SideColor option can be overridden by a menu specific side color (see \fBAddToMenu\fP). If the color name is omitted the side color option is switched off. .sp \fIPopupAsRootMenu\fP, \fIPopupAsSubmenu\fP, \fIPopupIgnore\fP and \fIPopupClose\fP change the behavior when you click on a menu item that opens a sub menu. With \fIPopupAsRootMenu\fP the original menu is closed before the sub menu appears, with \fIPopupAsSubmenu\fP it is not, so you can navigate back into the parent menu. Furthermore, with \fIPopupAsSubmenu\fP the sub menu is held open (posted) regardless of where you move the mouse. Depending on your menu style this may simplify navigating through the menu. \fBAny\fP keystroke while a menu is posted reverts the menu back to the normal behavior. With \fIPopupClose\fP the menu is closed when a sub menu item is activated, and the menu stays open if \fIPopupIgnore\fP is used (even if the menu was invoked with the \fBPopup\fP command). \fIPopupAsSubmenu\fP is the default. .sp \fIRemoveSubmenus\fP instructs fvwm to remove sub menu when you move back into the parent menu. With \fIHoldSubmenus\fP the sub menu remains visible. You probably want to use \fIHoldSubmenus\fP if you are using the \fIPopupDelayed\fP style. \fIRemoveSubmenus\fP affects menu navigation with the keyboard. .sp \fISelectOnRelease\fP takes an optional key name as an argument. If the given key is released in a menu using this style, the current menu item is selected. This is intended for \fBWindowList\fP navigation. The key name is a standard X11 key name as defined in \fI/usr/include/X11/keysymdef.h\fP, (without the \fIXK_\fP prefix), or the keysym database \fI/usr/X11R6/lib/X11/XKeysymDB\fP. To disable this behavior, omit the key name. .sp Note: Some X servers do not support KeyRelease events. \fISelectOnRelease\fP does not work on such a machine. .sp \fIItemFormat\fP takes a special string as its argument that determines the layout of the menu items. Think of the format string as if it were a menu item. All you have to do is tell fvwm where to place the different parts of the menu item (i.e. the labels, the triangle denoting a sub menu, the mini icons and the side pic) in the blank area. The string consists of spaces, .sp characters and formatting directives beginning with \*(Aq%\*(Aq. Any invalid characters and formatting directives are silently ignored: .sp \fB%l\fP, \fB%c\fP and \fB%r\fP .RS 4 Insert the next item label. Up to three labels can be used. The item column is left\-aligned (\fB%l\fP), centered (\fB%c\fP) or right\-aligned (\fB%r\fP). .RE .sp \fB%i\fP .RS 4 Inserts the mini icon. .RE .sp \fB%>\fP and \fB%<\fP .RS 4 Insert the sub menu triangle pointing either to the right (\fB%>\fP) or to the left (\fB%<\fP). .RE .sp \fB%|\fP .RS 4 The first \fB%|\fP denotes the beginning of the area that is highlighted either with a background color or a relief (or both). The second \fB%|\fP marks the end of this area. \fB%|\fP can be used up to twice in the string. If you do not add one or both of them, fvwm sets the margins to the margins of the whole item (not counting the side picture). .RE .sp \fB%s\fP .RS 4 Places the side picture either at the beginning or the end of the menu. This directive may be used only once and only as the first or last in the format string. If the \fB%s\fP is not at the beginning of the string, menus are not drawn properly. .RE .sp \fBSpace\fP, \fBTab\fP, \fB%Space\fP and \fB%Tab\fP .RS 4 Add gap of one space, or a tab, using the width of the menu font. When using a tab, the size of the gap can be one to 8 spaces since the tab position is a multiple of 8 from the edge of the menu. The whole string must be quoted if spaces or tabs are used. .RE .sp \fB%p\fP .RS 4 Like Space and Tab \fB%p\fP inserts an empty area into the item, but with better control of its size (see below). .RE .sp You can define an additional space before and after each of the objects like this .sp .if n .RS 4 .nf .fam C %left.rightp .fam .fi .if n .RE .sp This means: if the object is defined in the menu (e.g. if it is \fB%s\fP and you use a side picture, or it is \fB%l\fP for the third column and there are items defined that actually have a third column), then add \fIleft\fP pixels before the object and \fIright\fP pixels after it. You may leave out the \fIleft\fP or the \fI.right\fP parts if you do not need them. All values up to the screen width are allowed. Even negative values can be used with care. The \fBp\fP may be replaced with any other formatting directives described above. .sp Note: Only items defined in the format string are visible in the menus. So if you do not put a \fB%s\fP in there you do not see a side picture, even if one is specified. .sp Note: The \fISubmenusLeft\fP style changes the default \fIItemFormat\fP string, but if it was set manually it is not modified. .sp Note: If any unformatted title of the menu is wider than the widest menu item, the spaces between the different parts of the menu items are enlarged to match the width of the title. Leading left aligned objects in the format string (\fB%l\fP, \fB%i\fP, \fB%<\fP, first \fB%|\fP) stick to the left edge of the menu and trailing right aligned objects (\fB%r\fP, \fB%i\fP, \fB%>\fP, second \fB%|\fP) stick to the right edge. The gaps between the remaining items are enlarged equally. .sp Examples: .sp .if n .RS 4 .nf .fam C MenuStyle * ItemFormat "%.4s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" .fam .fi .if n .RE .sp Is the default string used by fvwm: (side picture + 4 pixels gap) (beginning of the hilighted area + 1 pixel gap) (mini icon + 5p) (first column left aligned + 5p) (second column left aligned + 5p) (third column right aligned + 5p) (second mini icon + 5p) (2p + sub menu triangle + 3p) (1p + end of hilighted area). .sp .if n .RS 4 .nf .fam C MenuStyle * ItemFormat "%.1|%3.2<%5i%5l%5l%5r%5i%1|%4s" .fam .fi .if n .RE .sp Is used by fvwm with the \fISubmenusLeft\fP option below. .sp \fIVerticalItemSpacing\fP and \fIVerticalTitleSpacing\fP control the vertical spacing of menu items and titles like \fIItemFormat\fP controls the horizontal spacing. Both take two numeric arguments that may range from \-100 to +100. The first is the gap in pixels above a normal menu item (or a menu title), the second is the gap in pixels below it. Negative numbers do not make much sense and may screw up the menu completely. If no arguments are given or the given arguments are invalid, the built\-in defaults are used: one pixel above the item or title and two below. .sp \fIVerticalMargins\fP can be used to add some padding at the top and bottom of menus. It takes two numeric arguments that must be positive integers (or zero). If the number of arguments or its values are incorrect, fvwm defaults both to 0, which means no padding at all. If the values are correct, the first one is used for the top margin, and the second one is used for the bottom margin. .sp \fISubmenusLeft\fP mirrors the menu layout and behavior. Sub menus pop up to the left, the sub menu triangle is drawn left and the mini icon and side picture are drawn at the right side of the menu. The default is \fISubmenusRight\fP. The position hints of a menu are also affected by this setting, i.e. position hints using \fIitem\fP or \fImenu\fP as context rectangle and position hints using \fIm\fP offsets. .sp \fIAutomaticHotkeys\fP and \fI!AutomaticHotkeys\fP control the menu\(cqs ability to automatically provide hot\-keys on the first character of each menu item\(cqs label. This behavior is always overridden if an explicit hot\-key is assigned in the \fBAddToMenu\fP command. .sp \fIUniqueHotkeyActivatesImmediate\fP and \fI!UniqueHotkeyActivatesImmediate\fP controls how menu items are invoked when used with hotkeys. By default, if a given menu entry only has one completeable match for a given hotkey, the action for that menu entry is invoked and the menu is closed. This is due to the \fIUniqueHotkeyActivatesImmediate\fP option. However, the menu can be told to remain open, waiting for the user to invoke the selected item instead when there is only one matched item for a given hotkey, by using the \fI!UniqueHotkeyActivatesImmediate\fP option. .sp \fIMouseWheel\fP controls the ability to scroll the menu using a mouse wheel. It takes one argument, that can be one of ScrollsPointer, ScrollsMenu, ScrollsMenuBackwards or ActivatesItem. ScrollsPointer makes the mouse wheel scroll the pointer over a menu. This is the default. ScrollsMenu and ScrollsMenuBackwards scroll the menu beneath the pointer. ActivatesItem disables scrolling by mouse wheel and makes the use of a mouse wheel act as if the menu was clicked. If no argument is supplied the default setting is restored. .sp \fIScrollOffPage\fP allows a menu to be scrolled out of the visible area if \fIMouseWheel\fP is set to ScrollsMenu or ScrollsMenuBackwards. This is the default. The opposite, \fI!ScrollOffPage\fP disables this behaviour. .sp \fITrianglesUseFore\fP draws sub menu triangles with the foreground color of the menu colorset (normally drawn with the hilight color). \fI!TrianglesUseFore\fP disables this behaviour. .RE