[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/vob/buoy buoymanager.py
From: |
Matti Katila |
Subject: |
[Gzz-commits] libvob/vob/buoy buoymanager.py |
Date: |
Mon, 19 May 2003 03:15:59 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Matti Katila <address@hidden> 03/05/19 03:15:59
Modified files:
vob/buoy : buoymanager.py
Log message:
context for two main view
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/buoy/buoymanager.py.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
Patches:
Index: libvob/vob/buoy/buoymanager.py
diff -u libvob/vob/buoy/buoymanager.py:1.18 libvob/vob/buoy/buoymanager.py:1.19
--- libvob/vob/buoy/buoymanager.py:1.18 Fri May 16 10:00:36 2003
+++ libvob/vob/buoy/buoymanager.py Mon May 19 03:15:59 2003
@@ -177,13 +177,18 @@
class MultiBuoyManager:
- def __init__(self, mainNodes, connectors, geometer):
+ def __init__(self, mainNodes, connectors, geometer, context):
self.singles = [
SingleFocusManager(i, connectors) for i in mainNodes]
self.geometer = geometer
self.replaceScene = None
+ self.context = context
+ self.context.initMainNodes(len(mainNodes))
+ self.lastIndex = 0
def key(self, key):
- self.singles[0].mainNode.keystroke(key)
+ index = self.lastIndex
+ self.context.setMainNodeIndex(index)
+ self.singles[index].mainNode.keystroke(key)
vob.AbstractUpdateManager.chg()
pass
def getVs(self):
@@ -206,7 +211,9 @@
geoms = self.geometer.place(vs)
+ self.context.renderContext(vs, 0)
for i in range(0, len(self.singles)):
+ self.context.setMainNodeIndex(i)
self.singles[i].drawscene(vs,
geoms[i][0],
geoms[i][1],
@@ -227,22 +234,25 @@
vob.AbstractUpdateManager.chg()
return
# Fall through if no link - need main node
- for single in self.singles:
- if single.mainNode.mouseClickHit(ev, self.vs, None):
- if single.mainNode.mouse(ev, self.vs):
+ for i in range(0, len(self.singles)):
+ if self.singles[i].mainNode.mouseClickHit(ev, self.vs, None):
+ self.context.setMainNodeIndex(i)
+ self.lastIndex = i
+ if self.singles[i].mainNode.mouse(ev, self.vs):
self.replaceScene = self.vs
vob.AbstractUpdateManager.setNoAnimation()
vob.AbstractUpdateManager.chg()
return
- # ...or try some of the main nodes.
- for single in self.singles:
- if not single.mainNode.mouseClickHit(ev, self.vs, None):
- if single.mainNode.mouse(ev, self.vs):
- self.replaceScene = self.vs
- vob.AbstractUpdateManager.setNoAnimation()
- vob.AbstractUpdateManager.chg()
- return
+ # ...then see context
+ self.context.setMainNodeIndex(self.lastIndex)
+ plane = self.context.doMouse(ev, self.vs)
+ if not plane == None:
+ self.singles[self.lastIndex] = plane
+ #ff.view.MainNode2D(plane,
+ #self.singles[self.lastIndex].getView2D(),
+ #0,0, 1)
+ vob.AbstractUpdateManager.chg()
vob.impl.gl.GLScreen.dbg = 1
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/02
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/16
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Tuomas J. Lukka, 2003/05/16
- [Gzz-commits] libvob/vob/buoy buoymanager.py,
Matti Katila <=
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/21
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/21
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/23
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/23
- [Gzz-commits] libvob/vob/buoy buoymanager.py, Matti Katila, 2003/05/26