/[fenfire]/fenfire/org/fenfire/view/lava/mindMapView2D.py
ViewVC logotype

Diff of /fenfire/org/fenfire/view/lava/mindMapView2D.py

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

revision 1.6 by mudyc, Wed Aug 13 08:59:48 2003 UTC revision 1.7 by mudyc, Wed Aug 13 10:17:51 2003 UTC
# Line 19  def p(*s): Line 19  def p(*s):
19    
20  dbg = 0  dbg = 0
21    
   
   
22  paper = vob.gl.SpecialPapers.selectionPaper(None);  paper = vob.gl.SpecialPapers.selectionPaper(None);
23  whiteground = vob.gl.GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10);  whiteground = vob.gl.GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10);
24    
25    
   
   
26  class MindMapMainNode2D(ff.view.buoy.MainNode2D):  class MindMapMainNode2D(ff.view.buoy.MainNode2D):
27      def __init__(self, plane, view2d, focus, controller):      def __init__(self, plane, view2d, focus, controller):
28          ff.view.buoy.MainNode2D.__init__(self, plane, view2d, controller);          ff.view.buoy.MainNode2D.__init__(self, plane, view2d, controller);
# Line 76  class MindMapMainNode2D(ff.view.buoy.Mai Line 72  class MindMapMainNode2D(ff.view.buoy.Mai
72          cs_background = vs.orthoCS(cs,'WHITE_GROUND',0, 0,0, p.getWidth(), p.getHeight())          cs_background = vs.orthoCS(cs,'WHITE_GROUND',0, 0,0, p.getWidth(), p.getHeight())
73          vs.put(whiteground, cs_background)          vs.put(whiteground, cs_background)
74                    
75          cs = vs.orthoBoxCS(cs,'CONTENT',0, 0,0, 1,1, p.getWidth(), p.getHeight())          cs = vs.orthoBoxCS(cs,node,0, 0,0, 1,1, p.getWidth(), p.getHeight())
76          p.place(vs, cs)          p.place(vs, cs)
77            vs.coords.activate(cs)
78    
79  class MindNet:  class MindNet:
80      """ Keeps up nodes in hashmap of 'linked to' nodes in hashmap.      """ Keeps up nodes in hashmap of 'linked to' nodes in hashmap.
# Line 135  class MindMapView2D(ff.view.View2D): Line 131  class MindMapView2D(ff.view.View2D):
131          self.whiteground = vob.gl.GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10);          self.whiteground = vob.gl.GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10);
132    
133      def getSize(self, node, wh):      def getSize(self, node, wh):
134          s = 240          s = -1 # s = 240
135          wh[0], wh[1] = s, s          wh[0], wh[1] = s, s
136    
137    
# Line 161  class MindMapView2D(ff.view.View2D): Line 157  class MindMapView2D(ff.view.View2D):
157          paper2box = vs.invertCS(box2plane, "minMap_INv")          paper2box = vs.invertCS(box2plane, "minMap_INv")
158          paper2screen = vs.concatCS(box2screen, 'mindMap_CONCAT',          paper2screen = vs.concatCS(box2screen, 'mindMap_CONCAT',
159                                     paper2box)                                     paper2box)
           
160    
161          # nodes which has been handled          # nodes which has been handled
162          self.nodes = java.util.HashMap()          self.nodes = java.util.HashMap()
# Line 253  class MindMapView2D(ff.view.View2D): Line 248  class MindMapView2D(ff.view.View2D):
248                  if dbg: p('old node', pl)                  if dbg: p('old node', pl)
249    
250          # debugging..          # debugging..
251          if 1:          if dbg:
252              p('main node:',self.alphContent.getText(node))              p('main node:',self.alphContent.getText(node))
253              for n in links:              for n in links:
254                  p('    ',self.alphContent.getText(n),self.nodes.get(n))                  p('    ',self.alphContent.getText(n),self.nodes.get(n))
# Line 271  class MindMapView2D(ff.view.View2D): Line 266  class MindMapView2D(ff.view.View2D):
266          x,y = xy[0], xy[1]          x,y = xy[0], xy[1]
267    
268          s = self.getNodeSize(deepnes)          s = self.getNodeSize(deepnes)
269          cs = vs.coords.orthoBox(into,0, x-s/2.0,y-s/2.0, 1,1, s,s)          cs = vs.orthoBoxCS(into,'foo'+str(key),0, x-s/2.0,y-s/2.0, 1,1, s,s)
270          if 1 or dbg:          if dbg:
271              p('come:',x0,y0, angle, dirAngle)              p('come:',x0,y0, angle, dirAngle)
272              p(cs, xy, angle, s)              p(cs, xy, angle, s)
273          return [cs, x, y, angle]          return [cs, x, y, angle]
# Line 292  class MindMapView2D(ff.view.View2D): Line 287  class MindMapView2D(ff.view.View2D):
287          cs_background = vs.orthoCS(cs,'background',0, 0,0, p.getWidth(), p.getHeight())          cs_background = vs.orthoCS(cs,'background',0, 0,0, p.getWidth(), p.getHeight())
288          vs.put(whiteground, cs_background)          vs.put(whiteground, cs_background)
289    
290          cs = vs.orthoBoxCS(cs,'content',0, 0,0, 1,1, p.getWidth(), p.getHeight())          cs = vs.orthoBoxCS(cs, node,0, 0,0, 1,1, p.getWidth(), p.getHeight())
291          p.place(vs, cs)          p.place(vs, cs)
292            vs.coords.activate(cs)
293    
294    
295    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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