1 .\" @(#)@PACKAGE@-@VERSION@ @RELDATELONG@
15 .TH FvwmGtk 1 "@RELDATELONG@ (@VERSION@)" Fvwm "Fvwm Modules"
18 \fBFvwmGtk\fP \- the fvwm GTK module
20 \fBFvwmGtk\fP is spawned by fvwm, so no command line invocation will work.
21 From within the fvwm's configuration file, \fBFvwmGtk\fP is spawned as follows:
23 Module FvwmGtk [ name ]
25 or from within an fvwm pop-up menu:
27 DestroyMenu Module-Popup
28 AddToMenu Module-Popup "Modules" Title
29 AddToMenu Module-Popup "Gtk" Module FvwmGtk [ name ]
33 The \fBFvwmGtk\fP module implements GTK-based alternatives to the
34 GUI elements in fvwm, namely the builtin menus and the FvwmForm dialogs.
37 No command line invocation is possible.
38 \fBFvwmGtk\fP must be invoked by the
39 \fBfvwm\fP window manager.
40 When invoked with the optional \fIname\fP argument, \fIname\fP
41 is used to find configuration commands and configuration files
44 .SH CONFIGURATION OPTIONS
45 \fBFvwmGtk\fP only has options to define the content of the menus and dialogs.
46 This includes the labels and pixmaps to show; configuration of the appearance
47 must be done through the GTK rc file mechanism.
49 \fBFvwmGtk\fP gets config info from \fBfvwm\fP's module configuration
53 .BR "MODULE COMMANDS" )
55 In addition, \fBFvwmGtk\fP accepts commands from fvwm and its modules as
58 If the optional \fIname\fP is used to start FvwmGtk, \fIname\fP is used
59 in all commands, messages, menus and forms generated by FvwmGtk and in the
60 configuration file name. Unlike other fvwm modules, there is little reason
61 to use the optional name.
63 All dialogs and menus have to be defined through configuration commands
64 before they can be used. A dialog or menu is invoked by sending its name
65 to FvwmGtk. For menus, you also send the button which is to be used.
67 SendToModule FvwmGtk menu-example 1
68 SendToModule FvwmGtk dialog-example
72 The following commands define menus. For all arguments named "label"
73 in the following menu commands, FvwmGtk looks for embedded ampersands
74 in the same way fvwm does for its menus.
76 .IP "*FvwmGtk: Menu \fBname\fP"
77 Instructs \fBFvwmGtk\fP to append subsequent items to the menu named
78 by the argument. Note that you can "reopen" a menu and continue to append
79 to it. It is also possible to redefine a menu from scratch, see
82 .IP "*FvwmGtk: Title \fBlabel\fP [ \fBicon\fP [ \fBr_label\fP ] ]"
83 Appends a title to the currently open menu. If the optional argument
84 is given, it should be the name of an xpm file in the ImagePath. The
85 icon will appear to the left of the text. If FvwmGtk has been compiled
86 with imlib support, icon can of any image format imlib can read. The label
87 can contain an ampersand to mark the following character as an accelerator to
88 be underlined. Underlined accelerators work in the same way as they do in fvwm
89 native menus. If r_label is given, it will be right-justified.
91 .IP "*FvwmGtk: Item \fBlabel\fP \fBaction\fP [ \fBicon\fP [ \fBr_label\fP ] ]"
92 Appends an item to the currently open menu. The first argument is the
93 text that will appear in the item, the second argument will be sent to
94 fvwm when the item is activated. If the optional argument is given, it
95 should be the name of an xpm file in the ImagePath. The icon will appear
96 to the left of the text. The label can contain an ampersand
97 to mark the following character as an accelerator to be underlined.
98 Underlined accelerators work in the same way as they do in fvwm native menus.
99 If r_label is given, it will be right-justified.
101 .IP "*FvwmGtk: Submenu \fBlabel\fP \fBname\fP [ \fBicon\fP ]"
102 Appends an item to the currently open menu. The first argument is the
103 text that will appear in the item, the second argument is the name of
104 the sub menu that will be opened when the item is selected. If the sub menu
105 doesn't exist yet, it will be created. If the optional argument is given,
106 it should be the name of an xpm file in the ImagePath. The icon will
107 appear to the left of the text. The label can contain an ampersand
108 to mark the following character as an accelerator to be underlined.
109 Underlined accelerators work in the same way as they do in fvwm native menus.
111 .IP "*FvwmGtk: Tearoff"
112 Appends a special tear-off item. Activating it turns the menu into
113 a permanent window; activating it once more makes the menu disappear again.
117 Window lists are special dynamically created menus. They offer a list of all
118 windows managed by fvwm and send "WindowListFunc" back to fvwm within the
119 window context of the selected window. WindowListFunc is the same function
120 that is also used by fvwm for its builtin window list.
122 .IP "*FvwmGtk: WindowList \fBname\fP [ \fBoption\fP... ]"
123 Creates a window-list bound to \fBname\fP. The window-list will be
124 formatted according to the given options. Currently supported are
125 the following options which have the same meaning as for the fvwm's
127 "NoGeometry", "NoMiniIcon", "UseIconName", "Desk <desk>", "CurrentDesk",
128 "Icons/NoIcons/OnlyIcons", "Sticky/NoSticky/OnlySticky",
129 "Normal/NoNormal/OnlyNormal", "NoDeskSort", "Alphabetic",
131 The following options are new: "Title <label> <icon> <r_label>".
132 Additionally, you can specify a name pattern to match the name or
133 icon name of the listed windows.
137 Dialogs consist of hierarchically organized widgets. Widgets are either
138 composite, ie they can contain one or more other widgets, or atomic.
139 Composite widgets are defined by a pair of commands denoting the start
140 and end of the list of child widgets. Atomic widgets are defined by
141 single commands. Some widgets request data from the user. These are
142 all given names which can be used to refer to the data.
144 The commands for widgets have the common form:
146 *FvwmGtk: \fIWidget\fP \fIwidget-specific args\fP [ -- \fIgeneral-args\fP ]
148 where the following arguments may be specified after the double hyphen:
149 can-default, default, focus, expand, fill and an integer argument padding.
151 \fIcan-default\fP means that the widget may become the default widget
152 of the dialog (ie the one being activated if the user immediately presses
155 \fIdefault\fP means that the widget is the initial default widget.
157 \fIfocus\fP means that the widget initially has the keyboard focus.
159 \fIexpand\fP, \fIfill\fP, \fIpadding\fP are relevant if the widget
160 is part of a row or column (see the GTK documentation).
162 The following paragraphs explain only the widget-specific arguments.
164 .IP "*FvwmGtk: Dialog \fBname\fP \fBtitle\fP [ \fBcenter\fP ]"
165 Starts or reopens a dialog named by the first argument. \fBtitle\fP
166 is used as the window title. If the optional argument \fBcenter\fP is given,
167 the dialog will be mapped at the center of the screen. Otherwise it
168 will be mapped at the mouse position.
170 A dialog has one child widget.
172 .IP "*FvwmGtk: Box [ \fBvertical\fP ] [ \fBhomogeneous\fP ] [ \fBspacing\fP [ \fBborder\fP ] ]"
173 .IP "*FvwmGtk: EndBox"
174 Start and end a composite widget which is used to group a number of child
175 widgets in a row or column. The arguments influence the placement of the child
176 widgets (for information about their meaning, see the GTK documentation).
178 .IP "*FvwmGtk: Frame \fBlabel\fP [ \fBborder\fP ]"
179 .IP "*FvwmGtk: EndFrame"
180 Start and end a composite widget which draws a frame labeled by the given
181 label around a single child widget. The optional argument determines
182 the separation between the frame and the child.
184 .IP "*FvwmGtk: Label \fBlabel\fP"
187 .IP "*FvwmGtk: Entry \fBname\fP [ \fBinitial-value\fP ]"
188 Adds a widget which allows the user to enter a string. If given, the
189 \fBinitial-value\fP is displayed initially. The actual string can
190 be referred to by \fBname\fP.
192 .IP "*FvwmGtk: Button \fBlabel\fP \fBcmd\fP ..."
193 Adds a button widget with the given label which will trigger the given
194 commands when pressed. Commands can contain references to the values
195 of widgets in the form $(name). These references are replaced by the actual
196 values. The replacement is done recursively, ie the values can again
199 Commands can be strings to send to fvwm, system commands starting with
200 and exclamation sign (which is stripped before execution) or the special
201 command "close" to close the current dialog.
203 .IP "*FvwmGtk: CheckButton \fBname\fP \fBlabel\fP \fBon-value\fP \fBoff-value\fP [ \fBon\fP ]"
204 Adds a check button widget with the given label. The value referred to
205 by \fBname\fP will be either \fBon-value\fP or \fBoff-value\fP, depending
206 on the state of the check button. The initial state is off, unless
207 the optional argument is given.
209 .IP "*FvwmGtk: RadioGroup \fBname\fP"
210 .IP "*FvwmGtk: EndRadioGroup"
211 Start and end a composite widget which groups a number of mutually
212 exclusive radio buttons. The value of the enables radio button can be
213 referred to by \fBname\fP. Grouping radio buttons in this way doesn't
214 influence their geometry. You can put a radio group in a row or column
215 or even distribute it across several rows to determine the geometry.
217 .IP "*FvwmGtk: RadioButton \fBlabel\fP \fBon-value\fP [ \fBon\fP ]"
218 Adds a radio button with the given label. Its initial state is off, unless
219 the optional argument is given. There should probably be exactly one \fBon\fP
220 radio button in a radio group. A radio button must be child of a radio group
221 in order to be able to access its value.
223 .IP "*FvwmGtk: Notebook \fBlabel\fP"
224 Opens a new notebook page with the given label. If there is already an open
225 notebook, the page is appended to it. Otherwise a new notebook is created. A
226 notebook page is a composite widget that expects one child.
228 .IP "*FvwmGtk: EndNotebook"
229 Closes a notebook widget.
231 .IP "*FvwmGtk: Color \fBname\fP [ \fBinitial-value\fP ]"
232 Adds a color selector whose initial color is specified by \fBinitial-value\fP
233 and whose value can be referred to by \fBname\fP. The \fBinitial-value\fP
234 can be any color specification that is accepted by XParseColor. The returned
235 color specifications are always of the form "rgb:rrrr/gggg/bbbb".
237 .IP "*FvwmGtk: Scale \fBname\fP [ \fBvertical\fP ] \fBvalue\fP \fBlower\fP
238 \fBupper\fP \fBinc\fP \fBpage-inc\fP \fBpage-size\fP [ \fBdigits\fP ]"
241 .IP "*FvwmGtk: SpinButton \fBname\fP \fBvalue\fP \fBlower\fP
242 \fBupper\fP \fBinc\fP \fBpage-inc\fP \fBpage-size\fP \fBclimb-rate\fP [
246 .IP "*FvwmGtk: OptionMenu \fBname\fP"
247 .IP "*FvwmGtk: EndOptionMenu"
248 .IP "*FvwmGtk: Item \fBlabel\fP \fBvalue\fP [ \fBon\fP ]"
249 Can be used to create option menus.
252 .SH COMMON CONFIGURATION
253 The following commands can be used for menus and dialogs.
255 .IP "*FvwmGtk: Separator"
256 Appends a separator to the currently open menu, row or column.
258 .IP "*FvwmGtk: Destroy \fBname\fP"
259 Destroys the specified menu or dialog.
261 .IP "*FvwmGtk: RCFile \fBfile\fP"
262 Note that this command should be issued before defining any menus
263 or dialog. Hint for GNOME users: If you add instances of this command for the
264 standard GNOME rc files, switching themes via the control-center will
265 apply to FvwmGtk widgets as well, giving a very integrated appearance
268 .IP "*FvwmGtk: IconSize [ \fBwidth\fP \fBheight\fP ]"
269 If FvwmGtk has been compiled with imlib support, icons will be scaled
270 to the size set by this command. Omitting the arguments disables scaling.
271 Note that there is currently no way to change the amount of room left
272 free for icons, thus using a width of more than 20 will not be very
276 To invoke one of the previously defined menus or dialogs, use the fvwm
277 command \fISendToModule\fP.
279 .IP "SendToModule FvwmGtk \fBname\fP \fBbutton\fP"
280 makes \fBFvwmGtk\fP pop up the menu or dialog named by the first argument.
281 The second argument is the button that will be used for menu selection.
282 For dialogs and menus which are not popped up from a button press, you can
286 Mouse 3 R A SendToModule FvwmGtk Window-Ops 3
287 Key F10 R A SendToModule FvwmGtk Applications-Menu
288 Mouse 1 R A SendToModule FvwmGtk Quit-Verify-Dialog
292 \fIMatthias Clasen\fP <clasen@mathematik.uni-freiburg.de>
295 The gtkpixmapmenuitem code and the code for underline accelerators is
296 taken from libgnomeui.
299 The builtin menus offer many features which the GTK menus currently
300 don't have. None of the features of the builtin window-list have