Jitterbug no more.
[fvwm.git] / doc / commands / Direction.xml
blob1bf45b7b45e9ce2c504d166d14f3d11f6772f90e
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!-- $Id: Direction.xml,v 1.3 2007/06/16 12:38:46 griph Exp $ -->
3 <!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
4   "../docbook-xml/docbookx.dtd"
6 <!ENTITY % myents SYSTEM "../fvwm.ent" >
7 %myents;
8 ]>
11 <section id='Direction'>
12 <title>Direction</title>
14 <cmdsynopsis>
15         <command>Direction</command
16         ><arg choice='opt'>FromPointer</arg
17         ><arg choice='plain'
18                 ><replaceable>direction</replaceable
19         ></arg
20         ><arg choice='opt'
21                 >(<replaceable>conditions</replaceable
22         >)</arg
23         ><arg choice='plain'
24                 ><replaceable>command</replaceable
25         ></arg>
26 </cmdsynopsis>
28 <para>Performs
29 <replaceable>command</replaceable>
30 (typically
31 <fvwmref cmd="Focus"/>)
32 on a window in the given direction which satisfies all
33 <replaceable>conditions</replaceable>.
34 Normally, the center of the currently focused window or the
35 context window in which the command was invoked is taken as the
36 starting point.  Lacking such a window, or when the
37 <fvwmopt cmd="Direction" opt="FromPointer"/>
38 option is given, the current position of the pointer is taken as
39 the starting point.  The
40 <replaceable>direction</replaceable>
41 may be one of "North", "Northeast", "East", "Southeast", "South",
42 "Southwest", "West", "Northwest" and "Center".  Which window
43 <emphasis remap='B'>Direction</emphasis>
44 selects depends on angle and distance between the center points of
45 the windows.  Closer windows are considered a better match than
46 those farther away.  The
47 <fvwmopt cmd="Direction" opt="Center"/>
48 direction simply selects the window closest to the starting point.
49 Returns -1 if an invalid direction was given.
50 See the <fvwmref sect="conditionals" opt="conditions" name="Conditions"/> section for a list of conditions.</para>
52 </section>