1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!-- $Id: MenuStyle.xml,v 1.5 2007/08/17 15:54:58 domivogt Exp $ -->
3 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
4 "../docbook-xml/docbookx.dtd"
6 <!ENTITY % myents SYSTEM "../fvwm.ent" >
11 <section id='MenuStyle'>
12 <title>MenuStyle</title>
15 <command>MenuStyle</command
17 ><replaceable>stylename</replaceable
20 ><replaceable>options</replaceable
24 <para>Sets a new menu style or changes a previously defined style. The
25 <replaceable>stylename</replaceable>
26 is the style name; if it contains spaces or tabs it has to be
27 quoted. The name "*" is reserved for the default menu style. The
28 default menu style is used for every menu-like object (e.g. the
30 <fvwmref cmd="WindowList"/>
31 command) that had not be assigned a style using the
32 <fvwmref cmd="ChangeMenuStyle"/>.
34 <fvwmref cmd="DestroyMenuStyle"/>.
35 When using monochrome color options are ignored.</para>
37 <para><replaceable>options</replaceable>
38 is a comma separated list containing some of the keywords
44 HilightBack / !HilightBack,
46 ActiveFore / !ActiveFore,
51 Hilight3DThick / Hilight3DThin / Hilight3DOff,
53 Animation / !Animation,
59 TitleWarp / !TitleWarp,
60 TitleUnderlines0 / TitleUnderlines1 / TitleUnderlines2,
61 SeparatorsLong / SeparatorsShort,
62 TrianglesSolid / TrianglesRelief,
63 PopupImmediately / PopupDelayed,
64 PopdownImmediately / PopdownDelayed,
69 PopupAsRootMenu / PopupAsSubmenu / PopupIgnore / PopupClose,
70 RemoveSubmenus / HoldSubmenus,
71 SubmenusRight / SubmenusLeft,
76 AutomaticHotkeys / !AutomaticHotkeys,
78 ScrollOffPage / !ScrollOffPage,
79 TrianglesUseFore / !TrianglesUseFore.</para>
81 <para>In the above list some options are listed as option pairs or
82 triples with a '/' in between. These options exclude each other.
83 All paired options can be negated to have the effect of the
84 counterpart option by prefixing ! to the option.</para>
86 <para>Some options are now negated by prefixing ! to the option. This
87 is the preferred form for all such options. The other negative
88 forms are now deprecated and will be removed in the future.</para>
90 <para>This is a list of MenuStyle deprecated negative options:
91 ActiveForeOff, AnimationOff, AutomaticHotkeysOff, HilightBackOff,
95 <fvwmopt cmd="MenuStyle" opt="Fvwm"/>,
96 <fvwmopt cmd="MenuStyle" opt="Mwm"/>,
97 <fvwmopt cmd="MenuStyle" opt="Win"/>
98 reset all options to the style with the same name in former
99 versions of fvwm. The default for new menu styles is
100 <emphasis remap='I'>Fvwm</emphasis>
101 style. These options override all others except
102 <emphasis remap='I'>Foreground</emphasis>, <emphasis remap='I'>Background</emphasis>, <emphasis remap='I'>Greyed</emphasis>, <emphasis remap='I'>HilightBack</emphasis>,
103 <emphasis remap='I'>ActiveFore</emphasis> and <emphasis remap='I'>PopupDelay</emphasis>,
104 so they should be used only as the first option specified for a
105 menu style or to reset the style to defined behavior. The same
106 effect can be created by setting all the other options one by one.</para>
108 <para><emphasis remap='I'>Mwm</emphasis> and <emphasis remap='I'>Win</emphasis>
109 style menus popup sub menus automatically.
110 <emphasis remap='I'>Win</emphasis>
111 menus indicate the current menu item by changing the background to
113 <emphasis remap='I'>Fvwm</emphasis>
114 sub menus overlap the parent menu,
115 <emphasis remap='I'>Mwm</emphasis> and <emphasis remap='I'>Win</emphasis>
116 style menus never overlap the parent menu.</para>
118 <para><emphasis remap='I'>Fvwm</emphasis>
119 style is equivalent to !HilightBack, Hilight3DThin,
121 !Animation, Font, MenuFace, PopupOffset 0 67,
122 TitleWarp, TitleUnderlines1, SeparatorsShort, TrianglesRelief,
123 PopupDelayed, PopdownDelayed, PopupDelay 150, PopdownDelay 150,
124 PopupAsSubmenu, HoldSubmenus,
125 SubmenusRight, BorderWidth 2, !AutomaticHotkeys,
126 PopupActiveArea 75.</para>
128 <para><emphasis remap='I'>Mwm</emphasis>
129 style is equivalent to !HilightBack, Hilight3DThick,
131 !Animation, Font, MenuFace, PopupOffset -3 100,
132 !TitleWarp, TitleUnderlines2, SeparatorsLong, TrianglesRelief,
133 PopupImmediately, PopdownDelayed, PopdownDelay 150,
134 PopupAsSubmenu, HoldSubmenus, SubmenusRight, BorderWidth 2,
135 !AutomaticHotkeys, PopupActiveArea 75.</para>
137 <para><emphasis remap='I'>Win</emphasis>
138 style is equivalent to HilightBack, Hilight3DOff, ActiveFore,
139 !Animation, Font, MenuFace, PopupOffset -5 100, !TitleWarp,
140 TitleUnderlines1, SeparatorsShort, TrianglesSolid,
141 PopupImmediately, PopdownDelayed, PopdownDelay 150,
142 PopupAsSubmenu, RemoveSubmenus, SubmenusRight, BorderWidth 2,
143 !AutomaticHotkeys, PopupActiveArea 75.</para>
146 <fvwmopt cmd="MenuStyle" opt="BorderWidth"/>
147 takes the thickness of the border around the menus in pixels. It
148 may be zero to 50 pixels. The default is 2. Using an illegal
149 value reverts the border width to the default.</para>
152 <fvwmopt cmd="MenuStyle" opt="Foreground"/> and
153 <fvwmopt cmd="MenuStyle" opt="Background"/>
154 may have a color name as an argument. This color is used for menu
155 text or the menu's background. You can omit the color name to
156 reset these colors to the built-in default.</para>
159 <fvwmopt cmd="MenuStyle" opt="Greyed"/>
160 may have a color name as an argument. This color is the one used
161 to draw a menu-selection which is prohibited (or not recommended)
162 by the Mwm hints which an application has specified. If the color
163 is omitted the color of greyed menu entries is based on the
164 background color of the menu.</para>
167 <fvwmopt cmd="MenuStyle" opt="HilightBack"/> and
168 <emphasis remap='I'>!HilightBack</emphasis>
169 switch hilighting the background of the selected menu item on and
170 off. A specific background color may be used by providing the
171 color name as an argument to
172 <emphasis remap='I'>HilightBack</emphasis>.
173 If you use this option without an argument the color is based on
174 the menu's background color. The
175 <emphasis remap='I'>ActiveColorset</emphasis>
176 option overrides the specified color. If the colorset has a
177 non solid background it is used for the hilighting.</para>
180 <fvwmopt cmd="MenuStyle" opt="HilightTitleBack"/>
181 switches hilighting the background of menu titles on. If a
182 <emphasis remap='I'>TitleColorset</emphasis>
183 was used, the background colour is taken from there. Otherwise
184 the color is based on the menu's background color. If the colorset
185 has a non solid background it is used for the hilighting.</para>
188 <fvwmopt cmd="MenuStyle" opt="ActiveFore"/> and
189 <emphasis>!ActiveFore</emphasis>
190 switch hilighting the foreground of the selected menu item on and
191 off. A specific foreground color may be used by providing the
192 color name as an argument to
193 <emphasis remap='I'>ActiveFore</emphasis>.
194 Omitting the color turns hilighting on when an
195 <emphasis remap='I'>ActiveColorset</emphasis>
197 <emphasis remap='I'>ActiveFore</emphasis>
198 turns off hilighting the foreground completely. The
199 <emphasis remap='I'>ActiveColorset</emphasis>
200 option overrides the specified color.</para>
203 <fvwmopt cmd="MenuStyle" opt="MenuColorset"/>
204 controls if a colorset is used instead of the
205 <emphasis remap='I'>Foreground</emphasis>, <emphasis remap='I'>Background</emphasis> and <emphasis remap='I'>MenuFace</emphasis>
207 <emphasis remap='I'>MenuColorset</emphasis>
208 keyword is followed by a number equal to zero or greater, this
209 number is taken as the number of the colorset to use. If the
210 number is omitted, the colorset is switched off and the regular
211 menu styles are used again. The foreground and background colors
212 of the menu items are replaced by the colors from the colorset. If
213 the colorset has a pixmap defined, this pixmap is used as the
214 background of the menu. Note that the
215 <emphasis remap='I'>MenuFace</emphasis>
216 menu style has been optimized for memory consumption and may use
217 less memory than the background from a colorset. The shape mask
218 from the colorset is used to shape the menu. Please refer to the
219 <fvwmref sect="colorsets" opt="colorsets" name="Colorsets"/>
220 section for details about colorsets.</para>
223 <fvwmopt cmd="MenuStyle" opt="ActiveColorset"/>
225 <emphasis remap='I'>MenuColorset</emphasis>,
226 but the foreground from the colorset replaces the color given with
228 <emphasis remap='I'>ActiveFore</emphasis>
229 menu style and the colorset's background color replaces the color
231 <emphasis remap='I'>HilightBack</emphasis>
232 command (to turn on background hilighting you have to use the
233 <emphasis remap='I'>HilightBack</emphasis>
234 menu style too). If specified, the hilight and shadow colors
235 from the colorset are used too. The pixmap and shape mask from
236 the colorset are not used. Hilighting the background or
237 foreground can be turned off individually with the
238 <emphasis remap='I'>!ActiveFore</emphasis> or <emphasis remap='I'>!HilightBack</emphasis>
242 <fvwmopt cmd="MenuStyle" opt="GreyedColorset"/>
244 <emphasis remap='I'>MenuColorset</emphasis>,
245 but the foreground from the colorset replaces the color given with
247 <emphasis remap='I'>Greyed</emphasis>
248 menu style. No other parts of the colorset are used.</para>
251 <fvwmopt cmd="MenuStyle" opt="TitleColorset"/>
253 <emphasis remap='I'>MenuColorset</emphasis>,
254 but is used only for menu titles.</para>
257 <fvwmopt cmd="MenuStyle" opt="Hilight3DThick"/>,
258 <fvwmopt cmd="MenuStyle" opt="Hilight3DThin"/> and
259 <fvwmopt cmd="MenuStyle" opt="Hilight3DOff"/>
260 determine if the selected menu item is hilighted with a 3D
261 relief. Thick reliefs are two pixels wide, thin reliefs are one
265 <fvwmopt cmd="MenuStyle" opt="Hilight3DThickness"/>
266 takes one numeric argument that may be between -50 and +50
267 pixels. With negative values the menu item gets a pressed in look.
268 The above three commands are equivalent to a thickness of 2, 1 and
272 <fvwmopt cmd="MenuStyle" opt="Animation"/> and
273 <emphasis remap='I'>!Animation</emphasis>
274 turn menu animation on or off. When animation is on, sub menus
275 that do not fit on the screen cause the parent menu to be shifted
276 to the left so the sub menu can be seen.</para>
279 <fvwmopt cmd="MenuStyle" opt="Font"/> and
280 <fvwmopt cmd="MenuStyle" opt="TitleFont"/>
281 take a font name as an argument. If a font by this name exists
282 it is used for the text of all menu items. If it does not exist
283 or if the name is left blank the built-in default is used. If a
284 <emphasis remap='I'>TitleFont</emphasis>
285 is given, it is used for all menu titles instead of the normal font.</para>
288 <fvwmopt cmd="MenuStyle" opt="MenuFace"/>
289 enforces a fancy background upon the menus. You can use the same
291 <emphasis remap='I'>MenuFace</emphasis>
293 <fvwmref cmd="ButtonStyle"/>.
295 <fvwmref cmd="ButtonStyle"/>
298 <fvwmref sect="colorGradients" opt="color_gradients" name="Color Gradients"/>
299 sections for more information. If you use
300 <emphasis remap='I'>MenuFace</emphasis>
301 without arguments the style is reverted back to normal.</para>
303 <para>Some examples of MenuFaces are:</para>
307 MenuFace DGradient 128 2 lightgrey 50 blue 50 white
308 MenuFace TiledPixmap texture10.xpm
309 MenuFace HGradient 128 2 Red 40 Maroon 60 White
310 MenuFace Solid Maroon
313 <para>Note: The gradient styles H, V, B and D are optimized for high
314 speed and low memory consumption in menus. This is not the case
315 for all the other gradient styles. They may be slow and consume
316 huge amounts of memory, so if you encounter performance problems
317 with them you may be better off by not using them. To improve
318 performance you can try one or all of the following:</para>
320 <para>Turn hilighting of the active menu item other than foreground
324 MenuStyle <style> Hilight3DOff, !HilightBack
325 MenuStyle <style> ActiveFore <preferred color>
328 <para>Make sure sub menus do not overlap the parent menu. This can
329 prevent menus being redrawn every time a sub menu pops up or down.</para>
332 MenuStyle <style> PopupOffset 1 100
335 <para>Run your X server with backing storage. If your X Server is
336 started with the -bs option, turn it off. If not try the -wm
337 and +bs options:</para>
339 <command>startx -- -wm +bs</command>
341 <para>You may have to adapt this example to your system (e.g. if you use
342 xinit to start X).</para>
345 <fvwmopt cmd="MenuStyle" opt="PopupDelay"/>
346 requires one numeric argument. This value is the delay in
347 milliseconds before a sub menu is popped up when the pointer moves
348 over a menu item that has a sub menu. If the value is zero no
349 automatic pop up is done. If the argument is omitted the built-in
350 default is used. Note that the popup delay has no effect if the
351 <emphasis remap='I'>PopupImmediately</emphasis>
352 option is used since sub menus pop up immediately then.</para>
355 <fvwmopt cmd="MenuStyle" opt="PopupImmediately"/>
356 makes menu items with sub menus pop up it up as soon as the
357 pointer enters the item. The
358 <emphasis remap='I'>PopupDelay option</emphasis>
360 <emphasis remap='I'>PopupDelayed</emphasis>
361 is used fvwm looks at the
362 <emphasis remap='I'>PopupDelay</emphasis>
363 option if or when this automatic popup happens.</para>
366 <fvwmopt cmd="MenuStyle" opt="PopdownDelay"/>
368 <emphasis remap='I'>PopupDelay</emphasis>
369 but determines the timeout of the
370 <emphasis remap='I'>PopupDelayed</emphasis>
374 <fvwmopt cmd="MenuStyle" opt="PopdownImmediately"/>
375 makes sub menus vanish as soon as the pointer leaves the sub menu
376 and the correspondent item in the parent menu. With the opposite
378 <emphasis remap='I'>PopdownDelayed</emphasis>
379 the sub menu only pops down after the time specified with the
380 <emphasis remap='I'>PopdownDelay</emphasis>
381 option. This comes handy when the pointer often strays off the
382 menu item when trying to move into the sub menu. Whenever there
383 is a conflict between the
384 <emphasis remap='I'>PopupImmediately</emphasis>, <emphasis remap='I'>PopupDelayed</emphasis>, <emphasis remap='I'>PopupDelay</emphasis>
386 <emphasis remap='I'>PopdownImmediately</emphasis>, <emphasis remap='I'>PopdownDelayed</emphasis>, <emphasis remap='I'>PopdownDelay</emphasis>
388 <emphasis remap='I'>Popup...</emphasis>
389 styles win when using mouse navigation and the
390 <emphasis remap='I'>Popdown...</emphasis>
391 styles win when navigating with the keyboard.</para>
394 <fvwmopt cmd="MenuStyle" opt="PopupOffset"/>
395 requires two integer arguments. Both values affect where sub
396 menus are placed relative to the parent menu. If both values are
397 zero, the left edge of the sub menu overlaps the left edge of the
398 parent menu. If the first value is non-zero the sub menu is
399 shifted that many pixels to the right (or left if negative). If
400 the second value is non-zero the menu is moved by that many
401 percent of the parent menu's width to the right or left.</para>
404 <fvwmopt cmd="MenuStyle" opt="PopupActiveArea"/>
405 requires an integer value between 51 and 100. Normally, when the
406 pointer is over a menu item with a sub menu and the pointer enters
407 the area that starts at 75% of the menu width, the sub menu is
408 shown immediately. This percentage can be changed with
409 <emphasis remap='I'>PopupActiveArea</emphasis>.
410 Setting this value to 100 disables this kind of automatic popups
411 altogether. The default value is restored if no or an illegal
412 value is given.</para>
415 <fvwmopt cmd="MenuStyle" opt="TitleWarp"/> and <emphasis remap='I'>!TitleWarp</emphasis>
416 affect if the pointer warps to the menu title when a sub menu is
417 opened or not. Note that regardless of this setting the pointer is
418 not warped if the menu does not pop up under the pointer.</para>
421 <fvwmopt cmd="MenuStyle" opt="TitleUnderlines0"/>,
422 <fvwmopt cmd="MenuStyle" opt="TitleUnderlines1"/> and
423 <fvwmopt cmd="MenuStyle" opt="TitleUnderlines2"/>
424 specify how many lines are drawn below a menu title.</para>
427 <fvwmopt cmd="MenuStyle" opt="SeparatorsLong"/> and
428 <fvwmopt cmd="MenuStyle" opt="SeparatorsShort"/>
429 set the length of menu separators. Long separators run from the
430 left edge all the way to the right edge. Short separators leave a
431 few pixels to the edges of the menu.</para>
434 <fvwmopt cmd="MenuStyle" opt="TrianglesSolid"/> and
435 <fvwmopt cmd="MenuStyle" opt="TrianglesRelief"/>
436 affect how the small triangles for sub menus is drawn. Solid
437 triangles are filled with a color while relief triangles are
441 <fvwmopt cmd="MenuStyle" opt="DoubleClickTime"/>
442 requires one numeric argument. This value is the time in
443 milliseconds between two mouse clicks in a menu to be considered
444 as a double click. The default is 450 milliseconds. If the
445 argument is omitted the double click time is reset to this
449 <fvwmopt cmd="MenuStyle" opt="SidePic"/>
450 takes the name of an image file as an argument. The
451 picture is drawn along the left side of the menu. The
452 <emphasis remap='I'>SidePic</emphasis>
453 option can be overridden by a menu specific side pixmap (see
454 <fvwmref cmd="AddToMenu"/>).
455 If the file name is omitted an existing side pixmap is removed from
456 the menu style.</para>
459 <fvwmopt cmd="MenuStyle" opt="SideColor"/>
460 takes the name of an X11 color as an argument. This color is used
461 to color the column containing the side picture (see
462 above). The SideColor option can be overridden by a menu specific
464 <fvwmref cmd="AddToMenu"/>).
465 If the color name is omitted the side color option is switched off.</para>
468 <fvwmopt cmd="MenuStyle" opt="PopupAsRootMenu"/>,
469 <fvwmopt cmd="MenuStyle" opt="PopupAsSubmenu"/>,
470 <fvwmopt cmd="MenuStyle" opt="PopupIgnore"/> and
471 <fvwmopt cmd="MenuStyle" opt="PopupClose"/>
472 change the behavior when you click on a menu item that opens a
474 <emphasis remap='I'>PopupAsRootMenu</emphasis>
475 the original menu is closed before the sub menu appears, with
476 <emphasis remap='I'>PopupAsSubmenu</emphasis>
477 it is not, so you can navigate back into the
478 parent menu. Furthermore, with
479 <emphasis remap='I'>PopupAsSubmenu</emphasis>
480 the sub menu is held open (posted) regardless of where you move
481 the mouse. Depending on your menu style this may simplify
482 navigating through the menu. <fvwmref cmd="Any"/> keystroke while a menu is posted
483 reverts the menu back to the normal behavior. With
484 <emphasis remap='I'>PopupClose</emphasis>
485 the menu is closed when a sub menu item is activated, and the menu
487 <emphasis remap='I'>PopupIgnore</emphasis>
488 is used (even if the menu was invoked with the
489 <fvwmref cmd="Popup"/>
491 <emphasis remap='I'>PopupAsSubmenu</emphasis>
492 is the default.</para>
495 <fvwmopt cmd="MenuStyle" opt="RemoveSubmenus"/>
496 instructs fvwm to remove sub menu when you move back into the
498 <fvwmopt cmd="MenuStyle" opt="HoldSubmenus"/>
499 the sub menu remains visible. You probably want to use
500 <emphasis remap='I'>HoldSubmenus</emphasis>
502 <emphasis remap='I'>PopupDelayed</emphasis>
504 <emphasis remap='I'>RemoveSubmenus</emphasis>
505 affects menu navigation with the keyboard.</para>
508 <fvwmopt cmd="MenuStyle" opt="SelectOnRelease"/>
509 takes an optional key name as an argument. If the given key is
510 released in a menu using this style, the current menu item is
511 selected. This is intended for
512 <keysym>Alt-Tab</keysym>
513 <fvwmref cmd="WindowList"/>
515 The key name is a standard X11 key name as defined in
516 <filename>/usr/include/X11/keysymdef.h</filename>,
518 <emphasis remap='I'>XK_</emphasis>
519 prefix), or the keysym database
520 <filename>/usr/X11R6/lib/X11/XKeysymDB</filename>.
521 To disable this behavior, omit
524 <para>Note: Some X servers do not support KeyRelease events.
525 <emphasis remap='I'>SelectOnRelease</emphasis>
526 does not work on such a machine.</para>
529 <fvwmopt cmd="MenuStyle" opt="ItemFormat"/>
530 takes a special string as its argument that determines the layout
531 of the menu items. Think of the format string as if it were a
532 menu item. All you have to do is tell fvwm where to place the
533 different parts of the menu item (i.e. the labels, the triangle
534 denoting a sub menu, the mini icons and the side pic) in the blank
535 area. The string consists of spaces,
537 characters and formatting directives beginning with '%'. Any
538 illegal characters and formatting directives are silently ignored:</para>
540 <!-- possible use a variablelist instead -->
542 <tgroup cols='2' align='left' colsep='10' rowsep='10'>
545 <entry align="center">Formatting Directive</entry>
546 <entry>Description</entry>
551 <entry><emphasis>%l</emphasis>, <emphasis>%c</emphasis> and <emphasis>%r</emphasis></entry>
552 <entry>Insert the next item label. Up to three labels can be used. The item column is left-aligned (<emphasis>%l</emphasis>), centered (<emphasis>%c</emphasis>) or right-aligned (<emphasis>%r</emphasis>).</entry>
555 <entry><emphasis>%i</emphasis></entry>
556 <entry>Inserts the mini icon.</entry>
559 <entry><emphasis>%></emphasis> and <emphasis>%<</emphasis></entry>
560 <entry>Insert the sub menu triangle pointing either to the right (<emphasis>%></emphasis>) or to the left (<emphasis>%<</emphasis>).</entry>
563 <entry><emphasis>%|</emphasis></entry>
564 <entry>The first %| denotes the beginning of the area that is highlighted either with a background color or a relief (or both). The second <emphasis>%|</emphasis> marks the end of this area. <emphasis>%|</emphasis> 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).</entry>
567 <entry><emphasis>%s</emphasis></entry>
568 <entry>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 <emphasis>%s</emphasis> is not at the beginning of the string, menus are not drawn properly.</entry>
571 <entry><emphasis>Space</emphasis>, <emphasis>Tab</emphasis>, <emphasis>%Space</emphasis> and <emphasis>%Tab</emphasis></entry>
572 <entry>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.</entry>
575 <entry><emphasis>%p</emphasis></entry>
576 <entry>Like Space and Tab <emphasis>%p</emphasis> inserts an empty area into the item, but with better control of its size (see below).</entry></row>
584 <para>You can define an additional space before and after each of the
585 objects like this:</para>
588 <emphasis remap='B'>%</emphasis>left<emphasis>.</emphasis>right<emphasis>p</emphasis>
592 <para>This means: if the object is defined in the menu (e.g. if it is
593 <emphasis remap='B'>%s</emphasis>
594 and you use a side picture, or it is
595 <emphasis remap='B'>%l</emphasis>
596 for the third column and there are items defined that actually
597 have a third column), then add
598 <emphasis remap='I'>left</emphasis>
599 pixels before the object and
600 <emphasis remap='I'>right</emphasis>
601 pixels after it. You may leave out the
602 <emphasis remap='I'>left</emphasis>
603 or the <emphasis>.right</emphasis>
604 parts if you do not need them. All values up to the screen width
605 are allowed. Even negative values can be used with care. The
606 <emphasis remap='B'>p</emphasis>
607 may be replaced with any other formatting directives described
610 <para>Note: Only items defined in the format string are visible in the
611 menus. So if you do not put a
612 <emphasis remap='B'>%s</emphasis>
613 in there you do not see a side picture, even if one is specified.</para>
616 <emphasis remap='I'>SubmenusLeft</emphasis>
617 style changes the default
618 <emphasis remap='I'>ItemFormat</emphasis>
619 string, but if it was set manually it is not modified.</para>
621 <para>Note: If any unformatted title of the menu is wider than the
622 widest menu item, the spaces between the different parts of the
623 menu items are enlarged to match the width of the title. Leading
624 left aligned objects in the format string
625 (<emphasis remap='B'>%l</emphasis>, <emphasis remap='B'>%i</emphasis>, <emphasis remap='B'>%<</emphasis>, first <emphasis remap='B'>%|</emphasis>)
626 stick to the left edge of the menu and trailing right aligned
628 (<emphasis remap='B'>%r</emphasis>, <emphasis remap='B'>%i</emphasis>, <emphasis remap='B'>%></emphasis>, second <emphasis remap='B'>%|</emphasis>)
629 stick to the right edge. The gaps between the remaining items are
630 enlarged equally.</para>
632 <para>Examples:</para>
635 MenuStyle * ItemFormat "%.4s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|"
638 <para>Is the default string used by fvwm: (side picture + 4 pixels gap)
639 (beginning of the hilighted area + 1 pixel gap) (mini icon + 5p)
640 (first column left aligned + 5p) (second column left aligned + 5p)
641 (third column right aligned + 5p) (second mini icon + 5p) (2p +
642 sub menu triangle + 3p) (1p + end of hilighted area).</para>
645 MenuStyle * ItemFormat "%.1|%3.2<%5i%5l%5l%5r%5i%1|%4s"
648 <para>Is used by fvwm with the
649 <emphasis remap='I'>SubmenusLeft</emphasis>
653 <fvwmopt cmd="MenuStyle" opt="VerticalItemSpacing"/> and
654 <fvwmopt cmd="MenuStyle" opt="VerticalTitleSpacing"/>
655 control the vertical spacing of menu items and titles like
656 <emphasis remap='I'>ItemFormat</emphasis>
657 controls the horizontal spacing. Both take two numeric arguments
658 that may range from -100 to +100. The first is the gap in pixels
659 above a normal menu item (or a menu title), the second is the gap
660 in pixels below it. Negative numbers do not make much sense and
661 may screw up the menu completely. If no arguments are given or
662 the given arguments are invalid, the built-in defaults are used:
663 one pixel above the item or title and two below.</para>
666 <fvwmopt cmd="MenuStyle" opt="SubmenusLeft"/>
667 mirrors the menu layout and behavior. Sub menus pop up to the
668 left, the sub menu triangle is drawn left and the mini icon and
669 side picture are drawn at the right side of the menu. The default
671 <fvwmopt cmd="MenuStyle" opt="SubmenusRight"/>.
672 The position hints of a menu are also affected by this setting,
673 i.e. position hints using
674 <emphasis remap='I'>item</emphasis> or <emphasis remap='I'>menu</emphasis>
675 as context rectangle and position hints using
676 <emphasis remap='I'>m</emphasis>
680 <fvwmopt cmd="MenuStyle" opt="AutomaticHotkeys"/> and
681 <emphasis remap='I'>!AutomaticHotkeys</emphasis>
682 control the menu's ability to automatically provide hot-keys on
683 the first character of each menu item's label. This behavior is
684 always overridden if an explicit hot-key is assigned in the
685 <emphasis remap='B'>AddToMenu</emphasis>
689 <fvwmopt cmd="MenuStyle" opt="MouseWheel"/>
690 controls the ability to scroll the menu using a mouse wheel. It takes
691 one argument, that can be one of
692 ScrollsPointer, ScrollsMenu, ScrollsMenuBackwards or ActivatesItem.
693 ScrollsPointer makes the mouse wheel scroll the pointer over a menu.
694 This is the default. ScrollsMenu and ScrollsMenuBackwards scroll the menu
695 beneath the pointer. ActivatesItem disables scrolling by mouse wheel and
696 makes the use of a mouse wheel act as if the menu was clicked.
697 If no argument is supplied the default setting is restored.</para>
700 <fvwmopt cmd="MenuStyle" opt="ScrollOffPage"/>
701 allows a menu to be scrolled out of the visible area if
702 <emphasis remap='I'>MouseWheel</emphasis>
703 is set to ScrollsMenu or ScrollsMenuBackwards. This is the default.
705 <emphasis remap='I'>!ScrollOffPage</emphasis>
706 disables this behaviour.</para>
709 <fvwmopt cmd="MenuStyle" opt="TrianglesUseFore"/>
710 draws sub menu triangles with the foreground color of the menu colorset
711 (normally drawn with the hilight color).
712 <emphasis remap='I'>!TrianglesUseFore</emphasis>
713 disables this behaviour.</para>
715 <para>Examples:</para>
719 MenuStyle * Foreground Black, Background gray40
720 MenuStyle * Greyed gray70, ActiveFore White
721 MenuStyle * !HilightBack, Hilight3DOff
722 MenuStyle * Font lucidasanstypewriter-14
723 MenuStyle * MenuFace DGradient 64 darkgray MidnightBlue
726 MenuStyle red Foreground Yellow
727 MenuStyle red Background Maroon
728 MenuStyle red Greyed Red, ActiveFore Red
729 MenuStyle red !HilightBack, Hilight3DOff
730 MenuStyle red Font lucidasanstypewriter-12
731 MenuStyle red MenuFace DGradient 64 Red Black
734 <para>Note that all style options could be placed on a single line for
735 each style name.</para>
738 <command>MenuStyle</command
740 ><replaceable>forecolor</replaceable
743 ><replaceable>backcolor</replaceable
746 ><replaceable>shadecolor</replaceable
749 ><replaceable>font</replaceable
752 ><replaceable>style</replaceable
755 ><replaceable>anim</replaceable
759 <para>This is the old syntax of the
760 <emphasis remap='B'>MenuStyle</emphasis>
761 command. It is obsolete and may be removed in the future. Please
762 use the new syntax as described above.</para>
764 <para>Sets the menu style. When using monochrome the colors are
766 <replaceable>shadecolor</replaceable>
767 is the one used to draw a menu-selection which is prohibited (or
768 not recommended) by the Mwm hints which an application has
769 specified. The style option is either
770 <emphasis remap='I'>Fvwm</emphasis>, <emphasis remap='I'>Mwm</emphasis> or <emphasis remap='I'>Win</emphasis>,
771 which changes the appearance and operation of the menus.</para>
773 <para><emphasis remap='I'>Mwm</emphasis> and <emphasis remap='I'>Win</emphasis>
774 style menus popup sub menus automatically.
775 <emphasis remap='I'>Win</emphasis>
776 menus indicate the current menu item by changing the background to
778 <emphasis remap='I'>Fvwm</emphasis>
779 sub menus overlap the parent menu,
780 <emphasis remap='I'>Mwm</emphasis> and <emphasis remap='I'>Win</emphasis>
781 style menus never overlap the parent menu.</para>
784 <replaceable>anim</replaceable>
785 option is given, sub menus that do not fit on the screen cause the
786 parent menu to be shifted to the left so the sub menu can be
788 <fvwmref cmd="SetAnimation"/>