[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/doc design_custominput.rst
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] libvob/doc design_custominput.rst |
Date: |
Sun, 29 Jun 2003 05:36:20 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Tuomas J. Lukka <address@hidden> 03/06/29 05:36:19
Modified files:
doc : design_custominput.rst
Log message:
designdoccing
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/doc/design_custominput.rst.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: libvob/doc/design_custominput.rst
diff -u libvob/doc/design_custominput.rst:1.3
libvob/doc/design_custominput.rst:1.4
--- libvob/doc/design_custominput.rst:1.3 Sun Jun 29 05:25:24 2003
+++ libvob/doc/design_custominput.rst Sun Jun 29 05:36:19 2003
@@ -83,7 +83,11 @@
The ``*Model`` classes are a central piece of the API.
This is a design similar
-to swing: for each numeric .
+to swing: for each controlled "thing" there is a ``Model`` object
+which implements a relevant interface. This allows us to, e.g., use special
+models in Jython code so that the variable controlled is actually
+directly an object attribute - the intent is to use this code
+in ``vob.putil.demokeys``.
.. UML:: custominput_models
@@ -108,42 +112,13 @@
---
horizontally(50, xx, BoundedFloatModel, ModFloatModel);
- vertically(50, xx, Model, xx);
+ vertically(50, yy, Model, xx);
There can only be one main model per axis - to not confuse the user.
If desired, we may later add the capability to put in "non-main"
listeners, but this is not a priority.
-The input devices, on the other hand, are represented by a central class
-which allows programs to access the currently configured input devices:
-``InputDeviceManager``. From this class, users may get instances of
-the ``InputDevice`` class. This class also contains the methods for
-beginning and ending calibration and choosing axes by moving them.
-The ``InputDevice`` classes again allow users to get the axes.
-
-.. UML:: custominput_inputs
-
- class InputDeviceManager "interface"
- fields
- STATE_CALIBRATING
- STATE_CHOOSING
- STATE_NORMAL
- methods
- void setState(int state)
- Axis getCurrentChoice()
- assoc multi(1) - multi(*) InputDevice
-
- class InputDevice "interface"
- assoc multi(1) - multi(*) Axis
-
- class Axis "interface"
- methods
- getName()
-
- ---
- horizontally(60, InputDeviceManager, InputDevice, Axis);
-
The models are connected to the axes through absolute and relative
axis listeners:
@@ -167,21 +142,60 @@
methods
void changedRelative(float delta)
- class BoundedFloatLinearAbsoluteAdapter inherit AbsoluteAxisListener
+ class BoundedFloatLinearAbsoluteAdapter
realize AbsoluteAxisListener
- dep "use" BoundedFloatModel
+ assoc multi(0..1) - multi(1) BoundedFloatModel
- class BoundedFloatLogAbsoluteAdapter inherit AbsoluteAxisListener
+ class BoundedFloatLogAbsoluteAdapter
realize AbsoluteAxisListener
- dep "use" BoundedFloatModel
+ assoc multi(0..1) - multi(1) BoundedFloatModel
- class ModFloatRelativeAdapter inherit RelativeAxisListener
+ class ModFloatRelativeAdapter
+ realize RelativeAxisListener
+ assoc multi(0..1) - multi(1) ModFloatModel
class BoundedFloatModel "interface"
class ModFloatModel "interface"
---
+ horizontally(150, xx, Axis, AxisListener);
+ horizontally(100, yy, AbsoluteAxisListener, RelativeAxisListener);
+ horizontally(40, zz, BoundedFloatLinearAbsoluteAdapter,
BoundedFloatLogAbsoluteAdapter, ModFloatRelativeAdapter);
+ horizontally(130, qq, BoundedFloatModel, ModFloatModel);
+
+ vertically(60, ww, AxisListener, yy, zz, qq);
+
+
+
+The input devices, on the other hand, are represented by a central class
+which allows programs to access the currently configured input devices:
+``InputDeviceManager``. From this class, users may get instances of
+the ``InputDevice`` class. This class also contains the methods for
+beginning and ending calibration and choosing axes by moving them.
+The ``InputDevice`` classes again allow users to get the axes.
+
+.. UML:: custominput_inputs
+
+ class InputDeviceManager "interface"
+ fields
+ STATE_CALIBRATING
+ STATE_CHOOSING
+ STATE_NORMAL
+ methods
+ void setState(int state)
+ Axis getCurrentChoice()
+ assoc multi(1) - multi(*) InputDevice
+
+ class InputDevice "interface"
+ assoc multi(1) - multi(*) Axis
+
+ class Axis "interface"
+ methods
+ getName()
+
+ ---
+ horizontally(60, xx, InputDeviceManager, InputDevice, Axis);