gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz gfx/demo/buoyoing.py gzz/modules/pp2/PPCanv...


From: Matti Katila
Subject: [Gzz-commits] gzz gfx/demo/buoyoing.py gzz/modules/pp2/PPCanv...
Date: Sat, 15 Feb 2003 09:01:04 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   03/02/15 09:01:04

Modified files:
        gfx/demo       : buoyoing.py 
        gzz/modules/pp2: PPCanvasCursor.java 

Log message:
        stuff

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/buoyoing.py.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp2/PPCanvasCursor.java.diff?tr1=1.18&tr2=1.19&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/buoyoing.py
diff -u gzz/gfx/demo/buoyoing.py:1.31 gzz/gfx/demo/buoyoing.py:1.32
--- gzz/gfx/demo/buoyoing.py:1.31       Sat Feb 15 05:48:09 2003
+++ gzz/gfx/demo/buoyoing.py    Sat Feb 15 09:01:03 2003
@@ -59,13 +59,14 @@
 w.renderStill(vs, 0)
 
 
-papers = ['urn:urn-5:LpyTF-IpdyXzNrsw3EsW0o05Slrb',
-          'urn:urn-5:Jl9wZ+Y9Y0UjMKEVM1fJ5dQxVFeB',
+papers = ['asdf','urn:urn-5:LpyTF-IpdyXzNrsw3EsW0o05Slrb',
+          'urn:urn-5:hGRPAazpVhoktV4POord6ZoKTsm+',
           'urn:urn-5:7UfI0Sa1Khv1HD05KfxQBGrsNLYt',
           'urn:urn-5:Ozjyv51bS-YEWt3YDcJsP3AyrM02',
           'urn:urn-5:LgsTIYuVpwrJn1rgvVCNIS+fbJCe',
           'urn:urn-5:FO2EBHSeUUAxHRaIoQHe8EcLw6X+',
           'urn:urn-5:cKTtl2-4vXEC-T3gMMDG5f5XEite',
+          'urn:urn-5:Jl9wZ+Y9Y0UjMKEVM1fJ5dQxVFeB',
           'urn:urn-5:8sZTg96TyFprP+E0c1e0mZxoWeAd']
 
 def setPan(cell, x, y):
@@ -81,7 +82,9 @@
     paper.setText('New paper')
     return paper
 
-def addNote(paper, comment, x=50,y=150):
+def addNote(paper, comment, x=0,y=0):
+    x += 50
+    y += 150
     note = paper.h(d.contains,1).N(d.contains)
     note.setText(comment)
     setPan(note, x, y)
@@ -101,17 +104,30 @@
 
     pagescrolls = (
     gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(
-    
#"0000000008000000E9573F43E00004CB42D4BEFEBAA27C20403F7D57693141B9E4D9A46329AC9C")),
+    # ""Digital Library Information Appliances""
     "01A3F5119A280DE2AA5F58B1A9FF1B23F26022B4E0")),
-    #"01E1682758ABF63E7833692653A5DE46EA53A6F8AA")),
+
     gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(
-    
#"0000000008000000E9573F40460004592C0AC2038D1250E0ED08F865D8C9148654B87A7AA82CC6")),
-    #"010DA2A88F8C71B76061AA8F1418C0CC77C3C3200D")),
+    # "Fluid Links for Informed and Incremental Link Transitions"
     "01E941CB556ACB221B3909F6203E1763B7CA9A74B4")),
+
     gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(
-    
#"0000000008000000E9573F38AE000410A88E08C0C3AB6E45E102B9921BBE71DC74E1A7492D70AE")),
     "010D41691A3EC1332F7D7BC81686F80A6D1362EBE9")),
+
+    gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(
+    # "The mind's views of space"
+    "011CA01BE52823106ED33F2C086FF8E7CCF9921A8D")),
+
+    gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(
+    # "A Zooming Web Browser"
+    "015482A47DAA0FFAE5AA3084954C4D26DA9356C2BD")),
+
+    gzz.media.impl.PageImageScroll(None, gzz.mediaserver.Mediaserver.Id(
+    # "Generalized fisheye views"
+    "01F8C8A93BE231D1CAC9C9C9AC79D130246B287298"))
     )
+
+
     pagespans = [scroll.getCurrent() for scroll in pagescrolls]
 
     if 1:
