File: StrokeFunc.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 (137 lines) | stat: -rw-r--r-- 4,396 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
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
<?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='StrokeFunc'>
<title>StrokeFunc</title>

<cmdsynopsis>
	<command>StrokeFunc</command
	><arg choice='opt'
		><replaceable>Options</replaceable
	></arg>
</cmdsynopsis>

<para>Causes fvwm to record a mouse stroke sequence and to execute the
corresponding action as defined in a
<fvwmref cmd="Stroke"/>
command.  The cursor is modified to the
<fvwmref cmd="CursorStyle" opt="STROKE"/>
context of the
<fvwmref cmd="CursorStyle"/>
command during recording.  When the stroke is finished
<emphasis remap='B'>StrokeFunc</emphasis>
looks for a stroke binding of the form</para>

<programlisting>
<fvwmref cmd="Stroke"/> sequence 0 Context Modifiers action
</programlisting>

<para>and executes the corresponding action (Note the 0).  Normal use of
this function is via a
<fvwmref cmd="Mouse"/> or
<fvwmref cmd="Key"/>
command.  Examples:</para>

<programlisting>
<fvwmref cmd="Mouse"/> 3 A M StrokeFunc
<fvwmref cmd="Key"/> x R N StrokeFunc
</programlisting>

<para>If you press mouse button 3 and
<keysym>Alt</keysym>
anywhere (respectively, press the key x when the cursor is on the
root window), then fvwm records the mouse motions until the mouse
button 3 (respectively, the x key) is released and then check if
the recorded
<emphasis remap='I'>sequence</emphasis>
corresponds to a stroke binding of the form</para>

<programlisting>
"Stroke <replaceable>sequence</replaceable> 0 A M <replaceable>action</replaceable>"
"Stroke <replaceable>sequence</replaceable> 0 R N <replaceable>action</replaceable>"
</programlisting>

<para>Note that the
<replaceable>Context</replaceable> and <replaceable>Modifiers</replaceable>
are taken at the beginning of the execution of the
<emphasis remap='B'>StrokeFunc</emphasis>
command (so you can release the modifiers before the end of the
stroke recording in the case of a mouse binding and if you used,
say, a title-bar context the mouse motion can go through an
application window).  The keys
<keysym>Escape</keysym> and
<keysym>Delete</keysym>
allow you to abort the command.</para>

<para>The
<emphasis remap='B'>StrokeFunc</emphasis>
command has five options:
<emphasis remap='I'>NotStayPressed</emphasis>, <emphasis remap='I'>EchoSequence</emphasis>, <emphasis remap='I'>DrawMotion</emphasis>, 
<emphasis remap='I'>FeedBack</emphasis> and <emphasis remap='I'>StrokeWidth</emphasis>.
These options are disabled by default.
<fvwmopt cmd="StrokeFunc" opt="EchoSequence"/>
causes fvwm to Echo the recorded stroke sequence.
<fvwmopt cmd="StrokeFunc" opt="DrawMotion"/>
causes fvwm to draw the mouse motion on the screen.
<fvwmopt cmd="StrokeFunc" opt="FeedBack"/>
causes fvwm to display during a fraction of second the cursor of
the
<fvwmref cmd="CursorStyle" opt="WAIT"/>
context of the
<fvwmref cmd="CursorStyle"/>
command if the recorded stroke sequence corresponds to a stroke
binding.
<fvwmopt cmd="StrokeFunc" opt="StrokeWidth"/>
takes an integer argument, which must be &gt;= 0 and &lt;= 100 and which
defines the width of the line for the
<emphasis remap='I'>DrawMotion</emphasis>
option.</para>

<para>
<fvwmopt cmd="StrokeFunc" opt="NotStayPressed"/>
works only if
<emphasis remap='B'>StrokeFunc</emphasis>
is used via a
<fvwmref cmd="Mouse"/>
or a
<fvwmref cmd="Key"/>
command.  This option removes the need to have a button or the key
pressed during the stroke, but you have to do a mouse click or
press the
<keysym>Return</keysym>
or
<keysym>Space</keysym>
key to finish the mouse motion recording (these keys also work
without the
<emphasis remap='I'>NotStayPressed</emphasis>
option).</para>

<para>You can use the
<emphasis remap='B'>StrokeFunc</emphasis>
"alone".  In this case it works as above with the
<emphasis remap='I'>NotStayPressed</emphasis>
option enabled.  However,
<replaceable>Modifiers</replaceable>,
in general, may not work as expected (i.e., in this case use 'A'
or 'N' as
<replaceable>Modifiers</replaceable>
in the stroke bindings).</para>

<para>Note that some computers do not support key release events. If
that is the case the
<emphasis remap='B'>StrokeFunc</emphasis>
used via a
<fvwmref cmd="Key"/>
command works as if the
<emphasis remap='I'>NotStayPressed</emphasis>
option is enabled.</para>


</section>