1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "../docbook-xml/docbookx.dtd"
5 <!ENTITY % myents SYSTEM "../fvwm.ent" >
9 <!-- $Id: Popup.xml,v 1.4 2007/06/16 12:38:46 griph Exp $ -->
15 <command>Popup</command
17 ><replaceable>PopupName</replaceable
20 ><replaceable>position</replaceable
23 ><replaceable>default-action</replaceable
28 <para>This command has two purposes: to bind a menu to a key or mouse
29 button, and to bind a sub menu into a menu. The formats for the
30 two purposes differ slightly. The
31 <replaceable>position</replaceable>
32 arguments are the same as for
33 <fvwmref cmd="Menu"/>.
35 <replaceable>default-action</replaceable>
36 is invoked if the user clicks a button to invoke the menu and
37 releases it immediately again (or hits the key rapidly twice if
38 the menu is bound to a key). If the default action is not
39 specified, double clicking on the menu does nothing. However, if
40 the menu begins with a menu item (i.e. not with a title or a
41 separator) and the default action is not given, double clicking
42 invokes the first item of the menu (but only if the pointer really
43 was over the item).</para>
45 <para>To bind a previously defined pop-up menu to a key or mouse button:</para>
47 <para>The following example binds mouse buttons 2 and 3 to a pop-up
48 called "Window Ops". The menu pops up if the buttons 2 or 3 are
49 pressed in the window frame, side-bar, or title-bar, with no
50 modifiers (none of shift, control, or meta).</para>
53 <fvwmref cmd="Mouse"/> 2 FST N Popup "Window Ops"
54 <fvwmref cmd="Mouse"/> 3 FST N Popup "Window Ops"
57 <para>Pop-ups can be bound to keys through the use of the
59 command. Pop-ups can be operated without using the mouse by
60 binding to keys and operating via the up arrow, down arrow, and
63 <para>To bind a previously defined pop-up menu to another menu, for use
66 <para>The following example defines a sub menu "Quit-Verify" and binds
67 it into a main menu, called "RootMenu":</para>
70 <fvwmref cmd="AddToMenu"/> Quit-Verify
71 + "Really Quit Fvwm?" <fvwmref cmd="Title"/>
72 + "Yes, Really Quit" <fvwmref cmd="Quit"/>
73 + "Restart Fvwm" <fvwmref cmd="Restart"/>
74 + "Restart Fvwm 1.xx" <fvwmref cmd="Restart"/> fvwm1 -s
75 + "" <fvwmref cmd="Nop"/>
76 + "No, Don't Quit" <fvwmref cmd="Nop"/>
78 <fvwmref cmd="AddToMenu"/> RootMenu "Root Menu" <fvwmref cmd="Title"/>
79 + "Open XTerm Window" Popup NewWindowMenu
80 + "Login as Root" <fvwmref cmd="Exec"/> exec xterm -T Root -n Root -e su -
81 + "Login as Anyone" <fvwmref cmd="Popup"/> AnyoneMenu
82 + "Remote Hosts" <fvwmref cmd="Popup"/> HostMenu
83 + "" <fvwmref cmd="Nop"/>
84 + "X utilities" Popup Xutils
85 + "" <fvwmref cmd="Nop"/>
86 + "Fvwm Modules" Popup Module-Popup
87 + "Fvwm Window Ops" Popup Window-Ops
88 + "" <fvwmref cmd="Nop"/>
89 + "Previous Focus" <fvwmref cmd="Prev"/> (AcceptsFocus) <fvwmref cmd="Focus"/>
90 + "Next Focus" <fvwmref cmd="Next"/> (AcceptsFocus) <fvwmref cmd="Focus"/>
91 + "" <fvwmref cmd="Nop"/>
92 + "Refresh screen" <fvwmref cmd="Refresh"/>
93 + "" <fvwmref cmd="Nop"/>
94 + "Reset X defaults" <fvwmref cmd="Exec"/> xrdb -load \
96 + "" <fvwmref cmd="Nop"/>
97 + "" <fvwmref cmd="Nop"/>
98 + <fvwmref cmd="Quit"/> Popup Quit-Verify
102 <para>Popup differs from
103 <fvwmref cmd="Menu"/>
104 in that pop-ups do not stay up if the user simply clicks. These
105 are popup-menus, which are a little hard on the wrist.
106 <fvwmref cmd="Menu"/>
107 menus stay up on a click action. See the
108 <fvwmref cmd="Menu"/>
109 command for an explanation of the interactive behavior of menus. A
110 menu can be open up to ten times at once, so a menu may even use
111 itself or any of its predecessors as a sub menu.</para>