/[libvob]/libvob/doc/design_custominput.rst
ViewVC logotype

Diff of /libvob/doc/design_custominput.rst

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by tjl, Sun Jun 29 09:36:19 2003 UTC revision 1.5 by tjl, Sun Jun 29 13:53:49 2003 UTC
# Line 78  Each input device should define names an Line 78  Each input device should define names an
78  for programs to show the user what can be connected to what.  for programs to show the user what can be connected to what.
79    
80    
81  Design  Design of the interfaces
82  ======  ========================
83    
84    Models
85    ------
86    
87  The ``*Model`` classes are a central piece of the API.  The ``*Model`` classes are a central piece of the API.
88  This is a design similar  This is a design similar
# Line 91  in ``vob.putil.demokeys``. Line 94  in ``vob.putil.demokeys``.
94    
95  ..  UML:: custominput_models  ..  UML:: custominput_models
96    
97        jlinkpackage org.nongnu.libvob.input
98    
99      class Model "interface"      class Model "interface"
100            jlink
101          methods          methods
102              addActionListener(...)              addActionListener(...)
103    
104      class BoundedFloatModel "interface"      class BoundedFloatModel "interface"
105            jlink
106          inherit Model          inherit Model
107          fields          fields
108              minimum              minimum
# Line 103  in ``vob.putil.demokeys``. Line 110  in ``vob.putil.demokeys``.
110              value              value
111    
112      class ModFloatModel "interface"      class ModFloatModel "interface"
113            jlink
114          inherit Model          inherit Model
115          fields          fields
116              modulus              modulus
# Line 115  in ``vob.putil.demokeys``. Line 123  in ``vob.putil.demokeys``.
123      vertically(50, yy, Model, xx);      vertically(50, yy, Model, xx);
124    
125    
126  There can only be one main model per axis - to not confuse the user.  Axes
127  If desired, we may later add the capability to put in "non-main"  ----
 listeners, but this is not a priority.  
128    
129  The models are connected to the axes through absolute and relative  The models are connected to the axes through absolute and relative
130  axis listeners:  axis listeners:
131    
132  ..  UML:: custominput_adapters  ..  UML:: custominput_adapters
133    
134        jlinkpackage org.nongnu.libvob.input
135    
136      class Axis "interface"      class Axis "interface"
137            jlink
138          assoc multi(1) - multi(0..1) role(mainListener) AxisListener          assoc multi(1) - multi(0..1) role(mainListener) AxisListener
139          methods          methods
140              setMainListener(AxisListener l)              setMainListener(AxisListener l)
141    
142      class AxisListener "interface"      class AxisListener "interface"
143            jlink
144    
145    
146      class AbsoluteAxisListener "interface"      class AbsoluteAxisListener "interface"
147            jlink
148          inherit AxisListener          inherit AxisListener
149          methods          methods
150              void changedAbsolute(float newvalue)              void changedAbsolute(float newvalue)
151    
152      class RelativeAxisListener "interface"      class RelativeAxisListener "interface"
153            jlink
154          inherit AxisListener          inherit AxisListener
155          methods          methods
156              void changedRelative(float delta)              void changedRelative(float delta)
157    
158      class BoundedFloatLinearAbsoluteAdapter      class BoundedFloatLinearAbsoluteAdapter
159            jlink
160          realize AbsoluteAxisListener          realize AbsoluteAxisListener
161          assoc multi(0..1) - multi(1) BoundedFloatModel          assoc multi(0..1) - multi(1) BoundedFloatModel
162    
163      class BoundedFloatLogAbsoluteAdapter      class BoundedFloatLogAbsoluteAdapter
164            jlink
165          realize AbsoluteAxisListener          realize AbsoluteAxisListener
166          assoc multi(0..1) - multi(1) BoundedFloatModel          assoc multi(0..1) - multi(1) BoundedFloatModel
167    
168      class ModFloatRelativeAdapter      class ModFloatRelativeAdapter
169            jlink
170          realize RelativeAxisListener          realize RelativeAxisListener
171          assoc multi(0..1) - multi(1) ModFloatModel          assoc multi(0..1) - multi(1) ModFloatModel
172    
173      class BoundedFloatModel "interface"      class BoundedFloatModel "interface"
174            jlink
175    
176      class ModFloatModel "interface"      class ModFloatModel "interface"
177            jlink
178    
179      ---      ---
180      horizontally(150, xx, Axis, AxisListener);      horizontally(150, xx, Axis, AxisListener);
# Line 167  axis listeners: Line 185  axis listeners:
185      vertically(60, ww, AxisListener, yy, zz, qq);      vertically(60, ww, AxisListener, yy, zz, qq);
186            
187    
188    There can only be one main model per axis - to not confuse the user.
189    If desired, we may later add the capability to put in "non-main"
190    listeners, but this is not a priority.
191    
192    Input devices
193    -------------
194    
195  The input devices, on the other hand, are represented by a central class  The input devices, on the other hand, are represented by a central class
196  which allows programs to access the currently configured input devices:  which allows programs to access the currently configured input devices:
# Line 177  The ``InputDevice`` classes again allow Line 201  The ``InputDevice`` classes again allow
201    
202  ..  UML:: custominput_inputs  ..  UML:: custominput_inputs
203    
204        jlinkpackage org.nongnu.libvob.input
205    
206      class InputDeviceManager "interface"      class InputDeviceManager "interface"
207            jlink
208          fields          fields
209              STATE_CALIBRATING              STATE_CALIBRATING
210              STATE_CHOOSING              STATE_CHOOSING
# Line 188  The ``InputDevice`` classes again allow Line 215  The ``InputDevice`` classes again allow
215          assoc multi(1) - multi(*) InputDevice          assoc multi(1) - multi(*) InputDevice
216    
217      class InputDevice "interface"      class InputDevice "interface"
218            jlink
219          assoc multi(1) - multi(*) Axis          assoc multi(1) - multi(*) Axis
220    
221      class Axis "interface"      class Axis "interface"
222            jlink
223          methods          methods
224              getName()              getName()
225    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26