1FvwmForm(1) Fvwm Modules FvwmForm(1)
2
3
4
6 FvwmForm - input form module for Fvwm
7
9 Module FvwmForm [ Alias ]
10
11 FvwmForm must be spawned by Fvwm. If invoked from the command line,
12 FvwmForm prints its version number and exits.
13
15 FvwmForm provides a mechanism to get user input and act accordingly.
16 This is achieved by means of a form that the user can fill out, and
17 from which the user can select actions he wants Fvwm to take. A form
18 consists of five types of items: text labels, single-line text inputs,
19 mutually-exclusive selections, multiple-choice selections, and action
20 buttons. These items are arranged into several lines, with a very
21 flexible layout.
22
23 A text label only serves the purpose of explanation. It cannot accept
24 any input.
25
26 A timeout entry provides a mechanism for timing out the form and per‐
27 forming a certain action when the timeout occurs. The countdown is
28 displayed similar to a text label except that it updates with the
29 amount of time left.
30
31 A text input field can be used to edit a single-line string. FvwmForm
32 accepts Emacs-style cursor movement keys. See FvwmFormInput for
33 details. Mouse copy is not supported, but you can paste.
34
35 A selection consists of several choices.
36
37 The selection itself is a logical entity that doesn't have any display
38 feature.
39
40 Each choice is displayed as a push-button followed by a explanatory
41 text label. When selected, an exclusive choice shows a circle in the
42 middle, while a multiple choice shows a check.
43
44 An action button, when activated sends one or more commands to Fvwm or
45 executes shell commands. The shell commands can contain the content of
46 the input fields on the form and reflect the setting of choices on the
47 form.
48
49 The action buttons can be activated thru keyboard or mouse.
50
52 FvwmForm invoked without an alias uses configuration commands starting
53 with "*FvwmForm".
54
55 Normally you would invoke FvwmForm with an alias representing the name
56 of a form, its configuration commands and configuration file. For
57 example, the command "Module FvwmForm Rlogin" uses configuration com‐
58 mands starting with "*Rlogin", and reads the optional configuration
59 file "Rlogin".
60
61 All forms, regardless of alias, scan first for configuration commands
62 that start with "*FvwmFormDefault". These commands normally come
63 from the builtin form "FvwmForm-Form" which saves commands to the file
64 ".FvwmForm".
65
66 The physical reading of the optional input file, ".FvwmForm", is done
67 only the first time FvwmForm is invoked, or after "FvwmForm-Form"
68 updates the file.
69
70 When the file ".FvwmForm" is read, it is done by sending the command
71 "Read .FvwmForm Quiet" to fvwm. Because of the way the "read"
72 command works, the file can reside in your personal fvwm user direc‐
73 tory, or be in the fvwm data directory. See the description of the
74 read command in the fvwm man page for more information about the envi‐
75 ronment variable $FVWM_USERDIR.
76
77 Then FvwmForm reads the rest of the configuration fvwm has stored up.
78 Fvwm stores configuration on an ongoing basis. The initial configura‐
79 tion comes from the .fvwm2rc file. Other sources, including "Read"
80 commands can define a form.
81
82 When letting FvwmForm and fvwm read files, remember that these files
83 contain commands that can execute shell commands, so you should be
84 careful about setting permissions on these files.
85
86 When FvwmForm is invoked with a window context, e.g. from a window
87 menu, all commands it sends to Fvwm will have that window context.
88 This would allow FvwmForm to control the window it is invoked from.
89
90 After all the configuration commands have been read, FvwmForm displays
91 the form defined by the commands.
92
93
95 FvwmForm creates a built-in form named "FvwmForm-Form" that creates a
96 file called ".FvwmForm". This file contains saved default form colors
97 and fonts. Other forms use these defaults unless they are overridden
98 within the form.
99
100 The default creating form would normally be invoked from a "module
101 menu". For example, if you call your module menu "Module-Popup", you
102 would add the line:
103 AddToMenu "Module-Popup" "FvwmForm Defaults" FvwmForm FvwmForm-Form
104 When you select "FvwmForm Defaults" from your module menu, a form is
105 displayed that shows the current defaults and allows you to change
106 them. If you activate the "Save Restart Me" button, the ".FvwmForm"
107 file is written and "FvwmForm-Form" exits and restarts to show the new
108 defaults.
109
110 An example of what this file might contain after a save is:
111 # This file last created by FvwmForm-Form on Sun Nov 28 11:18:26 EST 1999.
112 *FvwmFormDefault: Font 10x20
113 *FvwmFormDefault: InputFont 8x13bold
114 *FvwmFormDefault: ButtonFont 10x20
115 *FvwmFormDefault: TimeoutFont 10x20
116 *FvwmFormDefault: Fore white
117 *FvwmFormDefault: Back cornflowerblue
118 *FvwmFormDefault: Colorset -1
119 *FvwmFormDefault: ItemFore green
120 *FvwmFormDefault: ItemBack gray40
121 *FvwmFormDefault: ItemColorset -1
122 *FvwmFormDefault: ButtonPointer hand2
123 *FvwmFormDefault: ButtonInPointer star
124 *FvwmFormDefault: InputPointer gumby
125 *FvwmFormDefault: ButtonPointerFore blue
126 *FvwmFormDefault: ButtonPointerBack gray
127 *FvwmFormDefault: ButtonInPointerFore gray
128 *FvwmFormDefault: ButtonInPointerBack blue
129 *FvwmFormDefault: InputPointerFore
130 *FvwmFormDefault: InputPointerBack
131 The commands in this file are just like any other FvwmForm command
132 except that they start with "*FvwmFormDefault".
133
134 FvwmForm only reads the file ".FvwmForm" the first time it is started
135 or after the file is changed by "FvwmForm-Form". It does so by sending
136 the command "*FvwmFormDefault: Read x". With "x" set to "y" or "n".
137 "n" makes FvwmForm send a "read .FvwmForm quiet" command to fvwm.
138
139
141 If you supply variables and values on the command line used to start
142 FvwmForm (like this):
143
144 Module FvwmForm MyForm ACTION=Browse "TITLE=Browse Form"
145
146 Then all FvwmForm input commands undergo variable substitution. The
147 variables from the command line are exported. Then every command gets
148 expanded using the variables from the environment. For example, assum‐
149 ing the above invocation of "MyForm", commands would be changed like
150 this:
151
152 Before *MyForm: Text "$TITLE, Home $HOME, Going to $ACTION"
153 After *MyForm: TEXT "Browse Form, Home /home/me, Going to Browse"
154
155 Using this facility should make it possible for one form to be used for
156 different sets of input data.
157
158
160 The following commands can be set in the .fvwm2rc file or thru any of
161 the other ways that fvwm can accept commands. The simplest technique
162 is to create a file in the read-only architecture-independent data
163 directory, [PREFIX/share/fvwm] or your personal fvwm directory
164 [$HOME/.fvwm], that matches the form alias.
165
166 In the following paragraphs the string "FvwmForm" would normally be the
167 form alias.
168
169 FvwmForm reads commands before the form is ever displayed, and while
170 the form is being displayed.
171
172 The following commands are accepted before the form is displayed:
173 Back
174 Button
175 ButtonFont
176 ButtonInPointer
177 ButtonInPointerFore
178 ButtonInPointerBack
179 ButtonPointer
180 ButtonPointerFore
181 ButtonPointerBack
182 Choice
183 Command
184 Colorset
185 Font
186 Fore
187 GrabServer
188 Input
189 InputFont
190 InputPointer
191 ItemBack
192 ItemColorset
193 ItemFore
194 InputPointerFore
195 InputPointerBack
196 Line
197 Message
198 PadVText
199 Position
200 Selection
201 Text
202 Timeout
203 TimeoutFont
204 Title
205 UseData
206 WarpPointer
207
208 The following commands are accepted while the form is displayed:
209 Map
210 Stop
211 UnMap
212
213 The "Map", "UnMap" and "Stop" facility is under development and is cur‐
214 rently not explained in this document, since it is likely to change.
215
216 The order of the options DOES matter. The first background text color,
217 "*FvwmFormBack", encountered before a displayable item sets the default
218 background color for the entire form.
219
220 Other than that, colors, fonts, text, choices and buttons can be inter‐
221 mixed in any order. The are no builtin limits on form size, number of
222 items on a form, or number of fonts or colors used.
223
224
225 *FvwmForm: GrabServer
226 This option makes FvwmForm grab the mouse pointer on startup. This
227 feature is useful for things like logout verification.
228
229 *FvwmForm: WarpPointer
230 This option makes FvwmForm warp the mouse pointer into its window
231 on startup. It saves the user some mouse-travelling.
232
233 *FvwmForm: Geometry geometry
234 Specifies the FvwmForm window location. This is similar to what
235 the Position option does but is more flexible.
236
237 *FvwmForm: Position x y
238 Puts the FvwmForm window at location (x, y) on the screen. By con‐
239 vention, a negative x (y) value measures distance from the right
240 (bottom) of the screen.
241
242 If this option is omitted, FvwmForm starts at the center of the
243 screen.
244
245 *FvwmForm: Colorset n
246 Tells the module to use colorset n. See FvwmTheme.
247
248 *FvwmForm: Back color
249 Specifies the background color of the FvwmForm window and any text
250 in the window. The first background color FvwmForm reads deter‐
251 mines the overall screen background color. Switches off the Col‐
252 orset option. See DEFAULTS.
253
254 *FvwmForm: Fore color
255 Specifies the foreground color for displaying text labels.
256 Switches off the Colorset option. See DEFAULTS.
257
258 *FvwmForm: ItemColorset n
259 Tells the module to use colorset n for items. See FvwmTheme.
260
261 *FvwmForm: ItemBack color
262 Specifies the background color for the text input windows, and the
263 buttons. Buttons are displayed as 3D depressable buttons. Inputs
264 are displayed as 3D indented fields. Medium shade background col‐
265 ors work best. Switches off the ItemColorset option. See
266 DEFAULTS.
267
268 *FvwmForm: ItemFore color
269 Specifies the foreground color for the text input strings and but‐
270 ton text. Switches off the ItemColorset option. See DEFAULTS.
271
272 *FvwmForm: Font font
273 Specifies the font for displaying plain text. See DEFAULTS.
274
275 *FvwmForm: ButtonFont font
276 Specifies the font for text in the action buttons. See DEFAULTS.
277
278 *FvwmForm: InputFont font
279 Specifies the font for text input. See DEFAULTS.
280
281 *FvwmForm: TimeoutFont font
282 Specifies the font for display the timeout counter and related
283 text. See DEFAULTS.
284
285 *FvwmForm: Line justification
286 Starts a new line. A line can contain any number of text, input,
287 buttons and choice items. A FvwmForm window can have any number of
288 lines. The width of the window is that of the longest line.
289
290 Justification of items in the line is specified by justification,
291 which can be one of the following:
292
293 left Items are justified to the left of the window.
294
295 right Items are justified to the right of the window.
296
297 center Items are placed in the center of the window.
298
299 expand If there is only one item in the line, the item is cen‐
300 tered in the window. If two or more items are present,
301 they are spread to fill the whole width of the window.
302
303 *FvwmForm: Message
304 Defines a text area on the form that contains the last error mes‐
305 sage from fvwm. For purposes of determining form size, the message
306 area is considered to be 80 bytes long. Its actual length is the
307 same as the message received. If the message exceeds 80 bytes, you
308 can see the rest of the message by resizing the form.
309
310 You should not attempt to put any text, buttons or input fields on
311 the same line after a message field. Messages greater than 80
312 bytes will overlay the remainder of the line.
313
314 *FvwmForm: PadVText Pixels
315 The number of pixels used as vertical padding between text items,
316 line to line. The default is 6 which looks good on lines contain‐
317 ing text intermixed with input boxes, choices or buttons.
318
319 For straight text, such as might appear on a help form, padding of
320 zero looks better.
321
322 (There are lots of other padding values used in form layout which
323 can't currently be changed with commands.)
324
325 *FvwmForm: Text string
326 Displays string as plain text. Line breaks must be achieved by
327 multiple *FvwmForm: Line and *FvwmForm: Text options. Blanks may
328 be used to provide extra padding between items.
329
330 *FvwmForm: Title string
331 Displays string as the window's title. The string must be enclosed
332 in double quotes. Using this command with anything other than a
333 string enclosed in quotes creates a blank title. If this command
334 is not used, the window title is the form alias.
335
336 *FvwmForm: Input name size init_string
337 Specifies a text input item with name name. A sub window of size
338 characters in width is used for editing. If init_string is
339 present, it is the initial string when FvwmForm starts or resets
340 itself. The default initial string is "".
341
342 You can mouse paste into an input field using button 2. Buttons 1
343 and 3 move the cursor in an input field.
344
345 Input fields are always in insert mode, overtyping is not sup‐
346 ported.
347
348 Emacs type keystrokes are supported.
349
350 Control-a, Home and Begin move to the front of an input field.
351 Control-e and End move to the end of an input field. Control-b and
352 Left move left in an input field. Control-f and Right move right
353 in an input field. Control-p, Up, and Shift-Tab move to a previous
354 input field if any, if the form has one input field, recall previ‐
355 ous value. Control-n, Down, Return, Line-feed and Tab move to the
356 next input field if any, if the form has one input field, for con‐
357 trol-n and Down, restore previous input value. Control-h moves
358 backward in an input field erasing a character. Control-d and
359 Delete delete the next character in an input field. Control-k
360 erases for the cursor to the end of an input field. Control-u
361 erases the entire input field.
362
363 When a form executes a command, all the input values are saved in a
364 ring of input history 50 items deep.
365
366 Meta(mod2)-"<" retrieves the previous value of an input field.
367 Meta(mod2)-">" retrieves the next value of an input field.
368
369 (For forms with one input field, use the much easier arrow keys.)
370
371
372 *FvwmForm: Selection name type
373 This option starts a selection item with name name. Its choices
374 are specified in following configuration commands. The option type
375 is one of the following:
376
377 single The selections are mutually exclusive.
378
379 multiple This is a multiple-choice selection.
380
381 *FvwmForm: Choice name value on | off string
382 Specifies a choice for a proceeding selection. The choice item has
383 a name and a value these are used in commands. See *FvwmForm: Com‐
384 mand. The string is displayed to the right of the choice button as
385 a label.
386
387 The choice assumes the specified initial state ("on" means
388 selected) when FvwmForm starts or resets. If the selections are
389 mutually exclusive, FvwmForm does NOT detect inconsistencies in the
390 initial states of the choices, i.e. two or none of the choices can
391 be selected. However, once the user selects a choice, FvwmForm
392 assures only one is selected.
393
394 *FvwmForm: Button type string [key]
395 This option specifies an action button. The button has string as a
396 label, and executes a set of Fvwm command when it is activated.
397 The commands are the following *FvwmForm: Commands.
398
399 The optional key specifies a keyboard shortcut that activates the
400 button. It is in either a control character, specified as ^@, ^A,
401 ..., ^_, or a function key, specified as F1, F2, ..., F35. Control
402 keys that are used for cursor movement in text input fields cannot
403 activate any buttons, with the exception of TAB (^I), RETURN (^M),
404 LINEFEED (^J), which can activate a button when the cursor is in
405 the last text input field.
406
407 The behavior of the button is determined by type:
408
409 continue FvwmForm continues execution after sending the com‐
410 mands.
411
412 restart After sending the commands, FvwmForm resets all the
413 values to the initial ones, and then continues execu‐
414 tion.
415
416 quit FvwmForm quits after sending the commands.
417
418 *FvwmForm: Command command
419 This option specifies an Fvwm command associated with the current
420 button. There can be more than one command attached to a button.
421 Commands that appear before any *FvwmForm: Button option are exe‐
422 cuted at start-up time. This is usually a beep that gets the
423 user's attention.
424
425 Commands starting with an exclamation mark (!) are executed by
426 FvwmForm, all other commands are sent to Fvwm for execution.
427 Before sending each command to Fvwm, FvwmForm recognizes variables
428 of the following forms, and supply values to them.
429
430 $(name) If name corresponds to a text input field, the result
431 is the user's input string. The special chars single-
432 quote, double-quote and backslash are preceded by a
433 backslash.
434
435 If name corresponds to a choice, the result is the
436 value of the choice (as specified in *FvwmForm: Choice)
437 if the choice is selected. If the choice is not
438 selected, the result is a blank string.
439
440 If name corresponds to a selection, the result will be
441 a list of the selected values of all its choices sepa‐
442 rated by spaces.
443
444 $(name?string) If name is a text input field and its value is not an
445 empty string, the result is string, with recursive
446 variable substitution applied. If the input value is
447 empty, the result is empty.
448
449 If name is a choice and it is selected, the result is
450 string, with recursive variable substitution applied.
451 If the choice is not selected, the result is empty.
452
453 $(name!string) The same as the above, except that the converse condi‐
454 tions are taken.
455
456 When using the "?" and "!" forms to pass a string, the
457 string is delimited by a right parenthesis. If you
458 need to put a right parenthesis in a string, precede
459 the right parenthesis with a backslash.
460
461
462 *FvwmForm: UseData datafile leading
463 Tells FvwmForm to read a data file and extract data from module
464 commands that match the "leading" argument and an input, choice, or
465 selection variable in a form.
466
467 This lets a form display current fvwm module configuration data.
468 For an example of how this works, examine the file "FvwmForm-
469 Rlogin" which is installed in read-only architecture-independent
470 data directory, [PREFIX/share/fvwm] and shown below.
471
472 For choices, the setting of the button is represented as the word
473 "on", all other values for a setting are treated as off.
474
475 For selections, the setting of each choice button is determined by
476 matching the current value of the selection against each choice.
477 Currently, this only works correctly for selections that allow a
478 single choice.
479
480 *FvwmForm: ButtonPointer pointername
481 Change the default mouse pointer (hand2) used when hovering over a
482 button. The pointername must be one of the names defined in the
483 include file X11/cursorfont.h (without the XC_ prefix). See
484 DEFAULTS.
485
486
487 *FvwmForm: ButtonInPointer pointername
488 Change the default mouse pointer (hand1) used while a button is
489 pressed in. The pointername must be one of the names defined in
490 the include file X11/cursorfont.h (without the XC_ prefix). See
491 DEFAULTS.
492
493
494 *FvwmForm: InputPointer pointername
495 Change the default mouse pointer (xterm) used while the pointer is
496 over a text field. The pointername must be one of the names
497 defined in the include file X11/cursorfont.h (without the XC_ pre‐
498 fix). See DEFAULTS.
499
500
501 *FvwmForm: ButtonPointerFore|Back color
502 Change the default mouse pointer foreground and background colors
503 used when hovering over a button. See DEFAULTS.
504
505
506 *FvwmForm: ButtonInPointerFore|Back color
507 Change the default mouse pointer foreground and background colors
508 used while a button is pressed in. See DEFAULTS.
509
510
511 *FvwmForm: InputPointerFore|Back color
512 Change the default mouse pointer foreground and background colors
513 used while the pointer is over a text field. See DEFAULTS.
514
515
516 *FvwmForm: Timeout seconds command "text"
517 Set up FvwmForm to time out after the amount of seconds specified.
518 When the timer hits zero, command executes. The text field is dis‐
519 played much like a Text field, except that a '%%' in the line is
520 replaced automatically by the amount of time left on the timer.
521 The value gets updated every second as the timer counts down.
522 There can only be one timeout field per form.
523
524
526 All of the following "examples" are installed in the read-only archi‐
527 tecture-independent data directory, [PREFIX/share/fvwm], during fvwm
528 installation.
529
530 The following commands create a menu to invoke the examples:
531
532 DestroyMenu Forms
533 AddToMenu Forms "&Q. QuitVerify" Module FvwmForm FvwmForm-QuitVerify
534 AddToMenu Forms "&C. Capture" Module FvwmForm FvwmForm-Capture
535 AddToMenu Forms "&R. Rlogin" Module FvwmForm FvwmForm-Rlogin
536 AddToMenu Forms "&T. Talk" Module FvwmForm FvwmForm-Talk
537
539 This example simulates the mwm way of confirming logout. Return does
540 the logout, Escape cancels logout. It times out after 20 seconds and
541 performs the equivalent of the 'Logout' button.
542 DestroyModuleConfig FvwmForm-QuitVerify: *
543 *FvwmForm-QuitVerify: GrabServer
544 *FvwmForm-QuitVerify: WarpPointer
545 *FvwmForm-QuitVerify: Command Beep
546 *FvwmForm-QuitVerify: Line center
547 *FvwmForm-QuitVerify: Text "Do you really want to logout?"
548 *FvwmForm-QuitVerify: Line expand
549 *FvwmForm-QuitVerify: Button quit "Logout" ^M
550 *FvwmForm-QuitVerify: Command Quit
551 *FvwmForm-QuitVerify: Button restart "Restart" ^R
552 *FvwmForm-QuitVerify: Command Restart
553 *FvwmForm-QuitVerify: Button quit "Cancel" ^[
554 *FvwmForm-QuitVerify: Command Nop
555 *FvwmForm-QuitVerify: Timeout 20 Quit "Automatic logout will occur in %% seconds."
556
557
559 This example lets the user type in a host name, an optional user name,
560 and opens an xterm window from the remote host.
561 DestroyModuleConfig FvwmForm-Rlogin: *
562 *FvwmForm-Rlogin: WarpPointer
563 *FvwmForm-Rlogin: Line center
564 *FvwmForm-Rlogin: Text "Login to Remote Host"
565 *FvwmForm-Rlogin: Line center
566 *FvwmForm-Rlogin: Text "Host:"
567 *FvwmForm-Rlogin: Input HostName 20 ""
568 *FvwmForm-Rlogin: Line center
569 *FvwmForm-Rlogin: Selection UserSel single
570 *FvwmForm-Rlogin: Choice Default Default on "same user"
571 *FvwmForm-Rlogin: Choice Custom Custom off "user:"
572 *FvwmForm-Rlogin: Input UserName 10 ""
573 *FvwmForm-Rlogin: Line expand
574 *FvwmForm-Rlogin: Button quit "Login" ^M
575 *FvwmForm-Rlogin: Command Exec exec ssh $(Custom?-l $(UserName)) $(HostName) xterm -T xterm@$(HostName) -display $HOSTDISPLAY &
576 # Before saving the data, remove any previously saved data:
577 *FvwmForm-Rlogin: Command DestroyModuleConfig FvwmForm-RloginDefault: *
578 # The "Login" button causes a login and a saving of the current data:
579 *FvwmForm-Rlogin: Command !( /bin/echo \
580 "# Created by FvwmForm-Rlogin on: `/bin/date`."; /bin/echo \
581 '*FvwmForm-RloginDefault: HostName $(HostName)'; /bin/echo \
582 '*FvwmForm-RloginDefault: UserName $(UserName)'; /bin/echo \
583 '*FvwmForm-RloginDefault: Default $(Default?on)'; /bin/echo \
584 '*FvwmForm-RloginDefault: Custom $(Custom?on)' \
585 ) > ${FVWM_USERDIR}/.FvwmForm-Rlogin
586 *FvwmForm-Rlogin: Button restart "Reset"
587 *FvwmForm-Rlogin: Button quit "Cancel" ^[
588 *FvwmForm-Rlogin: Command Nop
589 # Tell FvwmForm to read vars from the .FvwmForm-RloginDefault file:
590 *FvwmForm-Rlogin: UseData .FvwmForm-Rlogin *FvwmForm-RloginDefault
591
592
594 This example provides a front-end to xwd, xwud, and xpr.
595 DestroyModuleConfig FvwmForm-Capture: *
596 *FvwmForm-Capture: Line center
597 *FvwmForm-Capture: Text "Capture Window"
598 *FvwmForm-Capture: Line left
599 *FvwmForm-Capture: Text "File: "
600 *FvwmForm-Capture: Input file 25 "/tmp/Capture"
601 *FvwmForm-Capture: Line left
602 *FvwmForm-Capture: Text "Printer: "
603 *FvwmForm-Capture: Input printer 20 "$PRINTER"
604 *FvwmForm-Capture: Line expand
605 *FvwmForm-Capture: Selection PtrType single
606 *FvwmForm-Capture: Choice PS ps on "PostScript"
607 *FvwmForm-Capture: Choice Ljet ljet off "HP LaserJet"
608 *FvwmForm-Capture: Line left
609 *FvwmForm-Capture: Text "xwd options:"
610 *FvwmForm-Capture: Line expand
611 *FvwmForm-Capture: Selection Options multiple
612 *FvwmForm-Capture: Choice Brd -nobdrs off "No border"
613 *FvwmForm-Capture: Choice Frm -frame on "With frame"
614 *FvwmForm-Capture: Choice XYZ -xy off "XY format"
615 *FvwmForm-Capture: Line expand
616 *FvwmForm-Capture: Button continue "Capture" ^M
617 *FvwmForm-Capture: Command Exec exec xwd -out $(file) $(Options) &
618 *FvwmForm-Capture: Button continue "Preview"
619 *FvwmForm-Capture: Command Exec exec xwud -in $(file) &
620 *FvwmForm-Capture: Button continue "Print"
621 *FvwmForm-Capture: Command Exec exec xpr -device $(PtrType) $(file) | lpr -P $(printer) &
622 *FvwmForm-Capture: Button quit "Quit"
623
624
626 This example provides a replacement for the module FvwmTalk. There are
627 2 forms, "FvwmForm-Talk." which executes commands, or sends commands to
628 fvwm for execution, and "FvwmForm-TalkHelp." which is a help form.
629
630 In the help form, notice how vertical line spacing is changed. Normal
631 FvwmForm line spacing assumes text is intermixed with buttons, help
632 forms require different spacing.
633
634 # FvwmForm-Talk - Basic replacement for FvwmTalk
635 DestroyModuleConfig FvwmForm-Talk: *
636 *FvwmForm-Talk: WarpPointer
637 # Layout
638 *FvwmForm-Talk: Line center
639 *FvwmForm-Talk: Text "Talk to Fvwm"
640 *FvwmForm-Talk: Line left
641 *FvwmForm-Talk: Text "Command:"
642 *FvwmForm-Talk: Input Command 80 ""
643 *FvwmForm-Talk: Line left
644 *FvwmForm-Talk: Text "Msg:"
645 *FvwmForm-Talk: Message
646 *FvwmForm-Talk: Line center
647 # Buttons
648 *FvwmForm-Talk: Button restart "Return - Execute" ^M
649 *FvwmForm-Talk: Command $(Command)
650 *FvwmForm-Talk: Button continue "F1 - Help" F1
651 *FvwmForm-Talk: Command Module FvwmForm FvwmForm-TalkHelp
652 *FvwmForm-Talk: Button restart "F3 - Reset input" F3
653 *FvwmForm-Talk: Command Nop
654 *FvwmForm-Talk: Button quit "F4 - Dismiss" F4
655 *FvwmForm-Talk: Command Nop
656
657 # FvwmForm-TalkHelp - Help Text for FvwmForm-Talk
658 DestroyModuleConfig FvwmForm-TalkHelp: *
659 *FvwmForm-TalkHelp: WarpPointer
660 # Layout
661 *FvwmForm-TalkHelp: Line center
662 *FvwmForm-TalkHelp: Text "Talk to Fvwm - Help"
663 *FvwmForm-TalkHelp: Line left
664 *FvwmForm-TalkHelp: Text " "
665 *FvwmForm-TalkHelp: Line left
666 *FvwmForm-TalkHelp: PadVText 0
667 *FvwmForm-TalkHelp: Text "Enter commands in the
668 *FvwmForm-TalkHelp: Line left
669 *FvwmForm-TalkHelp: Text "Commands beginning with
670 *FvwmForm-TalkHelp: Line left
671 *FvwmForm-TalkHelp: Text "shell as a sub-process of the form."
672 *FvwmForm-TalkHelp: Line left
673 *FvwmForm-TalkHelp: Text "All other commands are sent to fvwm for execution."
674 *FvwmForm-TalkHelp: Line left
675 *FvwmForm-TalkHelp: Text ""
676 *FvwmForm-TalkHelp: Line left
677 *FvwmForm-TalkHelp: Text "Fvwm error messages are shown on the
678 *FvwmForm-TalkHelp: Line left
679 *FvwmForm-TalkHelp: Text ""
680 # Buttons
681 *FvwmForm-TalkHelp: Line center
682 *FvwmForm-TalkHelp: Button quit "Return - Dismiss" ^M
683 *FvwmForm-TalkHelp: Command Nop
684
685
687 FvwmForm is a fairly simple method of providing input. There is no
688 input validation facility. FvwmForm has no way of dealing with lists.
689
690 Report bugs to the fvwm-workers list.
691
692
694 FvwmForm is original work of Thomas Zuwei Feng (ztfeng@math.prince‐
695 ton.edu).
696
697 Copyright Feb 1995, Thomas Zuwei Feng. No guarantees or warranties are
698 provided or implied in any way whatsoever. Use this program at your
699 own risk. Permission to use, modify, and redistribute this program is
700 hereby given, provided that this copyright is kept intact.
701
702
704 During the fall of 1998, Dan Espen removed all form size limits, added
705 unlimited font and color changing, form spacing control, configuration
706 file reading, global control of appearance, synchronous command execu‐
707 tion, Error message display, variable substitution, configurable point‐
708 ers, and lots of other damage. No additional copyright is imposed.
709
710
711
712Fvwm 09 May 2010 (2.5.30) FvwmForm(1)