/[fenfire]/fenfire/org/fenfire/demo/buoyoing.py
ViewVC logotype

Diff of /fenfire/org/fenfire/demo/buoyoing.py

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

revision 1.63 by benja, Sun Jun 8 12:13:43 2003 UTC revision 1.64 by benja, Sun Jun 8 12:57:22 2003 UTC
# Line 217  class DoubleGeometer: Line 217  class DoubleGeometer:
217    
218          if (dbg): pa("SET DOUBLE ", h0, h1, w0, w1, s0, s1, buoywidth0, buoywidth1)          if (dbg): pa("SET DOUBLE ", h0, h1, w0, w1, s0, s1, buoywidth0, buoywidth1)
219    
220          vs.coords.setOrthoBoxParams(self.into1, 0,          vs.coords.setOrthoBoxParams(self.into1, 1,
221                        ctrx - .5*w0*s0,                        ctrx - .5*w0*s0,
222                        40,                        0,
223                        s0, s0,                        s0, s0,
224                        w0, h0)                        w0, h0)
225    
226          vs.coords.setOrthoBoxParams(self.into2, 0,          vs.coords.setOrthoBoxParams(self.into2, 1,
227                        -50,                        -50,
228                        h-h1+50,                        h-h1+50,
229                        s1, s1,                        s1, s1,
230                        w1/s1, h1/s1)                        w1/s1, h1/s1)
231    
232          vs.coords.setOrthoBoxParams(self.buoyinto1, 0,          vs.coords.setOrthoBoxParams(self.buoyinto1, 1,
233                        ctrx - .5*buoywidth0, 0 +  .5*h0 - .5*buoyheight0,                        ctrx - .5*buoywidth0, 0 +  .5*h0 - .5*buoyheight0,
234                        s0, s0,                        s0, s0,
235                        buoywidth0, buoyheight0)                        buoywidth0, buoyheight0)
236    
237          vs.coords.setOrthoBoxParams(self.buoyinto2, 0,          vs.coords.setOrthoBoxParams(self.buoyinto2, 1,
238                        ctrx - .5*buoywidth1, 0 + h0 + .5*h1 - .5*buoyheight1,                        ctrx - .5*buoywidth1, 0 + h0 + .5*h1 - .5*buoyheight1,
239                        s1, s1,                        s1, s1,
240                        buoywidth1, buoyheight1)                        buoywidth1, buoyheight1)
# Line 266  class DoubleGeometer: Line 266  class DoubleGeometer:
266    
267          return 0          return 0
268    
269        def buoyMouse(self, mgr, ev, single, link):
270            if ev.getID() != ev.MOUSE_CLICKED:
271                return 1
272    
273            if not (ev.getModifiers() in [ev.BUTTON1_MASK, ev.BUTTON3_MASK]):
274                return 1
275    
276            if isinstance(link[0].getView2D(), ff.view.PageScrollView2D):
277                mgr.singles[0].followLink(link)
278            elif ev.getModifiers() == ev.BUTTON1_MASK:
279                single.followLink(link)
280            else:
281                if mgr.singles[0] == single:
282                    mgr.singles[1].followLink(link)
283                else:
284                    mgr.singles[0].followLink(link)
285    
286            vob.AbstractUpdateManager.chg()
287            return 1
288    
289      def key(self, key):      def key(self, key):
290          if key == "+":          if key == "+":
291              self.split += .03              self.split += .03

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

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