File: AddButtonStyle.xml

package info (click to toggle)
fvwm 1%3A2.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 15,968 kB
  • sloc: ansic: 145,836; xml: 17,096; perl: 7,237; sh: 5,100; makefile: 1,101; yacc: 688; lex: 187; sed: 11
file content (111 lines) | stat: -rw-r--r-- 4,201 bytes parent folder | download | duplicates (5)
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
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "../docbook-xml/docbookx.dtd"
[
<!ENTITY % myents SYSTEM "../fvwm.ent" >
%myents;
]>

<!-- $Id$ -->

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

<cmdsynopsis>
	<command>AddButtonStyle</command
	><arg choice='plain'>button</arg
	><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>Adds a button style to
<replaceable>button</replaceable>.
<replaceable>button</replaceable>
can be a button number, or one of
"<fvwmopt cmd="AddButtonStyle" opt="All"/>",
"<fvwmopt cmd="AddButtonStyle" opt="Left"/>" or
"<fvwmopt cmd="AddButtonStyle" opt="Right"/>".
<replaceable>state</replaceable>
can be
"<fvwmopt cmd="AddButtonStyle" opt="ActiveUp"/>",
"<fvwmopt cmd="AddButtonStyle" opt="ActiveDown"/>",
"<fvwmopt cmd="AddButtonStyle" opt="InactiveUp"/>" or
"<fvwmopt cmd="AddButtonStyle" opt="InactiveDown"/>", or
"<fvwmopt cmd="AddButtonStyle" opt="Active"/>" (the same as both "ActiveUp" and "ActiveDown") or
"<fvwmopt cmd="AddButtonStyle" opt="Inactive"/>" (the same as both "InactiveUp" and "InactiveDown")
or any of these 6 with
"<fvwmopt cmd="AddButtonStyle" opt="Toggled"/>" prepended.
The "Active" states apply to the focused window, the "Inactive"
ones apply to all other windows. The "Up" states apply to the
non pressed buttons, the "Down" ones apply to pressed buttons.
The "Toggled" prefix refers to maximized, shaded or sticky windows
that have the corresponding
<emphasis remap='I'>MwmDecor...</emphasis>
button style set.
Additionally, the following shortcuts may be used:
"<fvwmopt cmd="AddButtonStyle" opt="AllNormal"/>",
"<fvwmopt cmd="AddButtonStyle" opt="AllToggled"/>",
"<fvwmopt cmd="AddButtonStyle" opt="AllActive"/>",
"<fvwmopt cmd="AddButtonStyle" opt="AllInactive"/>",
"<fvwmopt cmd="AddButtonStyle" opt="AllUp"/>",
"<fvwmopt cmd="AddButtonStyle" opt="AllDown"/>".
They are actually different masks for 4 individual states from
8 total.  These are supported too:
"<fvwmopt cmd="AddButtonStyle" opt="AllActiveUp"/>",
"<fvwmopt cmd="AddButtonStyle" opt="AllActiveDown"/>",
"<fvwmopt cmd="AddButtonStyle" opt="AllInactiveUp"/>",
"<fvwmopt cmd="AddButtonStyle" opt="AllInactiveDown"/>".</para>

<para>If
<replaceable>state</replaceable>
is omitted, then the style is added to every state.  If the
<replaceable>style</replaceable> and <replaceable>flags</replaceable>
are enclosed in parentheses, then multiple
<replaceable>state</replaceable>
definitions can be placed on a single line.
<replaceable>Flags</replaceable>
for additional button styles cannot be changed after definition.</para>

<para>Buttons are drawn in the order of definition, beginning with the
most recent button style, followed by those added with
<emphasis remap='B'>AddButtonStyle</emphasis>.
To clear the button style stack, change style flags, or for
descriptions of available styles and flags, see the
<fvwmref cmd="ButtonStyle"/>
command.  Examples:</para>

<programlisting>
<fvwmref cmd="ButtonStyle"/> 1 Pixmap led.xpm -- Top Left
<fvwmref cmd="ButtonStyle"/> 1 ActiveDown HGradient 8 grey black
<fvwmref cmd="ButtonStyle"/> <fvwmref cmd="All"/> --  UseTitleStyle
AddButtonStyle 1 \
	ActiveUp (Pixmap a.xpm) \
	ActiveDown (Pixmap b.xpm -- Top)
AddButtonStyle 1 Vector 4 50x30@1 70x70@0 30x70@0 50x30@1
</programlisting>

<para>Initially for this example all button states are set to a pixmap.
The second line replaces the "ActiveDown" state with a gradient
(it overrides the pixmap assigned to it in the line before, which
assigned the same style to every state).  Then, the
<emphasis remap='I'>UseTitleStyle</emphasis>
flag is set for all buttons, which causes fvwm to draw any styles
set with
<fvwmref cmd="TitleStyle"/>
before drawing the buttons.  Finally,
<emphasis remap='B'>AddButtonStyle</emphasis>
is used to place additional pixmaps for both "ActiveUp" and
"ActiveDown" states and a vector button style is drawn on top of
all states.</para>

</section>