Update default theme to use features in FVWM 2.5.25+
[fvwm-themes.git] / scripts / FvwmScript-Help
blobf5c2b076a45fae50c679d16fb627dd4dd65c8cb4
1 # This script is free software; you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation; either version 2 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program; if not, write to the Free Software
13 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16 #-----------------------------------------------------------------------------
17 # This fvwm-themes "module" is all original code by Olivier Chapuis
18 # Copyright 2000, Olivier Chapuis
19 #-----------------------------------------------------------------------------
21 # For text with 70 characters per line
23 WindowTitle {FVWM Themes Documentation}
24 WindowSize 480 500
25 Font            -adobe-helvetica-bold-r-*-*-12-*
27 Init
28 Begin
29     Set $Message = {}
30     Set $Title = {}
31     Set $InLineDoc = {}
32     Set $Lang = {}
33     Set $font = {-*-fixed-medium-r-semicondensed-*-13-*}
35     # Arguments
36     Set $i = 1
37     Set $arg = (GetScriptArgument $i)
38     While $arg <> {} Do
39     Begin
40         Set $j = (Add $i 1)
41         If $arg == {--lang} Then
42             Set $Lang = (GetScriptArgument $j)
43         If $arg == {--message} Then
44             Set $Message = (GetScriptArgument $j)
45         If $arg == {--title} Then
46             Set $Title = (GetScriptArgument $j)
47         If $arg == {--text-colorset} Then
48             Set $TextColorset = (GetScriptArgument $j)
49         If $arg == {--in-line-doc} Then
50             Set $InLineDoc = (GetScriptArgument $j)
51         If $arg == {--text-font} Then
52             Set $TextFont = (GetScriptArgument $j)
53         Set $i = (Add $i 2)
54         Set $arg = (GetScriptArgument $i)
55     End
57     If $TextColorset <> {} Then
58         ChangeColorset 2 $TextColorset
59     If $Message <> {} Then
60         ChangeTitle 2 $Message
61     If $Title <> {} Then
62         ChangeTitle 1 $Title
63     If $InLineDoc <> {} Then
64     Begin
65         Set $cmd = {fvwm-themes-script --in-line-doc }$InLineDoc{ --line-length 70}
66         # if the --lang is not used, ft-script computes it itself
67         If $Lang <> {} Then
68             Set $cmd = $cmd { --lang }$Lang
69         Set $Doc = (GetOutput $cmd 1 -1)
71         # first "line" is the font, evaluate it
72         Set $font = {}
73         Set $index = 1
74         Set $done = 0
75         While $done <> 1 Do
76         Begin
77             Set $tmp = (StrCopy $Doc $index $index)
78             If $tmp == {|} Then
79                 Set $done = 1
80             Else
81                 Set $font = $font $tmp
82             Set $index = (Add $index 1)
83             If $index == 300 Then
84             Begin
85                 Set $font = "-*-fixed-medium-r-semicondensed-*-13-*"
86                 Set $done = 1
87             End
88         End
90         Set $Doc = (StrCopy $Doc $index 32000)
91         ChangeTitle 2 $Doc
92     End
94     If $TextFont <> {} Then
95         Set $font = $TextFont
96     ChangeFont 2 $font
98 End
100 # Title
101 Widget 1
102 Property
103     Position 10 5
104     Size 455 20
105     Type ItemDraw
106     Flags NoReliefString
107     Title {}
108 Main
109  Case message of
110  SingleClic :
111  Begin
112  End
115 # the documentation
116 Widget 2
117 Property
118     Position 10 30
119     Size 460 430
120     Type List
121     Font -*-fixed-medium-r-semicondensed-*-13-*
122     Title {}
123     Flags NoReliefString
124 Main
125  Case message of
126  SingleClic :
127  Begin
128     ChangeValue 2 0
129  End
132 Widget 3
133 Property
134     Position 400 465
135     Type PushButton
136     Flags NoReliefString
137     Title {Quit}
138 Main
139  Case message of
140  SingleClic :
141  Begin
142     Quit
143  End