From 0d6244431246efd7686d309fc1a3efbc53649d63 Mon Sep 17 00:00:00 2001 From: Dominik Vogt Date: Mon, 15 Nov 2021 16:52:38 +0100 Subject: [PATCH 1/7] Split main man page. fvwm3.1 basic documentation fvwm3commands.1 command documentation fvwm3all.1 all documentation fvwm3menus.1 menu documentation --- doc/.gitignore | 1 + doc/{modules => }/FvwmAnimate.adoc | 0 doc/{modules => }/FvwmAuto.adoc | 0 doc/{modules => }/FvwmBacker.adoc | 0 doc/{modules => }/FvwmButtons.adoc | 0 doc/{bin => }/FvwmCommand.adoc | 0 doc/{modules => }/FvwmConsole.adoc | 0 doc/{modules => }/FvwmEvent.adoc | 0 doc/{modules => }/FvwmForm.adoc | 0 doc/{modules => }/FvwmIconMan.adoc | 0 doc/{modules => }/FvwmIdent.adoc | 0 doc/{modules => }/FvwmMFL.adoc | 0 doc/{modules => }/FvwmPager.adoc | 0 doc/{modules => }/FvwmPerl.adoc | 0 doc/{bin => }/FvwmPrompt.adoc | 0 doc/{modules => }/FvwmRearrange.adoc | 0 doc/{modules => }/FvwmScript.adoc | 0 doc/Makefile.am | 61 +- doc/README | 8 - doc/{bin => }/fvwm-config.adoc | 0 doc/{bin => }/fvwm-convert-2.6.adoc | 0 doc/{bin => }/fvwm-menu-desktop.adoc | 0 doc/{bin => }/fvwm-root.adoc | 0 doc/fvwm3.adoc | 7 + .../fvwm3.adoc => fvwm3_manpage_source.adoc} | 545 +++++++++--------- doc/fvwm3all.adoc | 7 + doc/fvwm3commands.adoc | 7 + doc/fvwm3menus.adoc | 7 + doc/fvwm3styles.adoc | 7 + 29 files changed, 350 insertions(+), 300 deletions(-) create mode 100644 doc/.gitignore rename doc/{modules => }/FvwmAnimate.adoc (100%) rename doc/{modules => }/FvwmAuto.adoc (100%) rename doc/{modules => }/FvwmBacker.adoc (100%) rename doc/{modules => }/FvwmButtons.adoc (100%) rename doc/{bin => }/FvwmCommand.adoc (100%) rename doc/{modules => }/FvwmConsole.adoc (100%) rename doc/{modules => }/FvwmEvent.adoc (100%) rename doc/{modules => }/FvwmForm.adoc (100%) rename doc/{modules => }/FvwmIconMan.adoc (100%) rename doc/{modules => }/FvwmIdent.adoc (100%) rename doc/{modules => }/FvwmMFL.adoc (100%) rename doc/{modules => }/FvwmPager.adoc (100%) rename doc/{modules => }/FvwmPerl.adoc (100%) rename doc/{bin => }/FvwmPrompt.adoc (100%) rename doc/{modules => }/FvwmRearrange.adoc (100%) rename doc/{modules => }/FvwmScript.adoc (100%) rename doc/{bin => }/fvwm-config.adoc (100%) rename doc/{bin => }/fvwm-convert-2.6.adoc (100%) rename doc/{bin => }/fvwm-menu-desktop.adoc (100%) rename doc/{bin => }/fvwm-root.adoc (100%) create mode 100644 doc/fvwm3.adoc rename doc/{fvwm3/fvwm3.adoc => fvwm3_manpage_source.adoc} (99%) create mode 100644 doc/fvwm3all.adoc create mode 100644 doc/fvwm3commands.adoc create mode 100644 doc/fvwm3menus.adoc create mode 100644 doc/fvwm3styles.adoc diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..38ff07fe2 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +/*.ad diff --git a/doc/modules/FvwmAnimate.adoc b/doc/FvwmAnimate.adoc similarity index 100% rename from doc/modules/FvwmAnimate.adoc rename to doc/FvwmAnimate.adoc diff --git a/doc/modules/FvwmAuto.adoc b/doc/FvwmAuto.adoc similarity index 100% rename from doc/modules/FvwmAuto.adoc rename to doc/FvwmAuto.adoc diff --git a/doc/modules/FvwmBacker.adoc b/doc/FvwmBacker.adoc similarity index 100% rename from doc/modules/FvwmBacker.adoc rename to doc/FvwmBacker.adoc diff --git a/doc/modules/FvwmButtons.adoc b/doc/FvwmButtons.adoc similarity index 100% rename from doc/modules/FvwmButtons.adoc rename to doc/FvwmButtons.adoc diff --git a/doc/bin/FvwmCommand.adoc b/doc/FvwmCommand.adoc similarity index 100% rename from doc/bin/FvwmCommand.adoc rename to doc/FvwmCommand.adoc diff --git a/doc/modules/FvwmConsole.adoc b/doc/FvwmConsole.adoc similarity index 100% rename from doc/modules/FvwmConsole.adoc rename to doc/FvwmConsole.adoc diff --git a/doc/modules/FvwmEvent.adoc b/doc/FvwmEvent.adoc similarity index 100% rename from doc/modules/FvwmEvent.adoc rename to doc/FvwmEvent.adoc diff --git a/doc/modules/FvwmForm.adoc b/doc/FvwmForm.adoc similarity index 100% rename from doc/modules/FvwmForm.adoc rename to doc/FvwmForm.adoc diff --git a/doc/modules/FvwmIconMan.adoc b/doc/FvwmIconMan.adoc similarity index 100% rename from doc/modules/FvwmIconMan.adoc rename to doc/FvwmIconMan.adoc diff --git a/doc/modules/FvwmIdent.adoc b/doc/FvwmIdent.adoc similarity index 100% rename from doc/modules/FvwmIdent.adoc rename to doc/FvwmIdent.adoc diff --git a/doc/modules/FvwmMFL.adoc b/doc/FvwmMFL.adoc similarity index 100% rename from doc/modules/FvwmMFL.adoc rename to doc/FvwmMFL.adoc diff --git a/doc/modules/FvwmPager.adoc b/doc/FvwmPager.adoc similarity index 100% rename from doc/modules/FvwmPager.adoc rename to doc/FvwmPager.adoc diff --git a/doc/modules/FvwmPerl.adoc b/doc/FvwmPerl.adoc similarity index 100% rename from doc/modules/FvwmPerl.adoc rename to doc/FvwmPerl.adoc diff --git a/doc/bin/FvwmPrompt.adoc b/doc/FvwmPrompt.adoc similarity index 100% rename from doc/bin/FvwmPrompt.adoc rename to doc/FvwmPrompt.adoc diff --git a/doc/modules/FvwmRearrange.adoc b/doc/FvwmRearrange.adoc similarity index 100% rename from doc/modules/FvwmRearrange.adoc rename to doc/FvwmRearrange.adoc diff --git a/doc/modules/FvwmScript.adoc b/doc/FvwmScript.adoc similarity index 100% rename from doc/modules/FvwmScript.adoc rename to doc/FvwmScript.adoc diff --git a/doc/Makefile.am b/doc/Makefile.am index b7da155ae..2734f4c20 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,40 +1,41 @@ docdir = @FVWM_DOCDIR@ -MODULE_ADOCS = $(wildcard fvwm3/fvwm3.adoc bin/*.adoc modules/*.adoc) +MODULE_ADOC = \ + fvwm3.adoc \ + fvwm3all.adoc \ + fvwm3commands.adoc \ + fvwm3menus.adoc \ + fvwm3styles.adoc \ + $(wildcard Fvwm*.adoc) \ + $(wildcard fvwm-*.adoc) -EXTRA_DIST = $(MODULE_ADOCS) +EXTRA_DIST = $(MODULE_ADOC) -if FVWM_BUILD_MANDOC -BUILD_MANS = $(patsubst %.adoc,%, $(MODULE_ADOCS)) -else -BUILD_MANS = -endif - -all: docs -docs: $(BUILD_MANS) +nothing: clean: - rm -fr man1/ + rm -f *.1 *.ad distclean-local: clean if FVWM_BUILD_MANDOC -QUIET_ASCIIDOC = @echo ' ' DOC ' ' $@'.1'; - -%: %.adoc - $(QUIET_ASCIIDOC) \ - NAME=`basename "$@" | "$(SED)" -e "${transform}"`; \ - $(ASCIIDOC) -b manpage $< -o "man1/$$NAME.1" - -install-data-local: - install -d -m 755 $(DESTDIR)$(mandir)/man1/ - @for i in $(notdir $(BUILD_MANS)); do \ - NAME=`basename "$$i" | "$(SED)" -e "${transform}"`; \ - install -m 644 "man1/$$NAME.1" $(DESTDIR)$(mandir)/man1/; \ - done - -uninstall-local: - @for i in $(notdir $(BUILD_MANS)); do \ - NAME=`basename "$$i" | "$(SED)" -e "${transform}"`; \ - rm -f "$(DESTDIR)$(mandir)/man1/$$NAME.1"; \ - done +man1_MANS = $(patsubst %.adoc,%.1, $(MODULE_ADOC)) +EXTRACT_SECTIONS = \ + commands \ + menus \ + styles +SECTION_FILES = $(patsubst %,fvwm3_%.ad, $(EXTRACT_SECTIONS)) + +all: docs +docs: $(man1_MANS) +$(man1_MANS): $(SECTION_FILES) + +%.ad: fvwm3_manpage_source.adoc + SECTION=$(patsubst fvwm3_%.ad,%,$@); \ + cat "$<" | \ + "$(GREP)" -A 1000000 -- "^// BEGIN '$$SECTION'" | \ + "$(GREP)" -B 1000000 -- "^// END '$$SECTION'" | \ + "$(GREP)" -v "^// .* '$$SECTION'" > "$@" + +%.1: %.adoc + "$(ASCIIDOC)" -b manpage -a "$(patsubst %.1,%,$@)" "$<" -o "$@" endif diff --git a/doc/README b/doc/README index 85d7cceb8..4dfba038c 100644 --- a/doc/README +++ b/doc/README @@ -10,11 +10,3 @@ For more information about the specific markup available, see: * https://asciidoctor.org/docs/asciidoc-writers-guide/ * https://asciidoctor.org/docs/user-manual/ - -To add additional documents, see: - - doc/fvwm3/*.adoc - doc/modules/*.adoc - -Documentation for modules now resides under `doc/`, rather than its own -module. diff --git a/doc/bin/fvwm-config.adoc b/doc/fvwm-config.adoc similarity index 100% rename from doc/bin/fvwm-config.adoc rename to doc/fvwm-config.adoc diff --git a/doc/bin/fvwm-convert-2.6.adoc b/doc/fvwm-convert-2.6.adoc similarity index 100% rename from doc/bin/fvwm-convert-2.6.adoc rename to doc/fvwm-convert-2.6.adoc diff --git a/doc/bin/fvwm-menu-desktop.adoc b/doc/fvwm-menu-desktop.adoc similarity index 100% rename from doc/bin/fvwm-menu-desktop.adoc rename to doc/fvwm-menu-desktop.adoc diff --git a/doc/bin/fvwm-root.adoc b/doc/fvwm-root.adoc similarity index 100% rename from doc/bin/fvwm-root.adoc rename to doc/fvwm-root.adoc diff --git a/doc/fvwm3.adoc b/doc/fvwm3.adoc new file mode 100644 index 000000000..8e1e7d2a1 --- /dev/null +++ b/doc/fvwm3.adoc @@ -0,0 +1,7 @@ += FVWM3(1) + +== NAME + +fvwm3 - F? Virtual Window Manager for X11 + +include::fvwm3_manpage_source.adoc[] diff --git a/doc/fvwm3/fvwm3.adoc b/doc/fvwm3_manpage_source.adoc similarity index 99% rename from doc/fvwm3/fvwm3.adoc rename to doc/fvwm3_manpage_source.adoc index deed1e7d0..31a4fbcb2 100644 --- a/doc/fvwm3/fvwm3.adoc +++ b/doc/fvwm3_manpage_source.adoc @@ -1,9 +1,3 @@ -= FVWM3(1) - -== NAME - -fvwm3 - F? Virtual Window Manager for X11 - == SYNOPSIS *fvwm3* [*-c* _config-command_] [*-d* _displayname_] [*-f* @@ -1757,29 +1751,14 @@ confuse some programs. For example, the xwd program refuses to make screen shots when run from a complex function. To achieve the same functionality you can use the *Read* or *PipeRead* command instead. -== LIST OF FVWM COMMANDS +ifdef::fvwm3[] +== MENU CONCEPTS AND COMMANDS -The command descriptions below are grouped together in the following -sections. The sections are hopefully sorted in order of usefulness to -the newcomer. - -* *Menu commands* -* *Miscellaneous commands* -* *Commands affecting window movement and placement* -* *Commands for focus and mouse movement* -* *Commands controlling window state* -* *Commands for mouse and key bindings* -* *The Style command (controlling window styles)* -* *Other commands controlling window styles* -* *Commands controlling the virtual desktop* -* *Commands for user functions and shell commands* -* *Conditional commands* -* *Module commands* -* *Quit, restart and session management commands* -* *Colorsets* -* *Color gradients* - -=== Menus +Please refer to the fvwm3menus man page. +endif::[] +ifdef::fvwm3all[] +// BEGIN 'menus' +== MENUS Before a menu can be opened, it has to be populated with menu items using the *AddToMenu* command and bound to a key or mouse button with @@ -1793,29 +1772,28 @@ generating menus dynamically and many other features. Please refer to the *MenuStyle* command to learn more. *Types of Menus*:: -In fvwm there are four slightly different types of menus: +There are four slightly different types of menus: + -*Popup* menus can appear everywhere on the screen on their own or +Popup menus can appear everywhere on the screen on their own or attached to a part of a window. The *Popup* 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. + -*Menu* is a very similar command, but the menus it opens are slightly -less transient. When invoked by clicking a mouse button, it stays open -and can be navigated with no button held. But if it is invoked by a +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. +menu. The *Menu* command creates normal menus. + -_Tear off menus_ or _Pin up menus_ are menus from either of the above -two commands that have been "torn off" their original context and -pinned on the desktop like a normal window. They are created from +"Sub menus" are menus inside other menus. When a menu item that has the +*Popup* 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. ++ +"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 *TearMenuOff* command from inside a menu. -+ -_Sub menus_ are menus inside menus. When a menu item that has the -*Popup* command as its action is selected, the named menu is opened as -an inferior menu to the parent. Any type of menu can have sub menus. *Menu Anatomy*:: Menus consist of any number of titles which are inactive menu items @@ -1835,9 +1813,9 @@ Finally, there may be a picture running up either side of the menu (a "side bar"). *Menu Navigation*:: -Menus can be navigated either with the keyboard or with the mouse. -Many people prefer to use the mouse, but it can be rather tedious. -Once you get the hang of it, keyboard navigation can be much faster. +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 *Tear Off Menus* section for @@ -2057,6 +2035,7 @@ To create a tear off menu without opening the normal menu first, the option _TearOffImmediately_ can be added to the *Menu* or *Popup* command. +=== Building menu contents *AddToMenu* _menu-name_ [_menu-label_ _action_]:: Begins or adds to a menu definition. Typically a menu definition looks like this: @@ -2273,15 +2252,6 @@ with blue the region of the menu containing the picture. In all the above cases, the name of the resulting menu is name specified, stripped of the substrings between the various delimiters. -*ChangeMenuStyle* _menustyle_ _menu_ ...:: -Changes the menu style of _menu_ to _menustyle_. You may specify more -than one menu in each call of *ChangeMenuStyle*. - -*CopyMenuStyle* _orig-menustyle_ _dest-menustyle_:: -Copy _orig-menustyle_ to _dest-menustyle_, where _orig-menustyle_ is -an existing menu style. If the menu style _dest_menustyle_ does not -exist, then it is created. - *DestroyMenu* [recreate] _menu_:: 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 @@ -2293,14 +2263,10 @@ but to throw away all the menu items (including the title). DestroyMenu Utilities .... -*DestroyMenuStyle* _menustyle_:: -Deletes the menu style named _menustyle_ and changes all menus using -this style to the default style, you cannot destroy the default menu -style. -+ -.... -DestroyMenuStyle pixmap1 -.... +*Title*:: + Does nothing. It is used to insert a title line in a popup or menu. + +=== Commands that open menus *Menu* _menu-name_ [_position_] [_double-click-action_]:: Causes a previously defined menu to be popped up in a sticky manner. @@ -2324,7 +2290,7 @@ 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 _position_ arguments consist of several parts: + -{empty}[_context-rectangle_] _x_ _y_ [_special-options_] +{empty}[_context-rectangle_] _x_ _y_ [_special options_] + The _context-rectangle_ can be one of: + @@ -2343,7 +2309,8 @@ _Interior_::: _Title_::: the title of the context window or icon. + -__Button__::: +_Button_::: + button of the context window. + _Icon_::: the icon of the context window. @@ -2361,8 +2328,8 @@ _This_::: whatever widget the pointer is on (e.g. a corner of a window or the root window). + -_Rectangle_ <__geometry__>::: - the rectangle defined by <__geometry__> in X geometry format. Width +_Rectangle_ <_geometry_>::: + the rectangle defined by <_geometry_> in X geometry format. Width and height default to 1 if omitted. If the context-rectangle is omitted or illegal (e.g. "item" on a @@ -2375,11 +2342,11 @@ interpreted as a percentage of the context rectangle's width (height), but with a trailing '_m_' the menu's width (height) is used instead. Furthermore a trailing '_p_' changes the interpretation to mean pixels. - ++ 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. - ++ If _x_ or _y_ are prefixed with "'__o__" 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 @@ -2391,9 +2358,9 @@ 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". - ++ A prefix of '_c_' is equivalent to "o50". Examples: - ++ .... # window list in the middle of the screen WindowList Root c c @@ -2417,48 +2384,165 @@ AddToMenu foobar-menu AddToMenu foobar-menu + "first item" Popup "another menu" item +0 -100m .... - - ++ 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. - -The _special-options_: - ++ +_Special options_::: ++ To create a tear off menu without opening the normal menu, add the option _TearOffImmediately_. 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: - ++ .... # Forbid fvwm to place the menu window Style UsePPosition # Menu at top left corner of screen Menu Root 0p 0p TearOffImmediately .... - - ++ The _Animated_ and _Mwm_ or _Win_ menu styles may move a menu somewhere else on the screen. If you do not want this you can add _Fixed_ as an option. This might happen for example if you want the menu always in the top right corner of the screen. - ++ 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 _SelectInPlace_ option. If you want the pointer on the title of the menu, use _SelectWarp_ too. Note that these options apply only if the _PopupAsRootMenu_ *MenuStyle* option is used. - ++ 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 (_fvwm_ menu style) or never warped to the title at all (_Mwm_ or _Win_ menu styles). You can force (forbid) warping whenever the sub menu is opened with the _WarpTitle_ (_NoWarp_) option. - ++ Note that the _special-options_ do work with a normal menu that has no other position arguments. + +*Popup* _PopupName_ [_position_] [_default-action_]:: + 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 _position_ arguments are the same as for + *Menu*. The command _default-action_ 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). ++ +To bind a previously defined pop-up menu to a key or mouse button: ++ +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). ++ + +.... +Mouse 2 FST N Popup "Window Ops" +Mouse 3 FST N Popup "Window Ops" +.... + ++ +Pop-ups can be bound to keys through the use of the *Key* 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. ++ +To bind a previously defined pop-up menu to another menu, for use as a +sub menu: ++ +The following example defines a sub menu "Quit-Verify" and binds it +into a main menu, called "RootMenu": ++ + +.... +AddToMenu Quit-Verify + + "Really Quit Fvwm?" Title + + "Yes, Really Quit" Quit + + "Restart Fvwm" Restart + + "Restart Fvwm 1.xx" Restart fvwm1 -s + + "" Nop + + "No, Don't 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 \ + $HOME/.Xdefaults + + "" Nop + + "" Nop + + Quit Popup Quit-Verify +.... + ++ +Popup differs from *Menu* 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. *Menu* menus stay up on a click action. See the *Menu* 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. + +*TearMenuOff*:: +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: ++ +.... +AddToMenu WindowMenu ++ I "" TearMenuOff + +AddToMenu RootMenu ++ I "click here to tear me off" TearMenuOff +.... + +=== Menu style commands + +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 taht use +it. (If a menu style is used from within a menu, the changes are +applied the next time an affected menu is opened.) + +*ChangeMenuStyle* _menustyle_ _menu_ ...:: +Changes the menu style of _menu_ to _menustyle_. You may specify more +than one menu in each call of *ChangeMenuStyle*. + +*CopyMenuStyle* _orig-menustyle_ _dest-menustyle_:: +Copy _orig-menustyle_ to _dest-menustyle_, where _orig-menustyle_ is +an existing menu style. If the menu style _dest_menustyle_ does not +exist, then it is created. + +*DestroyMenuStyle* _menustyle_:: +Deletes the menu style named _menustyle_ and changes all menus using +this style to the default style, you cannot destroy the default menu +style. ++ +.... +DestroyMenuStyle pixmap1 +.... + *MenuStyle* _stylename_ [_options_]:: Sets a new menu style or changes a previously defined style. The _stylename_ is the style name; if it contains spaces or tabs it has to @@ -2467,7 +2551,7 @@ default menu style is used for every menu-like object (e.g. the window created by the *WindowList* command) that had not be assigned a style using the *ChangeMenuStyle*. See also *DestroyMenuStyle*. When using monochrome color options are ignored. - ++ _options_ is a comma separated list containing some of the keywords Fvwm / Mwm / Win, BorderWidth, Foreground, Background, Greyed, HilightBack / !HilightBack, HilightTitleBack, ActiveFore / @@ -2485,20 +2569,20 @@ VerticalMargins, VerticalTitleSpacing, AutomaticHotkeys / !AutomaticHotkeys, UniqueHotkeyActivatesImmediate / !UniqueHotkeyActivatesImmediate, MouseWheel, ScrollOffPage / !ScrollOffPage, TrianglesUseFore / !TrianglesUseFore. - ++ In the above list some options are listed as option pairs or triples with a '/' 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. - ++ Some options are now negated by prefixing ! to the option. This is the preferred form for all such options. The other negative forms are now deprecated and will be removed in the future. - ++ This is a list of MenuStyle deprecated negative options: ActiveForeOff, AnimationOff, AutomaticHotkeysOff, HilightBackOff, TitleWarpOff - ++ _Fvwm_, _Mwm_, _Win_ reset all options to the style with the same name in former versions of fvwm. The default for new menu styles is _Fvwm_ style. These options override all others except _Foreground_, @@ -2506,33 +2590,33 @@ _Background_, _Greyed_, _HilightBack_, _ActiveFore_ and _PopupDelay_, 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. - ++ _Mwm_ and _Win_ style menus popup sub menus automatically. _Win_ menus indicate the current menu item by changing the background to dark. _Fvwm_ sub menus overlap the parent menu, _Mwm_ and _Win_ style menus never overlap the parent menu. - ++ _Fvwm_ style is equivalent to !HilightBack, Hilight3DThin, !ActiveFore, !Animation, Font, MenuFace, PopupOffset 0 67, TitleWarp, TitleUnderlines1, SeparatorsShort, TrianglesRelief, PopupDelayed, PopdownDelayed, PopupDelay 150, PopdownDelay 150, PopupAsSubmenu, HoldSubmenus, SubmenusRight, BorderWidth 2, !AutomaticHotkeys, UniqueHotkeyActivatesImmediate, PopupActiveArea 75. - ++ _Mwm_ style is equivalent to !HilightBack, Hilight3DThick, !ActiveFore, !Animation, Font, MenuFace, PopupOffset -3 100, !TitleWarp, TitleUnderlines2, SeparatorsLong, TrianglesRelief, PopupImmediately, PopdownDelayed, PopdownDelay 150, PopupAsSubmenu, HoldSubmenus, SubmenusRight, BorderWidth 2, UniqueHotkeyActivatesImmediate, !AutomaticHotkeys, PopupActiveArea 75. - ++ _Win_ style is equivalent to HilightBack, Hilight3DOff, ActiveFore, !Animation, Font, MenuFace, PopupOffset -5 100, !TitleWarp, TitleUnderlines1, SeparatorsShort, TrianglesSolid, PopupImmediately, PopdownDelayed, PopdownDelay 150, PopupAsSubmenu, RemoveSubmenus, SubmenusRight, BorderWidth 2, UniqueHotkeyActivatesImmediate, !AutomaticHotkeys, PopupActiveArea 75. - ++ _BorderWidth_ takes the thickness of the border around the menus in pixels. It may be zero to 50 pixels. The default is 2. Using an illegal value reverts the border width to the default. @@ -2540,13 +2624,13 @@ illegal value reverts the border width to the default. _Foreground_ and _Background_ may have a color name as an argument. This color is used for menu text or the menu's background. You can omit the color name to reset these colors to the built-in default. - ++ _Greyed_ may have a color name as an argument. This color is the one used to draw a menu-selection which is prohibited (or not recommended) by the Mwm hints which an application has specified. If the color is omitted the color of greyed menu entries is based on the background color of the menu. - ++ _HilightBack_ and _!HilightBack_ switch hilighting the background of the selected menu item on and off. A specific background color may be used by providing the color name as an argument to _HilightBack_. If @@ -2554,19 +2638,19 @@ you use this option without an argument the color is based on the menu's background color. The _ActiveColorset_ option overrides the specified color. If the colorset has a non solid background it is used for the hilighting. - ++ _HilightTitleBack_ switches hilighting the background of menu titles on. If a _TitleColorset_ was used, the background colour is taken from there. Otherwise the color is based on the menu's background color. If the colorset has a non solid background it is used for the hilighting. - ++ _ActiveFore_ and _!ActiveFore_ switch hilighting the foreground of the selected menu item on and off. A specific foreground color may be used by providing the color name as an argument to _ActiveFore_. Omitting the color turns hilighting on when an _ActiveColorset_ is used. _ActiveFore_ turns off hilighting the foreground completely. The _ActiveColorset_ option overrides the specified color. - ++ _MenuColorset_ controls if a colorset is used instead of the _Foreground_, _Background_ and _MenuFace_ menu styles. If the _MenuColorset_ keyword is followed by a number equal to zero or @@ -2580,7 +2664,7 @@ for memory consumption and may use less memory than the background from a colorset. The shape mask from the colorset is used to shape the menu. Please refer to the *Colorsets* section for details about colorsets. - ++ _ActiveColorset_ works exactly like _MenuColorset_, but the foreground from the colorset replaces the color given with the _ActiveFore_ menu style and the colorset's background color replaces the color given @@ -2590,80 +2674,80 @@ 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 _!ActiveFore_ or _!HilightBack_ menu styles. - ++ _GreyedColorset_ works exactly like _MenuColorset_, but the foreground from the colorset replaces the color given with the _Greyed_ menu style. No other parts of the colorset are used. - ++ _TitleColorset_ works exactly like _MenuColorset_, but is used only for menu titles. - ++ _Hilight3DThick_, _Hilight3DThin_ and _Hilight3DOff_ determine if the selected menu item is hilighted with a 3D relief. Thick reliefs are two pixels wide, thin reliefs are one pixel wide. - ++ _Hilight3DThickness_ 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. - ++ _Animation_ and _!Animation_ 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. - ++ _Font_ and _TitleFont_ 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 _TitleFont_ is given, it is used for all menu titles instead of the normal font. - ++ _MenuFace_ enforces a fancy background upon the menus. You can use the same options for _MenuFace_ as for the *ButtonStyle*. See description of *ButtonStyle* command and the *Color Gradients* sections for more information. If you use _MenuFace_ without arguments the style is reverted back to normal. - ++ Some examples of MenuFaces are: - ++ .... MenuFace DGradient 128 2 lightgrey 50 blue 50 white MenuFace TiledPixmap texture10.xpm MenuFace HGradient 128 2 Red 40 Maroon 60 White MenuFace Solid Maroon .... - ++ Note: The gradient styles H, V, B and D are optimized for high speed and low memory consumption in menus. This is not the case for all the other gradient styles. They may be slow and consume huge amounts of memory, so if you encounter performance problems with them you may be better off by not using them. To improve performance you can try one or all of the following: - ++ Turn hilighting of the active menu item other than foreground color off: - ++ .... MenuStyle