File: TitleStyle.xml

package info (click to toggle)
fvwm 1%3A2.6.7-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 16,752 kB
  • ctags: 14,275
  • sloc: ansic: 145,770; xml: 17,086; perl: 7,302; sh: 4,885; makefile: 1,055; yacc: 688; python: 629; lex: 188; sed: 11
file content (288 lines) | stat: -rw-r--r-- 9,491 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<?xml version="1.0" encoding="UTF-8" ?>
<!-- $Id$ -->
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "../docbook-xml/docbookx.dtd"
[
<!ENTITY % myents SYSTEM "../fvwm.ent" >
%myents;
]>


<section id='TitleStyle'>
<title>TitleStyle</title>

<cmdsynopsis>
	<command>TitleStyle</command
	><arg choice='opt'
		><replaceable>justification</replaceable
	></arg
	><arg choice='opt'
		>Height <optional
			><replaceable>num</replaceable
		></optional
	></arg
	><arg choice='opt'
		>MinHeight <optional
			><replaceable>num</replaceable
		></optional
	></arg>
</cmdsynopsis>

<para>Sets attributes for the title-bar.  Justifications can be
<fvwmopt cmd="TitleStyle" opt="Centered"/>,
<fvwmopt cmd="TitleStyle" opt="RightJustified"/> or
<fvwmopt cmd="TitleStyle" opt="LeftJustified"/>.
<fvwmopt cmd="TitleStyle" opt="Height"/>
sets the title bar's height to an amount in pixels.
<fvwmopt cmd="TitleStyle" opt="MinHeight"/>
sets the minimal height in pixels of the title bar.
Defaults are
<emphasis remap='I'>Centered</emphasis>,
the window's font height and no minimal height.
To reset the font height to the
default value, omit the
<replaceable>num</replaceable>
argument after the
<emphasis remap='I'>Height</emphasis>
keyword. The
<emphasis remap='I'>MinHeight</emphasis>
height is reset by
<emphasis remap='I'>Height</emphasis>
or if given with no argument.
Example:</para>

<programlisting>
TitleStyle LeftJustified Height 24
</programlisting>


<cmdsynopsis>
	<command>TitleStyle</command
	><arg choice='opt'
		><replaceable>state</replaceable
	></arg
	><arg choice='opt'
		><replaceable>style</replaceable
	></arg
	><arg choice='opt'
		>-- <arg choice='plain' rep='repeat'
			><optional>!</optional
			><replaceable>flag</replaceable
		></arg
	></arg>
</cmdsynopsis>


<para>Sets the style for the title-bar.
See also
<fvwmref cmd="AddTitleStyle"/> and <fvwmref cmd="ButtonStyle" />
<replaceable>state</replaceable>
can be one of "<fvwmref cmd="ButtonStyle" opt="ActiveUp"/>",
"<fvwmref cmd="ButtonStyle" opt="ActiveDown"/>",
"<fvwmref cmd="ButtonStyle" opt="InactiveUp"/>",
or "<fvwmref cmd="ButtonStyle" opt="InactiveDown"/>".  Shortcuts like
"<fvwmref cmd="ButtonStyle" opt="Active"/>" and
"<fvwmref cmd="ButtonStyle" opt="Inactive"/>" are
allowed.  The states with the "Toggled" prefix are allowed too,
the title itself does not use "Toggled" states, but these states
are used for the buttons with
<fvwmref cmd="ButtonStyle"/>
<fvwmref cmd="ButtonStyle" opt="UseTitleStyle" />.
If
<replaceable>state</replaceable>
is omitted, then the
<replaceable>style</replaceable>
is added to every state.  If parentheses are placed around the
<replaceable>style</replaceable> and <replaceable>flags</replaceable>,
then multiple state definitions can be given per line.
<replaceable>style</replaceable>
can be omitted so that flags can be set while not destroying the
current style.</para>

<para>If a
'!'
is prefixed to any
<replaceable>flag</replaceable>,
its behavior is negated.  Valid flags for each state include
<fvwmref cmd="ButtonStyle" opt="Raised"/>,
<fvwmref cmd="ButtonStyle" opt="Flat"/> and 
<fvwmref cmd="ButtonStyle" opt="Sunk"/>
(these are mutually exclusive).  The default is
<fvwmref cmd="ButtonStyle" opt="Raised"/>.
See the note in
<fvwmref cmd="ButtonStyle"/>
regarding the "<fvwmref cmd="ButtonStyle" opt="ActiveDown"/>" state.  Examples:</para>

<programlisting>
TitleStyle ActiveUp HGradient 16 navy black
TitleStyle \
	ActiveDown (Solid red -- flat) \
	Inactive (TiledPixmap wood.xpm)
TitleStyle \
	ActiveUp (-- Flat) \
	ActiveDown (-- Raised) \
	InactiveUp (-- Flat) \
	InactiveDown (-- Sunk)
</programlisting>

<para>This sets the "ActiveUp" state to a horizontal gradient, the
"ActiveDown" state to solid red, and the "Inactive" states to a
tiled wood pixmap. Finally, "ActiveUp" and "InactiveUp" are set
to look flat, while "ActiveDown" set to be sunk (the
<fvwmref cmd="ButtonStyle" opt="Raised"/>
flag for the "ActiveDown" state causes it to appear sunk due to
relief inversion), and "InactiveDown" is set to look raised. An
example which sets flags for all states:</para>

<programlisting>
TitleStyle -- flat
</programlisting>

<para>For a flattened look:</para>

