
If you have any questions, concerns, enhancement
requests, send me e-mail (milu10@bat710.univ-lyon1.fr).
For bug reports, please add your srcipt whom makes the bug. 


How to use
__________


In the file system.fvwmrc   FvwmForm + path and name of the script

For exemple:	AddToMenu "Utilities" "Tools" Nop
		+              "" Nop
		+              "Clipboard" Exec exec xclipboard &
		+              "ScreenCapture" Module FvwmForm /usr/X11/lib/X11/fvwm/ScrCaptScript
		+	       "Restart fvwm" Restart fvwm


The script contains two parts:
First parts contains:
	- the property of the window: size, position, title.
For exemple:	WindowTitle "Logout"
		WindowSize 400 250	# x and y
		WindowPosition 191 143	# width and height

	- the foreground, background, shadow, hilight colors and
font for all items.
For example:	ForeColor	black
		BackColor	grey75
		ShadowColor	grey45
		HilightColor	grey88
		Font		fixed
		
	- some instructions whom will be executed at the beginning
of the script: init sone variables, play a sound, move the cursor...
Init						# This word is important 
 Begin						# The begining of the bloc
  WarpPointer 1					# Move the cursor to the item 1
  Do "Exec playsnd /usr/lib/sounds/sound.raw"	# Play a sound
  Set $ToDo = Restart				# Set variable ToDo to "Restart"
 End						# The end of the bloc



The second part contains items whom will be used in the GUI. An item
contains two parts. In the first part, the user has to specify item property: id,
title, size, position, type, value; optional: font, foreground color, background
color, shadow color, hilight color, state.
Item 6		# 6 is the item id 
Property	# set item property: title, type, size, position, font, value...
 Title "OK	# title
 Size 200 26	# size width and height
 Position 50 40	# position x and y
 Type ItemDraw	# There are 4 different types: 
		#	- ItemDraw to draw a string
		#	- PushButton OK Cancel...
		#	- TextField to enter string...
		#	- RadioButton
		#	- CheckBox
 Value 0	# Set the value
 Font fixed	# Set the font 
 ForeColor blue		# Set the foreground color for this item
 BackColor yellow	# Set the background color for this item
 ShadowColor green	# Set the shadow color for this item
 HilightColor green	# Set the hilight color for this item
 State Hiden		# State can be Hiden, Actif, Inactif

In the second part, the user can specify some commands whom will
be executed when the items receive some message

Main			# 
 Case message of
  ClicMouse :		# receive message clic mouse on item
  Begin
   ChangeValue 4 0 
   ChangeValue 5 0 
   Set $ToDo = Halt
  End
  1 :			# receive message = 1
  Begin
   Do "Exec xcalc &"
  End
End



Commands:
_________

Command name	Syntax					Exemple	
____________________________________________________________________________________________________
HideItem	HideItem ItemId				HideItem 6
ShowItem	ShowItem ItemId				ShowItem 5
ChangeValue	ChangeValue ItemId value		ChangeValue 6 1
ChangePosition	ChangePosition ItemId x y		ChangePosition 6 50 50 
ChangeSize	ChangeSize ItemId width height		ChangePosition 5 150 250
ChangeTitle	ChangeTitle ItemId title		ChangeTitle 6 "Cancel"
ChangeFont	ChangeFont ItemId font			ChangeFont 6 -adobe-helvetica-bold-r-*-*-12-*
ChangeForeColor ChangeForeColor ItemId color		ChangeForeColor 6 blue
Set		Set $variable = value			Set $ToDo = "PlaySound"
SendSignal	SendSignal ItemId  signal number	SendSignal 5 4	# Send message 5 to item 4
Quit		Quit 					Quit		# Exit the program
WarpPointer	WarpPointer ItemId			WarpPointer 1	# Move the pointer to item 1
Do		Do  shell command...			Do "Exec xcalc"  " -geometry 100x100"



Arguments:
__________

Argument name		Syntax				Exemple
____________________________________________________________________________________________________
integer arg		...-100, 1, 2, 3..10..		HideItem 6
variable		$variable_name			Set $exemple = "Exec xcalc "
							Do $exemple "-geometry 50x50"
string			"string content"		Do "Exec xcalc"		
function GetValue	( GetValue Item_Id )		Set $exemple = ( GetValue 5 )
							# Return the value of item Item_Id
function GetTitle	( GetTitle Item_Id )		Set $exemple = ( GetTitle 5 )
							# Return the title of item Item_Id


Loops:
______

Syntax							Exemple
___________________________________________________________________________________________________
If argument == argument Then 				If $exemple == 5 Then
Begin							Begin
 List of commands					 Do "Exec xcalc"
End							End
else	# optional					else
Begin							Begin
 List of commands					 Do "Exec xterm &"
End							End

For $exemple = 1 To 10 Do				For $exemple = 1 To 10 Do
Begin							Begin
 List of commands					 Do "Exec xcalc &"
end							End

While $exemple == "again" Do				While $exemple == "again" Do
Begin							Begin
 List of commands					 Do "Exec xcalc &"
							 Set $exemple = "stop"
end							End



Item type:
_________

Name						
_____________________________________________________________________________________________
ItemDraw	Draw a string				Title: the string to draw
							Value: not used
PushButton	Draw a push button			Title: the string to display on the button
							Value: not used
RadioButton	Draw a radio button			Title: the string to display on the button
							Value: 0: not checked, 1: checked
CheckBox	Draw a check box			Title: the string to display near the box
							Value: 0: not checked, 1: checked
TextField	Draw a text field to enter string	Title: the default string in the text field
							Value: the position of the cursor in the text


Very important:
_______________

 	- All coments begin by "#", exemple		Do "Exec xcalc"	 # This is a comment
	- One space at least between arguments		WRONG: Set $exemple="Exec xcalc"
							WRONG: For $exemple=1 To 10 Do
							RIGHT: Set $exemple = "Exec xcalc"
							RIGHT: For $exemple = 1 To 10 Do

	- Capital letters are importants		WRONG: for $exemple = 1 to 10 do
							RIGHT: For $exemple = 1 To 10 Do

	- For comparaison between numeric arguments 	==      equal
							>=      highter or equal
							>	highter
							<=	smaller or equal
							<	smaller
							<>	different


======================================================================
                       TO-DO list for FvwmForm
======================================================================

- Write manual page for the new version.
- Add icon in PushButton
- Add new items like scrollbar, pop up menu...


Bug: You can have some problems to compile FvwmForm 2 on O.S. different from
Linux. This is because FvwmForm was built with Flex and Bison. Bison
is a parse generator and should be incompatible between Linux and other
system. 

Frederic Cordier
milu10@bat710.univ-lyon1.fr
