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: StrokeFunc.xml,v 1.3 2007/06/16 12:38:46 griph Exp $ -->
11 <section id='StrokeFunc'>
12 <title>StrokeFunc</title>
15 <command>StrokeFunc</command
17 ><replaceable>Options</replaceable
21 <para>Causes fvwm to record a mouse stroke sequence and to execute the
22 corresponding action as defined in a
23 <fvwmref cmd="Stroke"/>
24 command. The cursor is modified to the
25 <fvwmref cmd="CursorStyle" opt="STROKE"/>
27 <fvwmref cmd="CursorStyle"/>
28 command during recording. When the stroke is finished
29 <emphasis remap='B'>StrokeFunc</emphasis>
30 looks for a stroke binding of the form</para>
33 <fvwmref cmd="Stroke"/> sequence 0 Context Modifiers action
36 <para>and executes the corresponding action (Note the 0). Normal use of
37 this function is via a
38 <fvwmref cmd="Mouse"/> or
40 command. Examples:</para>
43 <fvwmref cmd="Mouse"/> 3 A M StrokeFunc
44 <fvwmref cmd="Key"/> x R N StrokeFunc
47 <para>If you press mouse button 3 and
49 anywhere (respectively, press the key x when the cursor is on the
50 root window), then fvwm records the mouse motions until the mouse
51 button 3 (respectively, the x key) is released and then check if
53 <emphasis remap='I'>sequence</emphasis>
54 corresponds to a stroke binding of the form</para>
57 "Stroke <replaceable>sequence</replaceable> 0 A M <replaceable>action</replaceable>"
58 "Stroke <replaceable>sequence</replaceable> 0 R N <replaceable>action</replaceable>"
62 <replaceable>Context</replaceable> and <replaceable>Modifiers</replaceable>
63 are taken at the beginning of the execution of the
64 <emphasis remap='B'>StrokeFunc</emphasis>
65 command (so you can release the modifiers before the end of the
66 stroke recording in the case of a mouse binding and if you used,
67 say, a title-bar context the mouse motion can go through an
68 application window). The keys
69 <keysym>Escape</keysym> and
70 <keysym>Delete</keysym>
71 allow you to abort the command.</para>
74 <emphasis remap='B'>StrokeFunc</emphasis>
75 command has five options:
76 <emphasis remap='I'>NotStayPressed</emphasis>, <emphasis remap='I'>EchoSequence</emphasis>, <emphasis remap='I'>DrawMotion</emphasis>,
77 <emphasis remap='I'>FeedBack</emphasis> and <emphasis remap='I'>StrokeWidth</emphasis>.
78 These options are disabled by default.
79 <fvwmopt cmd="StrokeFunc" opt="EchoSequence"/>
80 causes fvwm to Echo the recorded stroke sequence.
81 <fvwmopt cmd="StrokeFunc" opt="DrawMotion"/>
82 causes fvwm to draw the mouse motion on the screen.
83 <fvwmopt cmd="StrokeFunc" opt="FeedBack"/>
84 causes fvwm to display during a fraction of second the cursor of
86 <fvwmref cmd="CursorStyle" opt="WAIT"/>
88 <fvwmref cmd="CursorStyle"/>
89 command if the recorded stroke sequence corresponds to a stroke
91 <fvwmopt cmd="StrokeFunc" opt="StrokeWidth"/>
92 takes an integer argument, which must be >= 0 and <= 100 and which
93 defines the width of the line for the
94 <emphasis remap='I'>DrawMotion</emphasis>
98 <fvwmopt cmd="StrokeFunc" opt="NotStayPressed"/>
100 <emphasis remap='B'>StrokeFunc</emphasis>
102 <fvwmref cmd="Mouse"/>
105 command. This option removes the need to have a button or the key
106 pressed during the stroke, but you have to do a mouse click or
108 <keysym>Return</keysym>
110 <keysym>Space</keysym>
111 key to finish the mouse motion recording (these keys also work
113 <emphasis remap='I'>NotStayPressed</emphasis>
116 <para>You can use the
117 <emphasis remap='B'>StrokeFunc</emphasis>
118 "alone". In this case it works as above with the
119 <emphasis remap='I'>NotStayPressed</emphasis>
120 option enabled. However,
121 <replaceable>Modifiers</replaceable>,
122 in general, may not work as expected (i.e., in this case use 'A'
124 <replaceable>Modifiers</replaceable>
125 in the stroke bindings).</para>
127 <para>Note that some computers do not support key release events. If
129 <emphasis remap='B'>StrokeFunc</emphasis>
132 command works as if the
133 <emphasis remap='I'>NotStayPressed</emphasis>
134 option is enabled.</para>