<programlisting>
TitleStyle -- flat
<fvwmref cmd="ButtonStyle"/> <fvwmref cmd="All"/> Active (-- flat) Inactive (-- flat)
</programlisting>


<para><emphasis remap='B'>TitleStyle</emphasis>
accepts all the
<fvwmref cmd="ButtonStyle"/>
 styles and arguments:</para>

<para><fvwmref cmd="ButtonStyle" opt="Simple"/>,
<fvwmref cmd="ButtonStyle" opt="Default"/>,
<fvwmref cmd="ButtonStyle" opt="Solid"/>,
<fvwmref cmd="ButtonStyle" opt="Colorset"/>,
<fvwmref cmd="ButtonStyle" opt="Vector"/>,
<fvwmref cmd="ButtonStyle" opt="?Gradient"/>,
<fvwmref cmd="ButtonStyle" opt="Pixmap"/>,
<fvwmref cmd="ButtonStyle" opt="AdjustedPixmap"/>,
<fvwmref cmd="ButtonStyle" opt="ShrunkPixmap"/>,
<fvwmref cmd="ButtonStyle" opt="StretchedPixmap"/>,
<fvwmref cmd="ButtonStyle" opt="TiledPixmap"/>,
<fvwmref cmd="ButtonStyle" opt="MiniIcon"/>.</para>

<para>See the
<fvwmref cmd="ButtonStyle"/>
command for a description of all these styles and their arguments.</para>

<para>In addition to these styles
<emphasis remap='B'>TitleStyle</emphasis>
accepts a powerful
<fvwmopt cmd="TitleStyle" opt="MultiPixmap"/>
option. This allows you to specify different pixmaps, colorsets or
colors for different parts of the titlebar. Some of them are tiled or
stretched to fit a particular space; others are discrete "transition"
images. The definable
<fvwmref cmd="ButtonStyle" opt="sections"/>
are:</para>

<variablelist>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="Main"/></term>
		<listitem><para>The full titlebar</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="LeftMain"/></term>
		<listitem><para>Left of title text</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="RightMain"/></term>
		<listitem><para>Right of title text</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="UnderText"/></term>
		<listitem><para>Underneath title text</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="LeftOfText"/></term>
		<listitem><para>just to the left of the title text</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="RightOfText"/></term>
		<listitem><para>just to the right of the title text</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="LeftEnd"/></term>
		<listitem><para>at the far left end of the titlebar
  (just after left buttons if any)</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="RightEnd"/></term>
		<listitem><para>at the far right end of the titlebar
			(just before right buttons if any)</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TilteStyle" opt="Buttons"/></term>
		<listitem><para>under buttons in case of
		    <fvwmopt cmd="ButtonStyle" opt="UseTitleStyle"/>
		</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="LeftButtons"/></term>
		<listitem><para>under left buttons in case of
		    <fvwmopt cmd="ButtonStyle" opt="UseTitleStyle"/>
		</para></listitem>
	</varlistentry>
	<varlistentry>
		<term><fvwmopt cmd="TitleStyle" opt="RightButtons"/></term>
		<listitem><para>under right buttons in case of
		    <fvwmopt cmd="ButtonStyle" opt="UseTitleStyle"/>
		</para></listitem>
	</varlistentry>
</variablelist>

<para>None of these are mandatory except for
<emphasis>Main</emphasis>
(or, if you do not define
<emphasis>Main</emphasis>
you must define both
<emphasis>LeftMain</emphasis> and <emphasis>RightMain</emphasis>).
If no
<emphasis>Buttons</emphasis>
pixmaps are defined and
<fvwmref cmd="ButtonStyle" opt="UseTitleStyle"/>
is specified for one or more buttons,
<emphasis>Main</emphasis>,
<emphasis>LeftMain</emphasis> or <emphasis>RightMain</emphasis>
are used as appropriate.</para>

<para>The syntax for this style type is:</para>

<programlisting>
MultiPixmap section style arg, ...
</programlisting>

<para>continuing for whatever you want to define. The
<replaceable>style</replaceable>
can be either
<fvwmref cmd="ButtonStyle" opt="TiledPixmap"/>, <fvwmref cmd="ButtonStyle" opt="AdjustedPixmap"/>, <fvwmref cmd="ButtonStyle" opt="Colorset"/> or <fvwmref cmd="ButtonStyle" opt="Solid"/>.
See the
<fvwmref cmd="ButtonStyle"/>
command for the description of these styles.
In the case of a transition section,
<emphasis>LeftEnd</emphasis>, <emphasis>LeftOfText</emphasis>,
<emphasis>RightOfText</emphasis> or <emphasis>RightEnd</emphasis>,
<fvwmref cmd="ButtonStyle" opt="AdjustedPixmap"/>
only resize the pixmap in the "y" direction. For the
<fvwmref cmd="ButtonStyle" opt="Colorset"/> and <fvwmref cmd="ButtonStyle" opt="Solid"/>
styles a width of the half of the title bar height is assumed
for the transition sections.</para>

<para>An example:</para>

<programlisting>
MultiPixmap Main AdjustedPixmap foo.xpm, \
            UnderText TiledPixmap bar.xpm, \
            Buttons <fvwmref cmd="ButtonStyle" opt="Colorset"/> 2
</programlisting>

<para>Note that the old syntax is still supported: if the style is omitted,
<fvwmref cmd="ButtonStyle" opt="TiledPixmap"/>
is assumed and adding "(stretched)" between the section and the
file name implies
<fvwmref cmd="ButtonStyle" opt="AdjustedPixmap"/>.</para>

</section>