@@ -121,24 +137,56 @@
            ))
 
        xuindexer.add(gzz.index.XuLink(
-           
pagespanNodes.makeEnf(pagespans[2].subSpan(1,2).subArea(0,300,350,300)),
-           
pagespanNodes.makeEnf(pagespans[0].subSpan(2,3).subArea(300,400,300,100)),
+           
pagespanNodes.makeEnf(pagespans[1].subSpan(1,2).subArea(0,300,350,300)),
+           
pagespanNodes.makeEnf(pagespans[0].subSpan(2,3).subArea(300,400,300,200)),
+           ))
+
+       xuindexer.add(gzz.index.XuLink(
+           
pagespanNodes.makeEnf(pagespans[3].subSpan(1,2).subArea(0,300,350,300)),
+           
pagespanNodes.makeEnf(pagespans[0].subSpan(5,6).subArea(300,400,300,200)),
+           ))
+
+       xuindexer.add(gzz.index.XuLink(
+           
pagespanNodes.makeEnf(pagespans[0].subSpan(1,2).subArea(120,400,350,300)),
+           
pagespanNodes.makeEnf(pagespans[4].subSpan(5,6).subArea(300,400,300,200)),
            ))
 
+       xuindexer.add(gzz.index.XuLink(
+           
pagespanNodes.makeEnf(pagespans[5].subSpan(1,2).subArea(0,300,350,300)),
+           
pagespanNodes.makeEnf(pagespans[0].subSpan(5,6).subArea(300,400,300,200)),
+           ))
+
+
+    global linkid1
 
     # try out some notes..
     pg0 = pagescrolls[0]
+
     wholepage = pg0.getCurrent().subSpan(0,1)
     span = wholepage.subArea(50, 50, 400, 150)
     paper = newPaper()
-    global linkid1
-    linkid1 = addTrans(span, paper)
+    addTrans(span, paper)
     addNote(paper, 'Foobar', -30, 50)
 
-    paper2 = newPaper()
-    span = wholepage.subArea(150, 150, 400, 250)
-    addTrans(span, paper2)
-    addNote(paper2, 'BarFoo')
+    paper = newPaper()
+    span = wholepage.subArea(250, 150, 300, 250)
+    addTrans(span, paper)
+    addNote(paper, 'Good looking tablet-PC!')
+    addNote(paper, 'Our project should order one of these', 20, 40)
+
+    paper = newPaper()
+    wholepage = pg0.getCurrent().subSpan(4,5)
+    span = wholepage.subArea(300, 180, 280, 38)
+    linkid1 = addTrans(span, paper)
+    addNote(paper, 'The problem is well explained over here!', 0, -30)
+
+    paper = newPaper()
+    wholepage = pg0.getCurrent().subSpan(3,4)
+    span = wholepage.subArea(100, 500, 283, 39)
+    addTrans(span, paper)
+    addNote(paper, 'This is very important')
+
+
 
     scrollblockLinker.xuIndex = xuindexer
     scrollblockLinker.xulinkPageSpanNodeType = 
pagespanNodes.AnchorPageSpanNodeType(scrollblockLinker)
Index: gzz/gzz/modules/pp2/PPCanvasCursor.java
diff -u gzz/gzz/modules/pp2/PPCanvasCursor.java:1.18 
gzz/gzz/modules/pp2/PPCanvasCursor.java:1.19
--- gzz/gzz/modules/pp2/PPCanvasCursor.java:1.18        Sat Feb 15 05:48:10 2003
+++ gzz/gzz/modules/pp2/PPCanvasCursor.java     Sat Feb 15 09:01:04 2003
@@ -45,7 +45,7 @@
 /** XXX
  */
 public class PPCanvasCursor implements BuoyViewMainNode {
-private static final String rcsid = "$Id: PPCanvasCursor.java,v 1.18 
2003/02/15 10:48:10 mudyc Exp $";  
+private static final String rcsid = "$Id: PPCanvasCursor.java,v 1.19 
2003/02/15 14:01:04 mudyc Exp $";  
     public static boolean dbg = false;
     private static void pa(String s) { 
System.out.println("PPCanvasCursor:"+s); }
 
@@ -187,11 +187,13 @@
     // Mouse press state
     // x, y, buttons
     private int [] m_state = null;
+    private float m_state_zoom = -1;
     public boolean mouse(MouseEvent e, VobScene oldVobScene) {
        pa("mouse e"+e+" pans: "+panx+", "+pany);
 
        if (e.getID() == MouseEvent.MOUSE_PRESSED) {
            m_state = new int[]{ e.getX(), e.getY(), e.getModifiers()};
+           m_state_zoom = zoom;
            return false;
        }
        if (m_state == null) throw new Error("Mouse state not found!");
@@ -216,16 +218,32 @@
            panx = pt[0]; pany = pt[1];
            
            current = current.h(d.contains);   
+           AbstractUpdateManager.chg();
+           return false;
+       }
+
+       if (m_state[2] == e.BUTTON3_MASK) {
+           zoom = m_state_zoom * (float) 
+               Math.exp((m_state[0] - e.getY())/150.0);
+
+           pa("Zoom: " + zoom);
+           AbstractUpdateManager.chg();
+           return false;
        }
+
+
        AbstractUpdateManager.chg();
        return false;
     }
 
 
+    public void setZoom(float z) { zoom = z; }
+
     public void moveTo(float x, float y) {
        panx=x;
        pany=y;
     }
+
 
 }
 




reply via email to

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