gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/doc/pegboard/controllers_events--mudyc p...


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob/doc/pegboard/controllers_events--mudyc p...
Date: Tue, 05 Aug 2003 09:49:45 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/08/05 09:49:45

Modified files:
        doc/pegboard/controllers_events--mudyc: peg.rst 

Log message:
        more

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/doc/pegboard/controllers_events--mudyc/peg.rst.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: libvob/doc/pegboard/controllers_events--mudyc/peg.rst
diff -u libvob/doc/pegboard/controllers_events--mudyc/peg.rst:1.3 
libvob/doc/pegboard/controllers_events--mudyc/peg.rst:1.4
--- libvob/doc/pegboard/controllers_events--mudyc/peg.rst:1.3   Sat Jul 19 
02:49:10 2003
+++ libvob/doc/pegboard/controllers_events--mudyc/peg.rst       Tue Aug  5 
09:49:45 2003
@@ -5,8 +5,8 @@
 
 :Authors:  Matti J. Katila
 :Date-Created: 2003-07-15
-:Last-Modified: $Date: 2003/07/19 06:49:10 $
-:Revision: $Revision: 1.3 $
+:Last-Modified: $Date: 2003/08/05 13:49:45 $
+:Revision: $Revision: 1.4 $
 :Status:   Current
 :Scope:    Minor
 :Type:     Architecture requirements
@@ -27,20 +27,40 @@
 
 - How this peg affects to Tjl's input framework?
 
+    RESOLVED: This PEG uses some of that framework, by allowing mouse
+    events to be adapted for relative axis listeners.
+
+    On the whole, the two frameworks have relatively different purposes.
+
 - Should normal mouse controller and custom LEGO controllers 
   fit in the same API at some level?
 
-    RESOLVED:
-    Yes, 'cause to user they are just controllers.
+    RESOLVED: Yes, 'cause to user they are just controllers.
 
 - Should custom LEGO controllers be able to control many things
   in different contexts, like fiddling zoom pan in buoyoing view and
   in other view for example change the speed of interpolation?
 
-    RESOLVED:
-    This is minor issue since with requirements specified 
+    RESOLVED: This is minor issue since with requirements specified 
     it is doable. The question is: would it be sensible.
   
+- How do we change bindings while the program is running?
+
+    RESOLVED: By providing enough information to the control setup
+    (action name, ...), we can make the program binding be just
+    the default and load user bindings behind the scenes.
+
+    Thus, if we just make sure that we have enough information in the
+    loop, we can postpone this.
+
+- Should these classes go to the vob.input package or a new vob.mouse package?
+  On the one hand, they will use .input for RelativeAxisListener,
+  but on the other, this is a separate piece that may be used or not,
+  as per the user's choice.
+
+    RESOLVED: Separate package. Clearly showing the different modules
+    is important.
+
 
 Requirements
 ============
@@ -89,4 +109,57 @@
         - Close to relative axes model
 
 - Modifiers
+
+Design
+======
+
+Listeners: the interfaces the API user provides
+-----------------------------------------------
+
+The user provides listeners for different events.
+The central binding class is used to multiplex e.g. mouse
+button events with different modifiers to different 
+listeners.
+
+Mouse drag events may be multiplexed by the location of the original
+press event through a vob.mouse.MousePressListener::
+
+    public interface MousePressListener {
+       /** The mouse was pressed
+        * @param x,y The coordinates.
+        * @return If non-null, the return value is the drag listener
+        *      to be used if the mouse is dragged from here.
+        */
+       MouseDragListener pressed(int x, int y);
+    }
+
+The mouse drag interface is as follows::
+
+    public interface MouseDragListener {
+       /** Called when the drag is started. This method
+        * is called even if this dragListener was received
+        * from a MousePressListener to make these easier
+        * to program.
+        */
+       void startDrag(int x, int y);
+       /** Called when a drag event is received.
+        */
+       void drag(int x, int y);
+       /** Called when the drag is ended.
+        */
+       void endDrag(int x, int y);
+    }
+
+Mouse clicks are handled separately:
+
+    public interface MouseClickListener {
+       /** The mouse was clicked.
+        * @param x,y The coordinates.
+        */
+       MouseDragListener pressed(int x, int y);
+    }
+
+Separating these three classes allows the easiest assembling of 
+event handling structures at run time.
+
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]