[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/view xubuoy.py
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gzz/view xubuoy.py |
Date: |
Thu, 03 Oct 2002 04:32:29 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/10/03 04:32:29
Modified files:
gzz/view : xubuoy.py
Log message:
Implementing binder and view in xubuoy
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/xubuoy.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gzz/gzz/view/xubuoy.py
diff -c gzz/gzz/view/xubuoy.py:1.1 gzz/gzz/view/xubuoy.py:1.2
*** gzz/gzz/view/xubuoy.py:1.1 Thu Oct 3 03:33:58 2002
--- gzz/gzz/view/xubuoy.py Thu Oct 3 04:32:29 2002
***************
*** 1,3 ****
--- 1,5 ----
+ import gzz
+ import gzz.client
globalcursor = None
globalspan = None
***************
*** 190,196 ****
self.__dict__ = args
class XuPDFScene_PDFContext:
! def __init__(self):
self.modes = [
Mode(
mag=(screensize[1]*1.6,screensize[1]/10),
--- 192,199 ----
self.__dict__ = args
class XuPDFScene_PDFContext:
! def __init__(self, win=None):
! self.win = win
self.modes = [
Mode(
mag=(screensize[1]*1.6,screensize[1]/10),
***************
*** 228,236 ****
def mouse(self, ev):
global globalx, globaly
if ev.getID() == ev.MOUSE_CLICKED:
- # scale = 0.01
- # globalx += (ev.getX() - screensize[0]/2) * scale
- # globaly += (ev.getY() - screensize[1]/2) * scale
point = array([ev.getX(), ev.getY(), 0], 'f')
for b in self.buoys:
h = b.hit(self.currentvs.coords, point)
--- 231,236 ----
***************
*** 272,279 ****
self.currentvs.coords.setAffineParams(self.selectCS, 0,
ctr[0], ctr[1], s[0], 0, 0, s[1])
# print "paint: ",ctr, s
AbstractUpdateManager.chg()
! replaceNewScene(self.currentvs)
else:
--- 272,283 ----
self.currentvs.coords.setAffineParams(self.selectCS, 0,
ctr[0], ctr[1], s[0], 0, 0, s[1])
# print "paint: ",ctr, s
+ AbstractUpdateManager.setNoAnimation()
AbstractUpdateManager.chg()
! if self.win:
! self.win.setUseCachedVobScene(1)
! else:
! replaceNewScene(self.currentvs)
else:
***************
*** 333,337 ****
--- 337,361 ----
self.currentvs = vs
self.selectCS = None
self.papercs = cs1_trans
+
+
+ class XuPDF_ViewBinder(gzz.view.View.NamedView,
+ gzz.client.FallbackBinder):
+ def __init__(self):
+ self.views = {}
+ def _getview(self,win):
+ if not self.views.has_key(win):
+ self.views[win] = XuPDFScene_PDFContext(win)
+ return self.views[win]
+
+ def windowClosed(self, win): pass
+ def mouse(self, ev, win):
+ self._getview(win).mouse(ev)
+ def keystroke(self, key, win):
+ self._getview(win).key(key)
+ def getDefaultName(self):
+ return "XuBuoy"
+ def render(self, vs, cs, context):
+ self._getview(win).scene(vs)
- [Gzz-commits] gzz/gzz/view xubuoy.py,
Tuomas J. Lukka <=
- [Gzz-commits] gzz/gzz/view xubuoy.py, Benja Fallenstein, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Benja Fallenstein, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Benja Fallenstein, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Benja Fallenstein, 2002/10/03
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/19
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/20
- [Gzz-commits] gzz/gzz/view xubuoy.py, Tuomas J. Lukka, 2002/10/28