1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840
|
<?xml version="1.0" encoding="UTF-8" ?>
<!-- $Id$ -->
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"../docbook-xml/docbookx.dtd"
[
<!ENTITY % myents SYSTEM "../fvwm.ent" >
%myents;
]>
<section id='MenuStyle'>
<title>MenuStyle</title>
<cmdsynopsis>
<command>MenuStyle</command
><arg choice='plain'
><replaceable>stylename</replaceable
></arg
><arg choice='opt'
><replaceable>options</replaceable
></arg>
</cmdsynopsis>
<para>Sets a new menu style or changes a previously defined style. The
<replaceable>stylename</replaceable>
is the style name; if it contains spaces or tabs it has to be
quoted. The name "*" 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
<fvwmref cmd="WindowList"/>
command) that had not be assigned a style using the
<fvwmref cmd="ChangeMenuStyle"/>.
See also
<fvwmref cmd="DestroyMenuStyle"/>.
When using monochrome color options are ignored.</para>
<para><replaceable>options</replaceable>
is a comma separated list containing some of the keywords
Fvwm / Mwm / Win,
BorderWidth,
Foreground,
Background,
Greyed,
HilightBack / !HilightBack,
HilightTitleBack,
ActiveFore / !ActiveFore,
MenuColorset,
ActiveColorset,
GreyedColorset,
TitleColorset,
Hilight3DThick / Hilight3DThin / Hilight3DOff,
Hilight3DThickness,
Animation / !Animation,
Font,
TitleFont,
MenuFace,
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.</para>
<para>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.</para>
<para>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.</para>
<para>This is a list of MenuStyle deprecated negative options:
ActiveForeOff, AnimationOff, AutomaticHotkeysOff, HilightBackOff,
TitleWarpOff</para>
<para>
<fvwmopt cmd="MenuStyle" opt="Fvwm"/>,
<fvwmopt cmd="MenuStyle" opt="Mwm"/>,
<fvwmopt cmd="MenuStyle" opt="Win"/>
reset all options to the style with the same name in former
versions of fvwm. The default for new menu styles is
<emphasis remap='I'>Fvwm</emphasis>
style. These options override all others except
<emphasis remap='I'>Foreground</emphasis>, <emphasis remap='I'>Background</emphasis>, <emphasis remap='I'>Greyed</emphasis>, <emphasis remap='I'>HilightBack</emphasis>,
<emphasis remap='I'>ActiveFore</emphasis> and <emphasis remap='I'>PopupDelay</emphasis>,
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.</para>
<para><emphasis remap='I'>Mwm</emphasis> and <emphasis remap='I'>Win</emphasis>
style menus popup sub menus automatically.
<emphasis remap='I'>Win</emphasis>
menus indicate the current menu item by changing the background to
dark.
<emphasis remap='I'>Fvwm</emphasis>
sub menus overlap the parent menu,
<emphasis remap='I'>Mwm</emphasis> and <emphasis remap='I'>Win</emphasis>
style menus never overlap the parent menu.</para>
<para><emphasis remap='I'>Fvwm</emphasis>
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.</para>
<para><emphasis remap='I'>Mwm</emphasis>
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.</para>
<para><emphasis remap='I'>Win</emphasis>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="Foreground"/> and
<fvwmopt cmd="MenuStyle" opt="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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="HilightBack"/> and
<emphasis remap='I'>!HilightBack</emphasis>
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
<emphasis remap='I'>HilightBack</emphasis>.
If you use this option without an argument the color is based on
the menu's background color. The
<emphasis remap='I'>ActiveColorset</emphasis>
option overrides the specified color. If the colorset has a
non solid background it is used for the hilighting.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="HilightTitleBack"/>
switches hilighting the background of menu titles on. If a
<emphasis remap='I'>TitleColorset</emphasis>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="ActiveFore"/> and
<emphasis>!ActiveFore</emphasis>
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
<emphasis remap='I'>ActiveFore</emphasis>.
Omitting the color turns hilighting on when an
<emphasis remap='I'>ActiveColorset</emphasis>
is used.
<emphasis remap='I'>ActiveFore</emphasis>
turns off hilighting the foreground completely. The
<emphasis remap='I'>ActiveColorset</emphasis>
option overrides the specified color.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="MenuColorset"/>
controls if a colorset is used instead of the
<emphasis remap='I'>Foreground</emphasis>, <emphasis remap='I'>Background</emphasis> and <emphasis remap='I'>MenuFace</emphasis>
menu styles. If the
<emphasis remap='I'>MenuColorset</emphasis>
keyword is followed by a number equal to zero or greater, this
number is taken as the number of the colorset to use. If the
number is omitted, the colorset is switched off and the regular
menu styles are used again. The foreground and background colors
of the menu items are replaced by the colors from the colorset. If
the colorset has a pixmap defined, this pixmap is used as the
background of the menu. Note that the
<emphasis remap='I'>MenuFace</emphasis>
menu style has been optimized 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
<fvwmref sect="colorsets" opt="colorsets" name="Colorsets"/>
section for details about colorsets.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="ActiveColorset"/>
works exactly like
<emphasis remap='I'>MenuColorset</emphasis>,
but the foreground from the colorset replaces the color given with
the
<emphasis remap='I'>ActiveFore</emphasis>
menu style and the colorset's background color replaces the color
given with the
<emphasis remap='I'>HilightBack</emphasis>
command (to turn on background hilighting you have to use the
<emphasis remap='I'>HilightBack</emphasis>
menu style too). 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
<emphasis remap='I'>!ActiveFore</emphasis> or <emphasis remap='I'>!HilightBack</emphasis>
menu styles.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="GreyedColorset"/>
works exactly like
<emphasis remap='I'>MenuColorset</emphasis>,
but the foreground from the colorset replaces the color given with
the
<emphasis remap='I'>Greyed</emphasis>
menu style. No other parts of the colorset are used.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="TitleColorset"/>
works exactly like
<emphasis remap='I'>MenuColorset</emphasis>,
but is used only for menu titles.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="Hilight3DThick"/>,
<fvwmopt cmd="MenuStyle" opt="Hilight3DThin"/> and
<fvwmopt cmd="MenuStyle" opt="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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="Animation"/> and
<emphasis remap='I'>!Animation</emphasis>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="Font"/> and
<fvwmopt cmd="MenuStyle" opt="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
<emphasis remap='I'>TitleFont</emphasis>
is given, it is used for all menu titles instead of the normal font.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="MenuFace"/>
enforces a fancy background upon the menus. You can use the same
options for
<emphasis remap='I'>MenuFace</emphasis>
as for the
<fvwmref cmd="ButtonStyle"/>.
See description of
<fvwmref cmd="ButtonStyle"/>
command and the
<fvwmref sect="colorGradients" opt="color_gradients" name="Color Gradients"/>
sections for more information. If you use
<emphasis remap='I'>MenuFace</emphasis>
without arguments the style is reverted back to normal.</para>
<para>Some examples of MenuFaces are:</para>
<programlisting>
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
</programlisting>
<para>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:</para>
<para>Turn hilighting of the active menu item other than foreground
color off:</para>
<programlisting>
MenuStyle <style> Hilight3DOff, !HilightBack
MenuStyle <style> ActiveFore <preferred color>
</programlisting>
<para>Make sure sub menus do not overlap the parent menu. This can
prevent menus being redrawn every time a sub menu pops up or down.</para>
<programlisting>
MenuStyle <style> PopupOffset 1 100
</programlisting>
<para>Run your X server with backing storage. If your X Server is
started with the -bs option, turn it off. If not try the -wm
and +bs options:</para>
<command>startx -- -wm +bs</command>
<para>You may have to adapt this example to your system (e.g. if you use
xinit to start X).</para>
<para>
<fvwmopt cmd="MenuStyle" opt="PopupDelay"/>
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
<emphasis remap='I'>PopupImmediately</emphasis>
option is used since sub menus pop up immediately then.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="PopupImmediately"/>
makes menu items with sub menus pop up it up as soon as the
pointer enters the item. The
<emphasis remap='I'>PopupDelay option</emphasis>
is ignored then. If
<emphasis remap='I'>PopupDelayed</emphasis>
is used fvwm looks at the
<emphasis remap='I'>PopupDelay</emphasis>
option if or when this automatic popup happens.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="PopdownDelay"/>
works exactly like
<emphasis remap='I'>PopupDelay</emphasis>
but determines the timeout of the
<emphasis remap='I'>PopupDelayed</emphasis>
style.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="PopdownImmediately"/>
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
<emphasis remap='I'>PopdownDelayed</emphasis>
the sub menu only pops down after the time specified with the
<emphasis remap='I'>PopdownDelay</emphasis>
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
<emphasis remap='I'>PopupImmediately</emphasis>, <emphasis remap='I'>PopupDelayed</emphasis>, <emphasis remap='I'>PopupDelay</emphasis>
styles and the
<emphasis remap='I'>PopdownImmediately</emphasis>, <emphasis remap='I'>PopdownDelayed</emphasis>, <emphasis remap='I'>PopdownDelay</emphasis>
styles, the
<emphasis remap='I'>Popup...</emphasis>
styles win when using mouse navigation and the
<emphasis remap='I'>Popdown...</emphasis>
styles win when navigating with the keyboard.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="PopupOffset"/>
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's width to the right or left.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="PopupActiveArea"/>
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
<emphasis remap='I'>PopupActiveArea</emphasis>.
Setting this value to 100 disables this kind of automatic popups
altogether. The default value is restored if no or an illegal
value is given.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="TitleWarp"/> and <emphasis remap='I'>!TitleWarp</emphasis>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="TitleUnderlines0"/>,
<fvwmopt cmd="MenuStyle" opt="TitleUnderlines1"/> and
<fvwmopt cmd="MenuStyle" opt="TitleUnderlines2"/>
specify how many lines are drawn below a menu title.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="SeparatorsLong"/> and
<fvwmopt cmd="MenuStyle" opt="SeparatorsShort"/>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="TrianglesSolid"/> and
<fvwmopt cmd="MenuStyle" opt="TrianglesRelief"/>
affect how the small triangles for sub menus is drawn. Solid
triangles are filled with a color while relief triangles are
hollow.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="DoubleClickTime"/>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="SidePic"/>
takes the name of an image file as an argument. The
picture is drawn along the left side of the menu. The
<emphasis remap='I'>SidePic</emphasis>
option can be overridden by a menu specific side pixmap (see
<fvwmref cmd="AddToMenu"/>).
If the file name is omitted an existing side pixmap is removed from
the menu style.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="SideColor"/>
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
<fvwmref cmd="AddToMenu"/>).
If the color name is omitted the side color option is switched off.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="PopupAsRootMenu"/>,
<fvwmopt cmd="MenuStyle" opt="PopupAsSubmenu"/>,
<fvwmopt cmd="MenuStyle" opt="PopupIgnore"/> and
<fvwmopt cmd="MenuStyle" opt="PopupClose"/>
change the behavior when you click on a menu item that opens a
sub menu. With
<emphasis remap='I'>PopupAsRootMenu</emphasis>
the original menu is closed before the sub menu appears, with
<emphasis remap='I'>PopupAsSubmenu</emphasis>
it is not, so you can navigate back into the
parent menu. Furthermore, with
<emphasis remap='I'>PopupAsSubmenu</emphasis>
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. <fvwmref cmd="Any"/> keystroke while a menu is posted
reverts the menu back to the normal behavior. With
<emphasis remap='I'>PopupClose</emphasis>
the menu is closed when a sub menu item is activated, and the menu
stays open if
<emphasis remap='I'>PopupIgnore</emphasis>
is used (even if the menu was invoked with the
<fvwmref cmd="Popup"/>
command).
<emphasis remap='I'>PopupAsSubmenu</emphasis>
is the default.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="RemoveSubmenus"/>
instructs fvwm to remove sub menu when you move back into the
parent menu. With
<fvwmopt cmd="MenuStyle" opt="HoldSubmenus"/>
the sub menu remains visible. You probably want to use
<emphasis remap='I'>HoldSubmenus</emphasis>
if you are using the
<emphasis remap='I'>PopupDelayed</emphasis>
style.
<emphasis remap='I'>RemoveSubmenus</emphasis>
affects menu navigation with the keyboard.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="SelectOnRelease"/>
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
<keysym>Alt-Tab</keysym>
<fvwmref cmd="WindowList"/>
navigation.
The key name is a standard X11 key name as defined in
<filename>/usr/include/X11/keysymdef.h</filename>,
(without the
<emphasis remap='I'>XK_</emphasis>
prefix), or the keysym database
<filename>/usr/X11R6/lib/X11/XKeysymDB</filename>.
To disable this behavior, omit
the key name.</para>
<para>Note: Some X servers do not support KeyRelease events.
<emphasis remap='I'>SelectOnRelease</emphasis>
does not work on such a machine.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="ItemFormat"/>
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,
<keysym>Tab</keysym>
characters and formatting directives beginning with '%'. Any
illegal characters and formatting directives are silently ignored:</para>
<variablelist>
<varlistentry>
<term><emphasis remap='B'>%l</emphasis>,
<emphasis remap='B'>%c</emphasis>
and <emphasis remap='B'>%r</emphasis></term>
<listitem><para>Insert the next item label. Up to three labels
can be used. The item column is left-aligned
(<emphasis remap='B'>%l</emphasis>), centered
(<emphasis remap='B'>%c</emphasis>) or right-aligned
(<emphasis remap='B'>%r</emphasis>).</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>%i</emphasis></term>
<listitem><para>Inserts the mini icon.</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>%></emphasis>
and <emphasis remap='B'>%<</emphasis></term>
<listitem><para>Insert the sub menu triangle pointing either
to the right (<emphasis remap='B'>%></emphasis>) or to the
left (<emphasis remap='B'>%<</emphasis>).</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>%|</emphasis></term>
<listitem>
<para>The first <emphasis remap='B'>%|</emphasis> denotes
the beginning of the area that is highlighted either with
a background color or a relief (or both). The
second <emphasis remap='B'>%|</emphasis> marks the end of
this area. <emphasis remap='B'>%|</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).</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>%s</emphasis></term>
<listitem><para>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 remap='B'>%s</emphasis> is not at the
beginning of the string, menus are not drawn
properly.</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>Space</emphasis>,
<emphasis remap='B'>Tab</emphasis>,
<emphasis remap='B'>%Space</emphasis>
and <emphasis remap='B'>%Tab</emphasis></term>
<listitem><para>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.</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>%p</emphasis></term>
<listitem><para>Like Space and
Tab <emphasis remap='B'>%p</emphasis> inserts an empty area
into the item, but with better control of its size (see
below).</para></listitem></varlistentry>
</variablelist>
<para>You can define an additional space before and after each of the
objects like this:</para>
<programlisting>
<emphasis remap='B'>%</emphasis><replaceable>left</replaceable><emphasis remap='B'>.</emphasis><replaceable>right</replaceable><emphasis remap='B'>p</emphasis>
</programlisting>
<para>This means: if the object is defined in the menu (e.g. if it is
<emphasis remap='B'>%s</emphasis>
and you use a side picture, or it is
<emphasis remap='B'>%l</emphasis>
for the third column and there are items defined that actually
have a third column), then add
<replaceable>left</replaceable>
pixels before the object and
<replaceable>right</replaceable>
pixels after it. You may leave out the
<replaceable>left</replaceable>
or the <emphasis>.right</emphasis>
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
<emphasis remap='B'>p</emphasis>
may be replaced with any other formatting directives described
above.</para>
<para>Note: Only items defined in the format string are visible in the
menus. So if you do not put a
<emphasis remap='B'>%s</emphasis>
in there you do not see a side picture, even if one is specified.</para>
<para>Note: The
<emphasis remap='I'>SubmenusLeft</emphasis>
style changes the default
<emphasis remap='I'>ItemFormat</emphasis>
string, but if it was set manually it is not modified.</para>
<para>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
(<emphasis remap='B'>%l</emphasis>, <emphasis remap='B'>%i</emphasis>,
<emphasis remap='B'>%<</emphasis>, first <emphasis remap='B'>%|</emphasis>)
stick to the left edge of the menu and trailing right aligned
objects
(<emphasis remap='B'>%r</emphasis>, <emphasis remap='B'>%i</emphasis>,
<emphasis remap='B'>%></emphasis>, second <emphasis remap='B'>%|</emphasis>)
stick to the right edge. The gaps between the remaining items are
enlarged equally.</para>
<para>Examples:</para>
<programlisting>
MenuStyle * ItemFormat "%.4s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|"
</programlisting>
<para>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).</para>
<programlisting>
MenuStyle * ItemFormat "%.1|%3.2<%5i%5l%5l%5r%5i%1|%4s"
</programlisting>
<para>Is used by fvwm with the
<emphasis remap='I'>SubmenusLeft</emphasis>
option below.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="VerticalItemSpacing"/> and
<fvwmopt cmd="MenuStyle" opt="VerticalTitleSpacing"/>
control the vertical spacing of menu items and titles like
<emphasis remap='I'>ItemFormat</emphasis>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="VerticalMargins"/>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="SubmenusLeft"/>
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
<fvwmopt cmd="MenuStyle" opt="SubmenusRight"/>.
The position hints of a menu are also affected by this setting,
i.e. position hints using
<emphasis remap='I'>item</emphasis> or <emphasis remap='I'>menu</emphasis>
as context rectangle and position hints using
<emphasis remap='I'>m</emphasis>
offsets.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="AutomaticHotkeys"/> and
<emphasis remap='I'>!AutomaticHotkeys</emphasis>
control the menu's ability to automatically provide hot-keys on
the first character of each menu item's label. This behavior is
always overridden if an explicit hot-key is assigned in the
<emphasis remap='B'>AddToMenu</emphasis>
command.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="UniqueHotkeyActivatesImmediate"/> and
<emphasis remap='I'>!UniqueHotkeyActivatesImmediate</emphasis> 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
<emphasis remap='I'>UniqueHotkeyActivatesImmediate</emphasis> 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
<emphasis remap='I'>!UniqueHotkeyActivatesImmediate</emphasis> option.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="MouseWheel"/>
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.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="ScrollOffPage"/>
allows a menu to be scrolled out of the visible area if
<emphasis remap='I'>MouseWheel</emphasis>
is set to ScrollsMenu or ScrollsMenuBackwards. This is the default.
The opposite,
<emphasis remap='I'>!ScrollOffPage</emphasis>
disables this behaviour.</para>
<para>
<fvwmopt cmd="MenuStyle" opt="TrianglesUseFore"/>
draws sub menu triangles with the foreground color of the menu colorset
(normally drawn with the hilight color).
<emphasis remap='I'>!TrianglesUseFore</emphasis>
disables this behaviour.</para>
<para>Examples:</para>
<programlisting>
MenuStyle * Mwm
MenuStyle * Foreground Black, Background gray40
MenuStyle * Greyed gray70, ActiveFore White
MenuStyle * !HilightBack, Hilight3DOff
MenuStyle * Font lucidasanstypewriter-14
MenuStyle * MenuFace DGradient 64 darkgray MidnightBlue
MenuStyle red Mwm
MenuStyle red Foreground Yellow
MenuStyle red Background Maroon
MenuStyle red Greyed Red, ActiveFore Red
MenuStyle red !HilightBack, Hilight3DOff
MenuStyle red Font lucidasanstypewriter-12
MenuStyle red MenuFace DGradient 64 Red Black
</programlisting>
<para>Note that all style options could be placed on a single line for
each style name.</para>
<cmdsynopsis>
<command>MenuStyle</command
><arg choice='plain'
><replaceable>forecolor</replaceable
></arg
><arg choice='plain'
><replaceable>backcolor</replaceable
></arg
><arg choice='plain'
><replaceable>shadecolor</replaceable
></arg
><arg choice='plain'
><replaceable>font</replaceable
></arg
><arg choice='plain'
><replaceable>style</replaceable
></arg
><arg choice='opt'
><replaceable>anim</replaceable
></arg>
</cmdsynopsis>
<para>This is the old syntax of the
<emphasis remap='B'>MenuStyle</emphasis>
command. It is obsolete and may be removed in the future. Please
use the new syntax as described above.</para>
<para>Sets the menu style. When using monochrome the colors are
ignored. The
<replaceable>shadecolor</replaceable>
is the one used to draw a menu-selection which is prohibited (or
not recommended) by the Mwm hints which an application has
specified. The style option is either
<emphasis remap='I'>Fvwm</emphasis>, <emphasis remap='I'>Mwm</emphasis> or <emphasis remap='I'>Win</emphasis>,
which changes the appearance and operation of the menus.</para>
<para><emphasis remap='I'>Mwm</emphasis> and <emphasis remap='I'>Win</emphasis>
style menus popup sub menus automatically.
<emphasis remap='I'>Win</emphasis>
menus indicate the current menu item by changing the background to
black.
<emphasis remap='I'>Fvwm</emphasis>
sub menus overlap the parent menu,
<emphasis remap='I'>Mwm</emphasis> and <emphasis remap='I'>Win</emphasis>
style menus never overlap the parent menu.</para>
<para>When the
<replaceable>anim</replaceable>
option is given, 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. See also
<fvwmref cmd="SetAnimation"/>
command.</para>
</section>
|