/[libvob]/libvob/doc/pegboard/single_focus_manager--mudyc/peg.rst
ViewVC logotype

Diff of /libvob/doc/pegboard/single_focus_manager--mudyc/peg.rst

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

revision 1.3 by mudyc, Sat Sep 6 04:57:05 2003 UTC revision 1.4 by mudyc, Mon Sep 15 13:17:36 2003 UTC
# Line 13  PEG single_focus_manager--mudyc: Single Line 13  PEG single_focus_manager--mudyc: Single
13  :Type:     Interface  :Type:     Interface
14    
15    
16  The buoy oriented interface is in real use and must be stabilizer.  The buoy oriented interface is in real use and must be stabilized.
17  Here are the proposal interface to be implemented by single manager.  Here are the propose interface to be implemented by manager of
18  The term single manager means one focus view port which is arounded  one focus view port and buoy view ports.
 by buoy view ports.  
19    
20    
21  Issues  Issues
22  ======  ======
23    
24  - Method naming?  ..
25    
26  Changes  Changes
27  =======  =======
28    
29  The followin interface should be implemented:  We define the following......
30    The following interface should be implemented:
31    
32  ::  ::
33    
34      /** The manager for buoy view ports and one focus view port.      /** An interface for managing the buoy links and the construction
35         * of base coordinate systems related to buoy view.
36         * Basicly the manager constructs activated coordinate systems for focus, main node,
37         * and for every buoy links. The information of buoys, i.e. buoy anchor, node type etc.,
38         * are needed afterwards when user clicks any of the buoys to perform an action.
39       */       */
40      public interface BuoyManager {      public interface BuoyManager extends BuoyLinkListener {
41    
42          /** Folow the buoy link that is given.          /** Represantion of anchor object rendered with some node type.
43           * BuoyManager implementation should interpolate           * Buoy implementation should be memory efficient
44           * the old buoy to main view port and           * and this implies that it's not clear that reference of buoy,
45           * old main view port to new buoy.           * which you asked from BuoyManager, is same after new draw is done.
46             */
47            public interface Buoy {
48    
49                /** Get the node type of this buoy.
50                 */
51                BuoyViewNodeType getNodeType();
52    
53                /** Get the link identification which is
54                 * used in interpolations. The identification must be unique
55                 * to get proper interpolation.
56                 */
57                Object getLinkId();
58    
59    
60                /** Get the anchor inside of this buoy.
61                 * The anchor is the object which was the reason to render this buoy.
62                 */
63                Object getBuoyAnchor();
64    
65    
66                /** Get the coordinate system of this buoy.
67                 * The cs is given and activated by BuoyManager and the node type
68                 * of this Buoy renders into it.
69                 */
70                int getBuoyCS();
71    
72                /** Get the direction of this buoy. If direction > 0
73                 * buoy is on the rigth side, else the buoy is on the left side.
74                 */
75                int getDirection();
76            }
77    
78    
79            /** Moves the focus to given buoy with interpolation from old buoy to new focus.
80             * If the Buoy is not from this BuoyManager an error is thrown.
81             * The old focus view port should be interpolated to new buoy.
82           */           */
83          void followLink(Buoy buoy);          void moveFocusTo(Buoy buoy);
84    
85            /** Draw the focus main node. While rendering BuoyViewMainNode
86          /** Draw the focus view port and buoys around it.            * BuoyManager get buoys with LinkListener's call back
87           * @param into The coordinate system where the focus is drawn.            * interface which it implements. The buoys must not be rendered
88              * while call back linking but after every link, because
89              * main node might render into stenciled buffer.
90              * @param into The coordinate system where the focus is drawn.
91           */           */
92          void drawScene(VobScene vs, int into);          void draw(VobScene vs, int into);
93    
94          /** Returns the main node view.          /** Returns the focused main node.
95           */           */
96          BuoyViewMainNode getViewMainNode();          BuoyViewMainNode getMainNode();
97    
98          /** Return the buoy if it's associated with this manager          /** To found the buoy which is clicked ask activated
99           * by given coordinate system, otherwise returns null.           * coordinate system from VobScene.
100           */           */
101          Buoy getBuoy(int cs);          Buoy getBuoy(int cs);
     }  
   
102    
103  The Buoy class is one buoy floating around including these attributes      }
 (In jython prototype implementation it used to be list of objects with  
 out any naming. At least definited C kind structure should be used instead.):  
   
   
 ::  
   
     /** One instance of buoy hanging around buoy view managered by BuoyManager.  
      * @see BuoyManager  
      */  
     public class Buoy {  
         public final BuoyViewNodeType buoyNode;  
         public final Object linkId, buoyAnchor;  
         public final int buoyCS, direction;  
104    
105    
         /** One buoy.  
          * @param linkId The link identification of this buoy used in interpolations.  
          * @param buoyCS The coordinate system of this buoy.  
          */  
         public Buoy(BuoyViewNodeType buoyNode, Object linkId,  
                 Object buoyAnchor, int buoyCS, int direction) {  
                 this.buoyNode = buoyNode;  
                 this.linkId = linkId;  
                 this.buoyAnchor = buoyAnchor;  
                 this.buoyCS = buoyCS;  
                 this.direction = direction;  
         }  
     }  

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

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