1FvwmForm(1)                      Fvwm Modules                      FvwmForm(1)
2
3
4

NAME

6       FvwmForm - input form module for Fvwm
7

SYNOPSIS

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

DESCRIPTION

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

INITIALIZATION

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

DEFAULTS

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

VARIABLE SUBSTITUTION

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

CONFIGURATION

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       Separator
202       Text
203       Timeout
204       TimeoutFont
205       Title
206       UseData
207       WarpPointer
208
209       The following commands are accepted while the form is displayed:
210       Map
211       Stop
212       UnMap
213
214       The "Map", "UnMap" and "Stop" facility is under development and is cur‐
215       rently not explained in this document, since it is likely to change.
216
217       The order of the options DOES matter.  The first background text color,
218       "*FvwmFormBack", encountered before a displayable item sets the default
219       background color for the entire form.
220
221       Other than that, colors, fonts, text, choices and buttons can be inter‐
222       mixed in any order.  The are no builtin limits on form size, number  of
223       items on a form, or number of fonts or colors used.
224
225
226       *FvwmForm: GrabServer
227           This option makes FvwmForm grab the mouse pointer on startup.  This
228           feature is useful for things like logout verification.
229
230       *FvwmForm: WarpPointer
231           This option makes FvwmForm warp the mouse pointer into  its  window
232           on startup.  It saves the user some mouse-travelling.
233
234       *FvwmForm: Geometry geometry
235           Specifies  the  FvwmForm  window location.  This is similar to what
236           the Position option does but is more flexible.
237
238       *FvwmForm: Position x y
239           Puts the FvwmForm window at location (x, y) on the screen.  By con‐
240           vention,  a  negative  x (y) value measures distance from the right
241           (bottom) of the screen.
242
243           If this option is omitted, FvwmForm starts at  the  center  of  the
244           screen.
245
246       *FvwmForm: Colorset n
247           Tells the module to use colorset n.
248
249       *FvwmForm: Back color
250           Specifies  the background color of the FvwmForm window and any text
251           in the window.  The first background color  FvwmForm  reads  deter‐
252           mines  the  overall  screen background color. Switches off the Col‐
253           orset option.  See DEFAULTS.
254
255       *FvwmForm: Fore color
256           Specifies  the  foreground  color  for  displaying   text   labels.
257           Switches off the Colorset option.  See DEFAULTS.
258
259       *FvwmForm: ItemColorset n
260           Tells the module to use colorset n for items.
261
262       *FvwmForm: ItemBack color
263           Specifies  the background color for the text input windows, and the
264           buttons.  Buttons are displayed as 3D depressable buttons.   Inputs
265           are  displayed as 3D indented fields.  Medium shade background col‐
266           ors  work  best.   Switches  off  the  ItemColorset  option.    See
267           DEFAULTS.
268
269       *FvwmForm: ItemFore color
270           Specifies  the foreground color for the text input strings and but‐
271           ton text. Switches off the ItemColorset option.  See DEFAULTS.
272
273       *FvwmForm: Font font
274           Specifies the font for displaying plain text.  See DEFAULTS.
275
276       *FvwmForm: ButtonFont font
277           Specifies the font for text in the action buttons.  See DEFAULTS.
278
279       *FvwmForm: InputFont font
280           Specifies the font for text input.  See DEFAULTS.
281
282       *FvwmForm: TimeoutFont font
283           Specifies the font for display  the  timeout  counter  and  related
284           text.  See DEFAULTS.
285
286       *FvwmForm: Line justification
287           Starts  a  new line.  A line can contain any number of text, input,
288           buttons and choice items.  A FvwmForm window can have any number of
289           lines.  The width of the window is that of the longest line.
290
291           Justification  of  items in the line is specified by justification,
292           which can be one of the following:
293
294       left            Items are justified to the left of the window.
295
296       right           Items are justified to the right of the window.
297
298       center          Items are placed in the center of the window.
299
300       expand          If there is only one item in the line, the item is cen‐
301                       tered in the window.  If two or more items are present,
302                       they are spread to fill the whole width of the window.
303
304       *FvwmForm: Message
305           Defines a text area on the form that contains the last  error  mes‐
306           sage from fvwm.  For purposes of determining form size, the message
307           area is considered to be 80 bytes long.  Its actual length  is  the
308           same as the message received.  If the message exceeds 80 bytes, you
309           can see the rest of the message by resizing the form.
310
311           You should not attempt to put any text, buttons or input fields  on
312           the  same  line  after  a  message field.  Messages greater than 80
313           bytes will overlay the remainder of the line.
314
315       *FvwmForm: PadVText Pixels
316           The number of pixels used as vertical padding between  text  items,
317           line  to line.  The default is 6 which looks good on lines contain‐
318           ing text intermixed with input boxes, choices or buttons.
319
320           For straight text, such as might appear on a help form, padding  of
321           zero looks better.
322
323           (There  are  lots of other padding values used in form layout which
324           can't currently be changed with commands.)
325
326       *FvwmForm: Text string
327           Displays string as plain text.  Line breaks  must  be  achieved  by
328           multiple  *FvwmForm:  Line and *FvwmForm: Text options.  Blanks may
329           be used to provide extra padding between items.
330
331       *FvwmForm: Title string
332           Displays string as the window's title.  The string must be enclosed
333           in  double  quotes.   Using this command with anything other than a
334           string enclosed in quotes creates a blank title.  If  this  command
335           is not used, the window title is the form alias.
336
337       *FvwmForm: Input name size init_string
338           Specifies  a  text input item with name name.  A sub window of size
339           characters in  width  is  used  for  editing.   If  init_string  is
340           present,  it  is  the initial string when FvwmForm starts or resets
341           itself.  The default initial string is "".
342
343           You can mouse paste into an input field using button 2.  Buttons  1
344           and 3 move the cursor in an input field.
345
346           Input  fields  are  always  in  insert mode, overtyping is not sup‐
347           ported.
348
349           Emacs type keystrokes are supported.
350
351           Control-a, Home and Begin move to the  front  of  an  input  field.
352           Control-e and End move to the end of an input field.  Control-b and
353           Left move left in an input field.  Control-f and Right  move  right
354           in an input field.  Control-p, Up, and Shift-Tab move to a previous
355           input field if any, if the form has one input field, recall  previ‐
356           ous  value.  Control-n, Down, Return, Line-feed and Tab move to the
357           next input field if any, if the form has one input field, for  con‐
358           trol-n  and  Down,  restore  previous input value.  Control-h moves
359           backward in an input field  erasing  a  character.   Control-d  and
360           Delete  delete  the  next  character  in an input field.  Control-k
361           erases for the cursor to the end  of  an  input  field.   Control-u
362           erases the entire input field.
363
364           When a form executes a command, all the input values are saved in a
365           ring of input history 50 items deep.
366
367           Meta(mod2)-"<" retrieves the previous  value  of  an  input  field.
368           Meta(mod2)-">" retrieves the next value of an input field.
369
370           (For forms with one input field, use the much easier arrow keys.)
371
372
373       *FvwmForm: Selection name type
374           This  option  starts  a selection item with name name.  Its choices
375           are specified in following configuration commands.  The option type
376           is one of the following:
377
378       single          The selections are mutually exclusive.
379
380       multiple        This is a multiple-choice selection.
381
382
383       *FvwmForm: Separator
384           Draws  a 2 pixel shaded line across the form as a visual indication
385           of a separate area.
386
387
388       *FvwmForm: Choice name value on | off string
389           Specifies a choice for a proceeding selection.  The choice item has
390           a name and a value these are used in commands.  See *FvwmForm: Com‐
391           mand.  The string is displayed to the right of the choice button as
392           a label.
393
394           The   choice  assumes  the  specified  initial  state  ("on"  means
395           selected) when FvwmForm starts or resets.  If  the  selections  are
396           mutually exclusive, FvwmForm does NOT detect inconsistencies in the
397           initial states of the choices, i.e. two or none of the choices  can
398           be  selected.   However,  once  the user selects a choice, FvwmForm
399           assures only one is selected.
400
401       *FvwmForm: Button type string [key]
402           This option specifies an action button.  The button has string as a
403           label,  and  executes  a  set of Fvwm command when it is activated.
404           The commands are the following *FvwmForm: Commands.
405
406           The optional key specifies a keyboard shortcut that  activates  the
407           button.   It is in either a control character, specified as ^@, ^A,
408           ..., ^_, or a function key, specified as F1, F2, ..., F35.  Control
409           keys  that are used for cursor movement in text input fields cannot
410           activate any buttons, with the exception of TAB (^I), RETURN  (^M),
411           LINEFEED  (^J),  which  can activate a button when the cursor is in
412           the last text input field.
413
414           The behavior of the button is determined by type:
415
416       continue        FvwmForm continues execution  after  sending  the  com‐
417                       mands.
418
419       restart         After  sending  the  commands,  FvwmForm resets all the
420                       values to the initial ones, and then  continues  execu‐
421                       tion.
422
423       quit            FvwmForm quits after sending the commands.
424
425       *FvwmForm: Command command
426           This  option  specifies an Fvwm command associated with the current
427           button.  There can be more than one command attached to  a  button.
428           Commands  that  appear before any *FvwmForm: Button option are exe‐
429           cuted at start-up time.  This is  usually  a  beep  that  gets  the
430           user's attention.
431
432           Commands  starting  with  an  exclamation  mark (!) are executed by
433           FvwmForm, all other  commands  are  sent  to  Fvwm  for  execution.
434           Before  sending each command to Fvwm, FvwmForm recognizes variables
435           of the following forms, and supply values to them.
436
437       $(name)         If name corresponds to a text input field,  the  result
438                       is  the user's input string.  The special chars single-
439                       quote, double-quote and backslash  are  preceded  by  a
440                       backslash.
441
442                       If  name  corresponds  to  a  choice, the result is the
443                       value of the choice (as specified in *FvwmForm: Choice)
444                       if  the  choice  is  selected.   If  the  choice is not
445                       selected, the result is a blank string.
446
447                       If name corresponds to a selection, the result will  be
448                       a  list of the selected values of all its choices sepa‐
449                       rated by spaces.
450
451       $(name?string)  If name is a text input field and its value is  not  an
452                       empty  string,  the  result  is  string, with recursive
453                       variable substitution applied.  If the input  value  is
454                       empty, the result is empty.
455
456                       If  name  is a choice and it is selected, the result is
457                       string, with recursive variable  substitution  applied.
458                       If the choice is not selected, the result is empty.
459
460       $(name!string)  The  same as the above, except that the converse condi‐
461                       tions are taken.
462
463                       When using the "?" and "!" forms to pass a string,  the
464                       string  is  delimited  by  a right parenthesis.  If you
465                       need to put a right parenthesis in  a  string,  precede
466                       the right parenthesis with a backslash.
467
468
469       *FvwmForm: UseData datafile leading
470           Tells  FvwmForm  to  read  a data file and extract data from module
471           commands that match the "leading" argument and an input, choice, or
472           selection variable in a form.
473
474           This  lets  a  form display current fvwm module configuration data.
475           For an example of how  this  works,  examine  the  file  "FvwmForm-
476           Rlogin"  which  is  installed in read-only architecture-independent
477           data directory, [PREFIX/share/fvwm] and shown below.
478
479           For choices, the setting of the button is represented as  the  word
480           "on",  all other values for a setting are treated as off.
481
482           For  selections, the setting of each choice button is determined by
483           matching the current value of the selection  against  each  choice.
484           Currently,  this  only  works correctly for selections that allow a
485           single choice.
486
487       *FvwmForm: ButtonPointer pointername
488           Change the default mouse pointer (hand2) used when hovering over  a
489           button.   The  pointername  must be one of the names defined in the
490           include  file  X11/cursorfont.h  (without  the  XC_  prefix).   See
491           DEFAULTS.
492
493
494       *FvwmForm: ButtonInPointer pointername
495           Change  the  default  mouse  pointer (hand1) used while a button is
496           pressed in.  The pointername must be one of the  names  defined  in
497           the  include  file  X11/cursorfont.h (without the XC_ prefix).  See
498           DEFAULTS.
499
500
501       *FvwmForm: InputPointer pointername
502           Change the default mouse pointer (xterm) used while the pointer  is
503           over  a  text  field.   The  pointername  must  be one of the names
504           defined in the include file X11/cursorfont.h (without the XC_  pre‐
505           fix).  See DEFAULTS.
506
507
508       *FvwmForm: ButtonPointerFore|Back color
509           Change  the  default mouse pointer foreground and background colors
510           used when hovering over a button.  See DEFAULTS.
511
512
513       *FvwmForm: ButtonInPointerFore|Back color
514           Change the default mouse pointer foreground and  background  colors
515           used while a button is pressed in.  See DEFAULTS.
516
517
518       *FvwmForm: InputPointerFore|Back color
519           Change  the  default mouse pointer foreground and background colors
520           used while the pointer is over a text field.  See DEFAULTS.
521
522
523       *FvwmForm: Timeout seconds command "text"
524           Set up FvwmForm to time out after the amount of seconds  specified.
525           When the timer hits zero, command executes.  The text field is dis‐
526           played much like a Text field, except that a '%%' in  the  line  is
527           replaced  automatically  by  the  amount of time left on the timer.
528           The value gets updated every  second  as  the  timer  counts  down.
529           There can only be one timeout field per form.
530
531

EXAMPLES

533       All  of  the following "examples" are installed in the read-only archi‐
534       tecture-independent data directory,  [PREFIX/share/fvwm],  during  fvwm
535       installation.
536
537       The following commands create a menu to invoke the examples:
538
539       DestroyMenu Forms
540       AddToMenu Forms "&Q. QuitVerify" Module FvwmForm FvwmForm-QuitVerify
541       AddToMenu Forms "&C. Capture"    Module FvwmForm FvwmForm-Capture
542       AddToMenu Forms "&R. Rlogin"     Module FvwmForm FvwmForm-Rlogin
543       AddToMenu Forms "&T. Talk"       Module FvwmForm FvwmForm-Talk
544

EXAMPLE 1 - Quit Verify

546       This  example  simulates the mwm way of confirming logout.  Return does
547       the logout, Escape cancels logout.  It times out after 20  seconds  and
548       performs the equivalent of the 'Logout' button.
549       DestroyModuleConfig  FvwmForm-QuitVerify: *
550       *FvwmForm-QuitVerify: GrabServer
551       *FvwmForm-QuitVerify: WarpPointer
552       *FvwmForm-QuitVerify: Command     Beep
553       *FvwmForm-QuitVerify: Line        center
554       *FvwmForm-QuitVerify: Text        "Do you really want to logout?"
555       *FvwmForm-QuitVerify: Line        expand
556       *FvwmForm-QuitVerify: Button      quit "Logout" ^M
557       *FvwmForm-QuitVerify: Command     Quit
558       *FvwmForm-QuitVerify: Button      restart   "Restart" ^R
559       *FvwmForm-QuitVerify: Command     Restart
560       *FvwmForm-QuitVerify: Button      quit "Cancel" ^[
561       *FvwmForm-QuitVerify: Command     Nop
562       *FvwmForm-QuitVerify: Timeout     20 Quit "Automatic logout will occur in %% seconds."
563
564

EXAMPLE 2 - Remote Login

566       This  example lets the user type in a host name, an optional user name,
567       and opens an xterm window from the remote host.
568       DestroyModuleConfig  FvwmForm-Rlogin: *
569       *FvwmForm-Rlogin: WarpPointer
570       *FvwmForm-Rlogin: Line         center
571       *FvwmForm-Rlogin: Text         "Login to Remote Host"
572       *FvwmForm-Rlogin: Line         center
573       *FvwmForm-Rlogin: Text         "Host:"
574       *FvwmForm-Rlogin: Input        HostName        20      ""
575       *FvwmForm-Rlogin: Line         center
576       *FvwmForm-Rlogin: Selection    UserSel single
577       *FvwmForm-Rlogin: Choice       Default Default on      "same user"
578       *FvwmForm-Rlogin: Choice       Custom  Custom  off     "user:"
579       *FvwmForm-Rlogin: Input        UserName        10      ""
580       *FvwmForm-Rlogin: Line         expand
581       *FvwmForm-Rlogin: Button       quit    "Login"         ^M
582       *FvwmForm-Rlogin: Command      Exec exec ssh $(Custom?-l $(UserName)) $(HostName) xterm -T xterm@$(HostName) -display $HOSTDISPLAY &
583       # Before saving the data, remove any previously saved data:
584       *FvwmForm-Rlogin: Command DestroyModuleConfig FvwmForm-RloginDefault: *
585       # The "Login" button causes a login and a saving of the current data:
586       *FvwmForm-Rlogin: Command !(                        /bin/echo \
587         "# Created by FvwmForm-Rlogin on: `/bin/date`.";  /bin/echo \
588         '*FvwmForm-RloginDefault: HostName $(HostName)';  /bin/echo \
589         '*FvwmForm-RloginDefault: UserName $(UserName)';  /bin/echo \
590         '*FvwmForm-RloginDefault: Default $(Default?on)'; /bin/echo \
591         '*FvwmForm-RloginDefault: Custom $(Custom?on)' \
592       ) > ${FVWM_USERDIR}/.FvwmForm-Rlogin
593       *FvwmForm-Rlogin: Button       restart "Reset"
594       *FvwmForm-Rlogin: Button       quit    "Cancel"        ^[
595       *FvwmForm-Rlogin: Command      Nop
596       # Tell FvwmForm to read vars from the .FvwmForm-RloginDefault file:
597       *FvwmForm-Rlogin: UseData .FvwmForm-Rlogin *FvwmForm-RloginDefault
598
599

EXAMPLE 3 - Capture Window

601       This example provides a front-end to xwd, xwud, and xpr.
602       DestroyModuleConfig  FvwmForm-Capture: *
603       *FvwmForm-Capture: Line       center
604       *FvwmForm-Capture: Text       "Capture Window"
605       *FvwmForm-Capture: Line       left
606       *FvwmForm-Capture: Text       "File: "
607       *FvwmForm-Capture: Input      file            25      "/tmp/Capture"
608       *FvwmForm-Capture: Line       left
609       *FvwmForm-Capture: Text       "Printer: "
610       *FvwmForm-Capture: Input      printer         20      "$PRINTER"
611       *FvwmForm-Capture: Line       expand
612       *FvwmForm-Capture: Selection  PtrType single
613       *FvwmForm-Capture: Choice     PS      ps      on      "PostScript"
614       *FvwmForm-Capture: Choice     Ljet    ljet    off     "HP LaserJet"
615       *FvwmForm-Capture: Line       left
616       *FvwmForm-Capture: Text       "xwd options:"
617       *FvwmForm-Capture: Line       expand
618       *FvwmForm-Capture: Selection  Options multiple
619       *FvwmForm-Capture: Choice     Brd     -nobdrs off     "No border"
620       *FvwmForm-Capture: Choice     Frm     -frame  on      "With frame"
621       *FvwmForm-Capture: Choice     XYZ     -xy     off     "XY format"
622       *FvwmForm-Capture: Line       expand
623       *FvwmForm-Capture: Button     continue        "Capture"       ^M
624       *FvwmForm-Capture: Command    Exec exec xwd -out $(file) $(Options) &
625       *FvwmForm-Capture: Button     continue        "Preview"
626       *FvwmForm-Capture: Command    Exec exec xwud -in $(file) &
627       *FvwmForm-Capture: Button     continue        "Print"
628       *FvwmForm-Capture: Command    Exec exec xpr -device $(PtrType) $(file) | lpr -P $(printer) &
629       *FvwmForm-Capture: Button     quit            "Quit"
630
631

EXAMPLE 4 - Talk Form

633       This example provides a replacement for the module FvwmTalk.  There are
634       2 forms, "FvwmForm-Talk." which executes commands, or sends commands to
635       fvwm for execution, and "FvwmForm-TalkHelp."  which is a help form.
636
637       In the help form, notice how vertical line spacing is changed.   Normal
638       FvwmForm  line  spacing  assumes  text is intermixed with buttons, help
639       forms require different spacing.
640
641       # FvwmForm-Talk - Basic replacement for FvwmTalk
642       DestroyModuleConfig  FvwmForm-Talk: *
643       *FvwmForm-Talk: WarpPointer
644       # Layout
645       *FvwmForm-Talk: Line         center
646       *FvwmForm-Talk: Text         "Talk to Fvwm"
647       *FvwmForm-Talk: Line         left
648       *FvwmForm-Talk: Text         "Command:"
649       *FvwmForm-Talk: Input        Command 80 ""
650       *FvwmForm-Talk: Line         left
651       *FvwmForm-Talk: Text         "Msg:"
652       *FvwmForm-Talk: Message
653       *FvwmForm-Talk: Line         center
654       # Buttons
655       *FvwmForm-Talk: Button       restart    "Return - Execute"         ^M
656       *FvwmForm-Talk: Command        $(Command)
657       *FvwmForm-Talk: Button       continue    "F1 - Help" F1
658       *FvwmForm-Talk: Command        Module FvwmForm FvwmForm-TalkHelp
659       *FvwmForm-Talk: Button       restart     "F3 - Reset input" F3
660       *FvwmForm-Talk: Command        Nop
661       *FvwmForm-Talk: Button       quit        "F4 - Dismiss"  F4
662       *FvwmForm-Talk: Command        Nop
663
664       # FvwmForm-TalkHelp - Help Text for FvwmForm-Talk
665       DestroyModuleConfig  FvwmForm-TalkHelp: *
666       *FvwmForm-TalkHelp: WarpPointer
667       # Layout
668       *FvwmForm-TalkHelp: Line    center
669       *FvwmForm-TalkHelp: Text    "Talk to Fvwm - Help"
670       *FvwmForm-TalkHelp: Line    left
671       *FvwmForm-TalkHelp: Text    " "
672       *FvwmForm-TalkHelp: Line    left
673       *FvwmForm-TalkHelp: PadVText 0
674       *FvwmForm-TalkHelp: Text    "Enter commands in the
675       *FvwmForm-TalkHelp: Line    left
676       *FvwmForm-TalkHelp: Text    "Commands beginning with
677       *FvwmForm-TalkHelp: Line    left
678       *FvwmForm-TalkHelp: Text    "shell as a sub-process of the form."
679       *FvwmForm-TalkHelp: Line    left
680       *FvwmForm-TalkHelp: Text    "All other commands are sent to fvwm for execution."
681       *FvwmForm-TalkHelp: Line    left
682       *FvwmForm-TalkHelp: Text    ""
683       *FvwmForm-TalkHelp: Line    left
684       *FvwmForm-TalkHelp: Text    "Fvwm error messages are shown on the
685       *FvwmForm-TalkHelp: Line    left
686       *FvwmForm-TalkHelp: Text    ""
687       # Buttons
688       *FvwmForm-TalkHelp: Line    center
689       *FvwmForm-TalkHelp: Button  quit    "Return - Dismiss"         ^M
690       *FvwmForm-TalkHelp: Command   Nop
691
692

BUGS AND LIMITATIONS

694       FvwmForm is a fairly simple method of providing  input.   There  is  no
695       input validation facility.  FvwmForm has no way of dealing with lists.
696
697       Report bugs to the fvwm-workers list.
698
699

COPYRIGHTS

701       FvwmForm  is  original  work  of Thomas Zuwei Feng (ztfeng@math.prince‐
702       ton.edu).
703
704       Copyright Feb 1995, Thomas Zuwei Feng.  No guarantees or warranties are
705       provided  or  implied  in any way whatsoever.  Use this program at your
706       own risk.  Permission to use, modify, and redistribute this program  is
707       hereby given, provided that this copyright is kept intact.
708
709

CHANGES

711       During  the fall of 1998, Dan Espen removed all form size limits, added
712       unlimited font and color changing, form spacing control,  configuration
713       file  reading, global control of appearance, synchronous command execu‐
714       tion, Error message display, variable substitution, configurable point‐
715       ers, and lots of other damage.  No additional copyright is imposed.
716
717
718
719Fvwm                       06 November 2016 (2.6.7)                FvwmForm(1)
Impressum