gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz Gzz.py


From: Benja Fallenstein
Subject: [Gzz-commits] gzz Gzz.py
Date: Sun, 05 Jan 2003 05:41:33 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      03/01/05 05:41:29

Modified files:
        .              : Gzz.py 

Log message:
        Ayse's bindings changes

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Gzz.py.diff?tr1=1.59&tr2=1.60&r1=text&r2=text

Patches:
Index: gzz/Gzz.py
diff -u gzz/Gzz.py:1.59 gzz/Gzz.py:1.60
--- gzz/Gzz.py:1.59     Fri Jan  3 13:05:06 2003
+++ gzz/Gzz.py  Sun Jan  5 05:41:27 2003
@@ -38,6 +38,9 @@
     print head, params
     return type(head(), params)
 
+def action(list, win=1):
+    return gzz.client.PotionFallbackBinder.Action(call(list), win)
+
 class Gzz(java.lang.Runnable):
     """The main Gzz client class."""
 
@@ -46,7 +49,7 @@
 
     def run(self):
         self.style = self.graphicsAPI.getTextStyle("SansSerif", 
java.awt.Font.PLAIN, 13);
-        self.views = [gzz.view.VobVanishingClient(), 
+        self.views = [gzz.view.VobVanishingClient(),
                       gzz.view.RowColView(0), gzz.view.RowColView(1),
                       ]
         self.viewSpecificBinders = java.util.HashMap()
@@ -62,7 +65,7 @@
         elif 'double-size' in self.flags:
             self.cellContentView = \
                 gzz.view.CellMagnifier(self.cellContentView, 2)
-        
+
         if self.gl:
             xubuoy = gzz.view.xubuoy.XuPDF_ViewBinder()
             self.views.append(xubuoy)
@@ -70,13 +73,13 @@
             self.cellContentView = gzz.view.MultitypeCellContentView(
                 self.cellContentView, gzz.view.pagespanview.ContentView(),
                 gzz.view.ImageCellContentView())
-            
+
         if 'lollipop' not in self.flags:
             self.cellViews = [gzz.view.BoxCellView(self.cellContentView)]
         else:
             self.cellViews = [gzz.view.LollipopCellView(self.cellContentView)]
 
-        gzz.client.Fallback(self.space.getHomeCell(), self.linkSpace, 
+        gzz.client.Fallback(self.space.getHomeCell(), self.linkSpace,
                             self.binder, self.dimensions, self.decorators,
                             self.views, self.viewSpecificBinders,
                             self.cellViews, self.filers)
@@ -110,7 +113,7 @@
             import bindings
             self.binder = gzz.client.pythonbinder.PythonBinder(
                 bindings.normal_mode, bindings.edit_mode, bindings.search_mode)
-            
+
         elif 'potion-bindings' in self.flags:
             arr = gzz.client.PotionFallbackBinder.Arrow
             def map(dict):
@@ -118,8 +121,9 @@
                 for k,v in dict.items(): m.put(k, v)
                 return m
 
-            from gzz.potion.potions import NewCell, Connect, PrefixOrOther
-
+            from gzz.potion.potions import NewCell, Connect, PrefixOrOther, \
+                                          Hop2, Put, PrefixOrRight, 
PrefixOrLeft, \
+                                          RightWindow, LeftWindow, Go, 
Clone,ToggleMark
             bindings = {
                 'Up': arr(1,1,-1), 'i': arr(1,1,-1), 'e': arr(0,1,-1),
                 'Down': arr(1,1,1), ',': arr(1,1,1), 'c': arr(0,1,1),
@@ -127,10 +131,17 @@
                 'Right': arr(1,0,1), 'l': arr(1,0,1), 'f': arr(0,0,1),
                 'k': arr(1,2,1), 'K': arr(1,2,-1),
                 'd': arr(0,2,1), 'D': arr(0,2,-1),
-                'n': call([NewCell, None]),
-                '-': call([Connect, [PrefixOrOther], None])
-            }
-
+                'n': action([NewCell, None]),
+                '-': action([Connect, [PrefixOrOther], None]),
+               'h': action([Hop2, None]),
+               'p': action([Put,[RightWindow],[PrefixOrLeft]]),
+               'g': action([Go, [PrefixOrOther]], 1),
+               'G': action([Go, [PrefixOrOther]], 0),
+               't': action([Clone,[PrefixOrRight], None]),
+                'T': action([Clone,[PrefixOrLeft], None]),
+               'm': action([ToggleMark, [RightWindow]]),
+               'M': action([ToggleMark, [LeftWindow]]),
+           }
             self.binder = gzz.client.PotionFallbackBinder(map(bindings))
             self.decorators.append(gzz.view.PendingPotionDecorator())
         else:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]