[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/modules/pp demotest.py
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gzz/modules/pp demotest.py |
Date: |
Wed, 04 Dec 2002 13:25:25 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 02/12/04 13:25:18
Modified files:
gzz/modules/pp : demotest.py
Log message:
more bindings.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.28&tr2=1.29&r1=text&r2=text
Patches:
Index: gzz/gzz/modules/pp/demotest.py
diff -u gzz/gzz/modules/pp/demotest.py:1.28 gzz/gzz/modules/pp/demotest.py:1.29
--- gzz/gzz/modules/pp/demotest.py:1.28 Wed Dec 4 12:02:09 2002
+++ gzz/gzz/modules/pp/demotest.py Wed Dec 4 13:25:18 2002
@@ -14,8 +14,8 @@
from gfx.libutil import saveanim
-from test.tools import tools
-enfMaker = gzz.media.impl.Enfilade1DImpl.Enfilade1DImplMaker()
+#from test.tools import tools
+#enfMaker = gzz.media.impl.Enfilade1DImpl.Enfilade1DImplMaker()
AbstractUpdateManager.defaultAnimationTime = 3000
@@ -126,7 +126,8 @@
self.ppv.useStencil = not self.ppv.useStencil
if key == "Ctrl-L":
self.ppv.showLinkbuoys = not self.ppv.showLinkbuoys
- if len(key) == 1 or key == "Backspace" or key == "Delete":
+ if len(key) == 1 or key == "Backspace" or key == "Delete" \
+ or key == "Left" or key == "Right":
mode = 1
if not 32 <= ord(key[0]) <= 254:
return
@@ -142,9 +143,9 @@
print "OFss:", offs
AbstractUpdateManager.setNoAnimation()
- if len(key) == 1:
- ppactions.insertText(c.getId(), offs, key)
- self.avc.setCursorOffset(offs+1)
+ if len(key) == 1:
+ ppactions.insertText(c.getId(), offs, key)
+ self.avc.setCursorOffset(offs+1)
if key == "Backspace":
if offs != 0:
ppactions.deleteText(c.getId(), offs-1, offs)
@@ -152,8 +153,12 @@
if key == "Delete":
print 'Untested! Doesn\'t check the length'
ppactions.deleteText(c.getId(), offs, offs+1)
-
-
+ if key == "Left":
+ if offs != 0:
+ self.avc.setCursorOffset(offs-1)
+ if key == "Right":
+ self.avc.setCursorOffset(offs+1)
+
def scene(self, vs):
vs.map.put(background((0.4,0.5,0.8)))
vs.map.put(getDListNocoords("""