[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/modules/pp PPView2.java demotest.py
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gzz/modules/pp PPView2.java demotest.py |
Date: |
Sat, 11 Jan 2003 08:10:54 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 03/01/11 08:10:53
Modified files:
gzz/modules/pp : PPView2.java demotest.py
Log message:
clean a bit
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPView2.java.diff?tr1=1.55&tr2=1.56&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.62&tr2=1.63&r1=text&r2=text
Patches:
Index: gzz/gzz/modules/pp/PPView2.java
diff -u gzz/gzz/modules/pp/PPView2.java:1.55
gzz/gzz/modules/pp/PPView2.java:1.56
--- gzz/gzz/modules/pp/PPView2.java:1.55 Fri Jan 10 13:21:45 2003
+++ gzz/gzz/modules/pp/PPView2.java Sat Jan 11 08:10:53 2003
@@ -36,7 +36,7 @@
import java.util.*;
public class PPView2 implements View {
-public static final String rcsid = "$Id: PPView2.java,v 1.55 2003/01/10
18:21:45 mudyc Exp $";
+public static final String rcsid = "$Id: PPView2.java,v 1.56 2003/01/11
13:10:53 mudyc Exp $";
public static boolean dbg = true;
private static void pa(String s) { System.err.println(s); }
@@ -147,11 +147,6 @@
public boolean useStencil = true;
/* jython publics */
- public boolean test_U=false;
- public boolean test_Y=false;
- public int OLD_Y = -1;
- public int OLD_U = -1;
-
public PPMouseEvents pp_events;
public boolean replaceNewScene = false;
public PPActions ppactions;
@@ -297,17 +292,15 @@
int actr = vs.translateCS(anchorUnit, "TR12", .5f, .5f);
// 1-N kludge
- pa("count: "+count+", even? "+ count %2);
if (count > 0) {
// evens 2,4,6 -> 1,2,3,4,..
// odds 1,3,5,7 -> -1,-2,-3,-4
if (count %2 == 1) {
count++;
count *= -1;
- count *= 0.5;
- } else count *= 0.5;
+ }
+ count *= 0.5;
}
- pa("count ->"+count);
actr = vs.translateCS(actr, "SHIFT_"+count, 0, count * 1.6f);
int buoycs = floater.buoyCoordsys(actr, key);
@@ -341,6 +334,7 @@
if (interps.get("link"+c.toString()) != null) {
((DefaultVobMatcher)vs.matcher).keymapSingleCoordsys(nadir_buoy,
((Integer)interps.get("link"+c.toString())).intValue());
+ pa("FOOOOOOBAR");
}
buoyqueue.add(new Runnable() {
@@ -538,27 +532,6 @@
leftPanelZoom, leftPanelZoom);
vs.matcher.add(fr, c2f, "C2F");
ev_handler.onClick(fr, "Shortcut link", new Object[]{p, new
Integer(MAIN_CS), new Integer(fr)});
- /*
- if (interps.get("shortcut") != null) {
-
((DefaultVobMatcher)vs.matcher).keymapSingleCoordsys(MAIN_CS,
- ((Integer)interps.get("shortcut")).intValue());
- }
- */
-
- if (i ==0) {
- // testing
- int barU = -1;
- if (test_U) {
- barU = vs.translateCS(0, "Y", 1000, 100, 0);
- pa("***foobar*** "+barU);
- test_U = false;
- }
- if (OLD_U > 0 && barU >0)
-
((DefaultVobMatcher)vs.matcher).keymapSingleCoordsys(ctr, OLD_U);
- OLD_U = barU;
- }
-
-
buoy_vc.setAccursed(p);
buoy_singlePlane.render(vs, fr, c2f);
Index: gzz/gzz/modules/pp/demotest.py
diff -u gzz/gzz/modules/pp/demotest.py:1.62 gzz/gzz/modules/pp/demotest.py:1.63
--- gzz/gzz/modules/pp/demotest.py:1.62 Fri Jan 10 13:57:26 2003
+++ gzz/gzz/modules/pp/demotest.py Sat Jan 11 08:10:53 2003
@@ -123,27 +123,22 @@
if key == "Ctrl-T":
c = self.avc.getAccursed()
self.ppv.dump(c)
- if key == "Ctrl-Y":
- self.ppv.test_Y = 1
- if key == "Ctrl-U":
- self.ppv.test_U = 1
-
- if key == "Ctrl-E":
+ elif key == "Ctrl-E":
print self.vs.matcher.interpList(self.vs.matcher, 0)
- if key == "Alt-R":
+ elif key == "Alt-R":
os.system('make compile')
loadScenes()
- if key == "Ctrl-R":
+ elif key == "Ctrl-R":
loadScenes()
- if key == "Ctrl-Q":
+ elif key == "Ctrl-Q":
clean_data('except_pkg')
System.exit(43)
- if key == "Ctrl-I":
+ elif key == "Ctrl-I":
print "INTERPLIST"
self.vs.dump()
print self.vs.matcher.interpList(self.vs.matcher)
- if key == "Ctrl-X":
+ elif key == "Ctrl-X":
print 'Save...'
# Before saveing all empty cells should be removed!
@@ -160,7 +155,7 @@
clean_data()
# Loading
- if key == "Ctrl-Z":
+ elif key == "Ctrl-Z":
print 'Loading scene'
print 'DOES NOT WORK'
loadScenes()
@@ -177,21 +172,22 @@
self.ppv.ppactions.initSpace(self.space)
gzz.client.AbstractUpdateManager.chg();
- if key == "Ctrl-P":
+ elif key == "Ctrl-P":
rotatelist(self.poly)
- if key == "Ctrl-S":
+ elif key == "Ctrl-S":
self.ppv.useStencil = not self.ppv.useStencil
- if key == "Ctrl-L":
+ elif key == "Ctrl-L":
self.ppv.showLinkbuoys = not self.ppv.showLinkbuoys
# Keys to move around
- if key == "Left" or key == "Right" \
+ elif key == "Left" or key == "Right" \
or key == "Up" or key == "Down" \
or key == "Home" or key == "End" \
or key == "Ctrl-HomE" or key == "Ctrl-EnD":
c = self.avc.getAccursed()
if self.avc.getCursorOffset(c) < 0 or c.s(self.d.contains, -1) ==
None:
+ replaceNewScene(self.vs)
return
self.ppv.viewMode = self.ppv.TEXT_EDITING
@@ -254,7 +250,7 @@
self.avc.setCursorOffset(offs + (len(lines[0])+1) \
+ len(lines[1]))
# Keys to edit text
- if len(key) == 1 or key == "Backspace" or \
+ elif len(key) == 1 or key == "Backspace" or \
key == "Delete" or key == "Return":
self.ppv.viewMode = self.ppv.TEXT_EDITING
@@ -263,6 +259,7 @@
self.ppv.showLinkbuoys = 0
if not 32 <= ord(key[0]) <= 254:
+ replaceNewScene(self.vs)
return
c = self.avc.getAccursed()
print "Acc: ",c
@@ -290,6 +287,8 @@
if key == "Delete":
print 'Untested! Doesn\'t check the length'
self.ppactions.deleteText(c.getId(), offs, offs+1)
+ else:
+ replaceNewScene(self.vs)
def scene(self, vs):
m = self.ppv.viewMode