1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "../docbook-xml/docbookx.dtd"
5 <!ENTITY % myents SYSTEM "../fvwm.ent" >
9 <!-- $Id: AddButtonStyle.xml,v 1.3 2007/06/16 12:38:45 griph Exp $ -->
11 <section id='AddButtonStyle'>
12 <title>AddButtonStyle</title>
15 <command>AddButtonStyle</command
16 ><arg choice='plain'>button</arg
18 ><replaceable>state</replaceable
21 ><replaceable>style</replaceable
24 >-- <arg choice='plain' rep='repeat'
25 ><optional>!</optional
26 ><replaceable>flag</replaceable
31 <para>Adds a button style to
32 <replaceable>button</replaceable>.
33 <replaceable>button</replaceable>
34 can be a button number, or one of
35 "<fvwmopt cmd="AddButtonStyle" opt="All"/>",
36 "<fvwmopt cmd="AddButtonStyle" opt="Left"/>" or
37 "<fvwmopt cmd="AddButtonStyle" opt="Right"/>".
38 <replaceable>state</replaceable>
40 "<fvwmopt cmd="AddButtonStyle" opt="ActiveUp"/>",
41 "<fvwmopt cmd="AddButtonStyle" opt="ActiveDown"/>",
42 "<fvwmopt cmd="AddButtonStyle" opt="InactiveUp"/>" or
43 "<fvwmopt cmd="AddButtonStyle" opt="InactiveDown"/>", or
44 "<fvwmopt cmd="AddButtonStyle" opt="Active"/>" (the same as both "ActiveUp" and "ActiveDown") or
45 "<fvwmopt cmd="AddButtonStyle" opt="Inactive"/>" (the same as both "InactiveUp" and "InactiveDown")
46 or any of these 6 with
47 "<fvwmopt cmd="AddButtonStyle" opt="Toggled"/>" prepended.
48 The "Active" states apply to the focused window, the "Inactive"
49 ones apply to all other windows. The "Up" states apply to the
50 non pressed buttons, the "Down" ones apply to pressed buttons.
51 The "Toggled" prefix refers to maximized, shaded or sticky windows
52 that have the corresponding
53 <emphasis remap='I'>MwmDecor...</emphasis>
55 Additionally, the following shortcuts may be used:
56 "<fvwmopt cmd="AddButtonStyle" opt="AllNormal"/>",
57 "<fvwmopt cmd="AddButtonStyle" opt="AllToggled"/>",
58 "<fvwmopt cmd="AddButtonStyle" opt="AllActive"/>",
59 "<fvwmopt cmd="AddButtonStyle" opt="AllInactive"/>",
60 "<fvwmopt cmd="AddButtonStyle" opt="AllUp"/>",
61 "<fvwmopt cmd="AddButtonStyle" opt="AllDown"/>".
62 They are actually different masks for 4 individual states from
63 8 total. These are supported too:
64 "<fvwmopt cmd="AddButtonStyle" opt="AllActiveUp"/>",
65 "<fvwmopt cmd="AddButtonStyle" opt="AllActiveDown"/>",
66 "<fvwmopt cmd="AddButtonStyle" opt="AllInactiveUp"/>",
67 "<fvwmopt cmd="AddButtonStyle" opt="AllInactiveDown"/>".</para>
70 <replaceable>state</replaceable>
71 is omitted, then the style is added to every state. If the
72 <replaceable>style</replaceable> and <replaceable>flags</replaceable>
73 are enclosed in parentheses, then multiple
74 <replaceable>state</replaceable>
75 definitions can be placed on a single line.
76 <replaceable>Flags</replaceable>
77 for additional button styles cannot be changed after definition.</para>
79 <para>Buttons are drawn in the order of definition, beginning with the
80 most recent button style, followed by those added with
81 <emphasis remap='B'>AddButtonStyle</emphasis>.
82 To clear the button style stack, change style flags, or for
83 descriptions of available styles and flags, see the
84 <fvwmref cmd="ButtonStyle"/>
85 command. Examples:</para>
88 <fvwmref cmd="ButtonStyle"/> 1 Pixmap led.xpm -- Top Left
89 <fvwmref cmd="ButtonStyle"/> 1 ActiveDown HGradient 8 grey black
90 <fvwmref cmd="ButtonStyle"/> <fvwmref cmd="All"/> -- UseTitleStyle
92 ActiveUp (Pixmap a.xpm) \
93 ActiveDown (Pixmap b.xpm -- Top)
94 AddButtonStyle 1 Vector 4 50x30@1 70x70@0 30x70@0 50x30@1
97 <para>Initially for this example all button states are set to a pixmap.
98 The second line replaces the "ActiveDown" state with a gradient
99 (it overrides the pixmap assigned to it in the line before, which
100 assigned the same style to every state). Then, the
101 <emphasis remap='I'>UseTitleStyle</emphasis>
102 flag is set for all buttons, which causes fvwm to draw any styles
104 <fvwmref cmd="TitleStyle"/>
105 before drawing the buttons. Finally,
106 <emphasis remap='B'>AddButtonStyle</emphasis>
107 is used to place additional pixmaps for both "ActiveUp" and
108 "ActiveDown" states and a vector button style is drawn on top of