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
|
<?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='AddToDecor'>
<title>AddToDecor</title>
<cmdsynopsis>
<command>AddToDecor</command
><arg choice='plain'
><replaceable>decor</replaceable
></arg>
</cmdsynopsis>
<para>This command is deprecated and will be removed in the future. There
are plans to replace it with a more flexible solution in fvwm-3.0.</para>
<para>Add or divert commands to the decor named
<replaceable>decor</replaceable>.
A decor is a name given to the set of commands which affect button
styles, title-bar styles and border styles. If
<replaceable>decor</replaceable>
does not exist it is created; otherwise the existing
<replaceable>decor</replaceable>
is modified. Note: Earlier versions allowed to use the
<fvwmref cmd="HilightColor"/>, <fvwmref cmd="HilightColorset"/> and <fvwmref cmd="WindowFont"/>
commands in decors. This is no longer possible. Please use the
<fvwmref cmd="Style"/>
command with the
<emphasis remap='I'>Hilight...</emphasis> and <fvwmref cmd="Style" opt="Font"/>
options.</para>
<para>New decors start out exactly like the "default" decor without any
style definitions. A given decor may be applied to a set of
windows with the
<fvwmref cmd="Style" opt="UseDecor"/>
option of the
<fvwmref cmd="Style"/>
command. Modifying an existing decor affects all windows which
are currently assigned to it.</para>
<para><emphasis remap='B'>AddToDecor</emphasis>
is similar in usage to the
<fvwmref cmd="AddToMenu"/> and <fvwmref cmd="AddToFunc"/>
commands, except that menus and functions are replaced by
<fvwmref cmd="ButtonStyle"/>, <fvwmref cmd="AddButtonStyle"/>, <fvwmref cmd="TitleStyle"/>,
<fvwmref cmd="AddTitleStyle"/> and <fvwmref cmd="BorderStyle"/>
commands. Decors created with
<emphasis remap='B'>AddToDecor</emphasis>
can be manipulated with
<fvwmref cmd="ChangeDecor"/>, <fvwmref cmd="DestroyDecor"/>, <fvwmref cmd="UpdateDecor"/>
and the
<fvwmref cmd="Style"/>
option.</para>
<para>The following example creates a decor "FlatDecor" and style
"FlatStyle". They are distinct entities:</para>
<programlisting>
AddToDecor FlatDecor
+ <fvwmref cmd="ButtonStyle"/> All Active (-- flat) Inactive (-- flat)
+ <fvwmref cmd="TitleStyle"/> -- flat
+ <fvwmref cmd="BorderStyle"/> -- HiddenHandles NoInset
<fvwmref cmd="Style"/> FlatStyle \
UseDecor FlatDecor, HandleWidth 4, ForeColor white, \
BackColor grey40, HilightFore black, HilightBack grey70
<fvwmref cmd="Style"/> xterm UseStyle FlatStyle
</programlisting>
<para>An existing window's decor may be reassigned with
<fvwmref cmd="ChangeDecor"/>.
A decor can be destroyed with
<fvwmref cmd="DestroyDecor"/>.</para>
<programlisting>
<fvwmref cmd="DestroyDecor"/> FlatDecor
AddToDecor FlatDecor ...
<fvwmref cmd="Style"/> FlatStyle UseDecor FlatDecor
</programlisting>
<para>and now apply the style again:</para>
<programlisting>
<fvwmref cmd="Style"/> xterm UseStyle FlatStyle
</programlisting>
</section>
|