gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz ./TODO gfx/demo/xupdf.py gfx/libcoords/Coor...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./TODO gfx/demo/xupdf.py gfx/libcoords/Coor...
Date: Fri, 04 Oct 2002 02:54:11 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/10/04 02:54:11

Modified files:
        .              : TODO 
        gfx/demo       : xupdf.py 
        gfx/libcoords  : Coords.cxx 
        gfx/librenderables: renderables.py 
        gzz/client     : Fallback.java 
        gzz/media/impl : PageImageScroll.java 
        gzz/view       : pagespanview.py xubuoy.py 

Log message:
        Demo version. WILL NOT USE CLIENT, SINCE XU LINK SAVING DIDN'T WORK: IT 
ERASED A PREVIOUSLY MADE ONE WHEN SAVING AND GAVE A LOT OF ERROR MESSAGES. 
Benja: if you can fix something about this before 1pm today, would be great.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.239&tr2=1.240&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/xupdf.py.diff?tr1=1.52&tr2=1.53&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcoords/Coords.cxx.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.95&tr2=1.96&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/client/Fallback.java.diff?tr1=1.46&tr2=1.47&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/media/impl/PageImageScroll.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/pagespanview.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/xubuoy.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text

Patches:
Index: gzz/TODO
diff -c gzz/TODO:1.239 gzz/TODO:1.240
*** gzz/TODO:1.239      Thu Oct  3 15:48:29 2002
--- gzz/TODO    Fri Oct  4 02:54:11 2002
***************
*** 54,68 ****
            - a general test that transform() and performGL() do the same thing
        - xupdf
            - review code, suggest cleanups and improvements
-     jvk, tjl:
-       + If performance drags,
-         think about using render-to-texture to speed up papers.
-         We now control the repeating units; rendering one such
-         unit to a relatively high-resolution texture would enable
-         us to use only one pass; rendering it would be quick
-         on the GPU. This way we wouldn't have to worry about
-         number of passes as much. However, this brings
-         caching problems.
      tjl:
        - xupdf: distorted multi-page PDF view with xu links
            - adjustable zoom / distortion area by mouse
--- 54,59 ----
***************
*** 84,107 ****
            - multiple instances of same cell visible as a buoy --> keys?
                - special matcher? or pp/VobKeyer?
                - really USE hierarchical keys
-           + clean up the xupdf.py file
-           + better distortion function
-         - show pagespans in client better
-       + ZZ vanishingview cell size for pagespans and linebroken
-         paragraphs, as well as libpaper backgrounds
        + script the demo, determine in detail all features
          required. [ almost done ]
            - making a connection
                - more than one window
-       + if performance problems, redesign coordsys to allow
-         concatenation, reading only parameters and template
-         compilation of renderables.
-           - statistics of what coordinate systems used inside
-             each other how much ==> which to templatize
-       + fillet implementation handling all connections from a node
-         simultaneously.
-       + redesign mosaics to save memory and allow more internal
-         formats + at the same time, mipmapping improvements
      anybody:
        - if there are problems with performance, edit libcoords to use
          boost::object_pool for making allocations much faster
--- 75,84 ----
***************
*** 144,150 ****
--- 121,149 ----
          file is not zero-length though. [ done? ]
        - clean, rename and document Makefile targets (coordinate with mudyc:
          do we want to use something else instead of make?)
+     jvk, tjl:
+       + If performance drags,
+         think about using render-to-texture to speed up papers.
+         We now control the repeating units; rendering one such
+         unit to a relatively high-resolution texture would enable
+         us to use only one pass; rendering it would be quick
+         on the GPU. This way we wouldn't have to worry about
+         number of passes as much. However, this brings
+         caching problems.
      tjl:
+       + ZZ vanishingview cell size for pagespans and linebroken
+         paragraphs, as well as libpaper backgrounds
+       + if performance problems, redesign coordsys to allow
+         concatenation, reading only parameters and template
+         compilation of renderables.
+           - statistics of what coordinate systems used inside
+             each other how much ==> which to templatize
+       + fillet implementation handling all connections from a node
+         simultaneously.
+       + redesign mosaics to save memory and allow more internal
+         formats + at the same time, mipmapping improvements
+       + clean up the xupdf.py file
+       + better distortion function
        - IndexManager xuindexer semantics fix
        - buoy and nadir fixing
            - implement as a new coordinate system type!
***************
*** 188,195 ****
--- 187,196 ----
          these.
        + porting: make sure all demos etc. work with plain mesa
      benja:
+         - show pagespans in client better
          - Fix AWT client.
      anybody:
+       - proper icons and names for the windows
        - fix text quality on OpenGL: enabling __GL_FSAA_MODE=4 on
          NV17 (GeForce4Go) improves "make glinfo" appearance
          dramatically. This would happen by making the mipmaps
***************
*** 440,445 ****
--- 441,450 ----
  RESEARCH:
  
  tjl:
+     - scaling of focus+context links:
+        1 / AREA^(1/3)
+        1 / AREA^(1/4)
+        ???
      - blobs
        - Create "standard sphere" using evolver script.
        - join two / three spheres, stretch.
Index: gzz/gfx/demo/xupdf.py
diff -c gzz/gfx/demo/xupdf.py:1.52 gzz/gfx/demo/xupdf.py:1.53
*** gzz/gfx/demo/xupdf.py:1.52  Thu Oct  3 14:31:32 2002
--- gzz/gfx/demo/xupdf.py       Fri Oct  4 02:54:11 2002
***************
*** 55,67 ****
  
  
  xuindexer.add(XuLink(
!     enfMaker.makeEnfilade(pagespans[0].subSpan(1,2).subArea(0,100,400,100)),
      enfMaker.makeEnfilade(pagespans[1].subSpan(2,3).subArea(20,500,350,200))
      ))
  
  xuindexer.add(XuLink(
!     enfMaker.makeEnfilade(pagespans[0].subSpan(2,3).subArea(0,100,400,100)),
!     enfMaker.makeEnfilade(pagespans[2].subSpan(1,2).subArea(0,300,350,300))
      ))
  
  cells = []
--- 55,67 ----
  
  
  xuindexer.add(XuLink(
!     enfMaker.makeEnfilade(pagespans[0].subSpan(1,2).subArea(0,50,400,200)),
      enfMaker.makeEnfilade(pagespans[1].subSpan(2,3).subArea(20,500,350,200))
      ))
  
  xuindexer.add(XuLink(
!     enfMaker.makeEnfilade(pagespans[2].subSpan(1,2).subArea(0,300,350,300)),
!     enfMaker.makeEnfilade(pagespans[0].subSpan(2,3).subArea(300,400,300,100)),
      ))
  
  cells = []
Index: gzz/gfx/libcoords/Coords.cxx
diff -c gzz/gfx/libcoords/Coords.cxx:1.30 gzz/gfx/libcoords/Coords.cxx:1.31
*** gzz/gfx/libcoords/Coords.cxx:1.30   Thu Oct  3 12:50:30 2002
--- gzz/gfx/libcoords/Coords.cxx        Fri Oct  4 02:54:11 2002
***************
*** 502,512 ****
        bool performGL() { return false; }
  
        float nonlinearity(const ZPt &p, float radius) { 
            float wh = 0.5*(w+h);
            float dist = hypot((p.x-x)/w, (p.y-y)/h) - radius/wh;
-           if(dist < 0) dist = 0;
            if(!finite(dist)) return 1;
!           return 1 + 10 / (dist + 1);
        }
      };
  
--- 502,519 ----
        bool performGL() { return false; }
  
        float nonlinearity(const ZPt &p, float radius) { 
+           float magfact = 10 * (mmax/mmin-1);
+           float clampmagfact = magfact > 1 ? 1 : magfact;
+ 
            float wh = 0.5*(w+h);
            float dist = hypot((p.x-x)/w, (p.y-y)/h) - radius/wh;
            if(!finite(dist)) return 1;
!           if(dist < 0) dist = 0;
! 
!           float nonl_at_zero = clampmagfact * 12;
! 
!           float half_dist = 1.5;
!           return nonl_at_zero * half_dist / (dist + half_dist);
        }
      };
  
Index: gzz/gfx/librenderables/renderables.py
diff -c gzz/gfx/librenderables/renderables.py:1.95 
gzz/gfx/librenderables/renderables.py:1.96
*** gzz/gfx/librenderables/renderables.py:1.95  Thu Oct  3 14:13:32 2002
--- gzz/gfx/librenderables/renderables.py       Fri Oct  4 02:54:11 2002
***************
*** 378,384 ****
            GLERR
  
            ZPt ctr = ZPt(lerp(x0, x1, 0.5), lerp(y0, y1, 0.5), 0);
!           double len = hypot(x1-x0, y1-y0);
            double nonl = coords1.nonlinearity(ctr, len);
            
            int dice = (int)(len * nonl * dicefactor) + 2;
--- 378,384 ----
            GLERR
  
            ZPt ctr = ZPt(lerp(x0, x1, 0.5), lerp(y0, y1, 0.5), 0);
!           double len = hypot(x1-x0, y1-y0) / 2;
            double nonl = coords1.nonlinearity(ctr, len);
            
            int dice = (int)(len * nonl * dicefactor) + 2;
***************
*** 539,545 ****
            GLERR
  
            ZPt ctr = ZPt(lerp(x0, x1, 0.5), lerp(y0, y1, 0.5), 0);
!           double len = hypot(x1-x0, y1-y0);
            double nonl = coords1.nonlinearity(ctr, len);
            
            int dice = (int)(len * nonl * dicefactor) + 2;
--- 539,545 ----
            GLERR
  
            ZPt ctr = ZPt(lerp(x0, x1, 0.5), lerp(y0, y1, 0.5), 0);
!           double len = hypot(x1-x0, y1-y0) / 2;
            double nonl = coords1.nonlinearity(ctr, len);
            
            int dice = (int)(len * nonl * dicefactor) + 2;
***************
*** 849,856 ****
          float wtbl[] = { 1, 1, 1, 1, w, w, w, w };
  
          ZPt ctr = coords2.transform(ZPt(0,0,0));
!         double radius = (coords2.transform(ZPt(1,1,0)) - ZPt(0,0,0)).length();
!         double nonl = dicefactor * coords1.nonlinearity(ctr, radius);
  
          int diceb = (int)fabs(2 * border * sqrt(2) * nonl) + 1;
          int dicex = (int)fabs(2 * border * (1 / bx - 2) * nonl) + 1;
--- 849,866 ----
          float wtbl[] = { 1, 1, 1, 1, w, w, w, w };
  
          ZPt ctr = coords2.transform(ZPt(0,0,0));
!         double r1 = (coords2.transform(ZPt(1,1,0)) - ctr).length();
!         double r2 = (coords2.transform(ZPt(1,0,0)) - ctr).length();
!         double r3 = (coords2.transform(ZPt(0,1,0)) - ctr).length();
!         double r4 = (coords2.transform(ZPt(-1,0,0)) - ctr).length();
!         double r5 = (coords2.transform(ZPt(0,-1,0)) - ctr).length();
! 
!       double r = r1;
!       if(r < r2) r = r2;
!       if(r < r3) r = r3;
!       if(r < r4) r = r4;
!       if(r < r5) r = r5;
!         double nonl = dicefactor * coords1.nonlinearity(ctr, r);
  
          int diceb = (int)fabs(2 * border * sqrt(2) * nonl) + 1;
          int dicex = (int)fabs(2 * border * (1 / bx - 2) * nonl) + 1;
Index: gzz/gzz/client/Fallback.java
diff -c gzz/gzz/client/Fallback.java:1.46 gzz/gzz/client/Fallback.java:1.47
*** gzz/gzz/client/Fallback.java:1.46   Thu Oct  3 07:53:48 2002
--- gzz/gzz/client/Fallback.java        Fri Oct  4 02:54:11 2002
***************
*** 73,79 ****
   * It implements a subset of the 0.6.0 bindings.
   */
  public class Fallback {
! public static final String rcsid = "$Id: Fallback.java,v 1.46 2002/10/03 
11:53:48 benja Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
--- 73,79 ----
   * It implements a subset of the 0.6.0 bindings.
   */
  public class Fallback {
! public static final String rcsid = "$Id: Fallback.java,v 1.47 2002/10/04 
06:54:11 tjl Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
***************
*** 212,217 ****
--- 212,223 ----
              textCursor++;
            AbstractUpdateManager.prioritize(this.screen);
        }
+ 
+       public void prioritize() {
+           AbstractUpdateManager.prioritize(this.screen);
+       }
+ 
+ 
  
        public void moveTextCursor(int dir) {
              if(dbg) pa("Moving in text edit mode. "+dir);
Index: gzz/gzz/media/impl/PageImageScroll.java
diff -c gzz/gzz/media/impl/PageImageScroll.java:1.10 
gzz/gzz/media/impl/PageImageScroll.java:1.11
*** gzz/gzz/media/impl/PageImageScroll.java:1.10        Wed Oct  2 09:24:16 2002
--- gzz/gzz/media/impl/PageImageScroll.java     Fri Oct  4 02:54:11 2002
***************
*** 38,44 ****
  
  public class PageImageScroll
         implements ScrollBlockManager.MediaserverScrollBlock {
! String rcsid = "$Id: PageImageScroll.java,v 1.10 2002/10/02 13:24:16 tjl Exp 
$";
      public static boolean dbg = true;
      final static void p(String s) { if(dbg) System.out.println(s); }
      final static void pa(String s) { System.out.println(s); }
--- 38,44 ----
  
  public class PageImageScroll
         implements ScrollBlockManager.MediaserverScrollBlock {
! String rcsid = "$Id: PageImageScroll.java,v 1.11 2002/10/04 06:54:11 tjl Exp 
$";
      public static boolean dbg = true;
      final static void p(String s) { if(dbg) System.out.println(s); }
      final static void pa(String s) { System.out.println(s); }
***************
*** 48,54 ****
  
      /** Resolution of the images to use.
       */
!     int RESOLUTION=25; // sigh
  
      String DIR="../mstmpimg/"; // XXX Non-platform-independent!
  
--- 48,54 ----
  
      /** Resolution of the images to use.
       */
!     int RESOLUTION=85; // sigh
  
      String DIR="../mstmpimg/"; // XXX Non-platform-independent!
  
Index: gzz/gzz/view/pagespanview.py
diff -c gzz/gzz/view/pagespanview.py:1.12 gzz/gzz/view/pagespanview.py:1.13
*** gzz/gzz/view/pagespanview.py:1.12   Thu Oct  3 14:16:42 2002
--- gzz/gzz/view/pagespanview.py        Fri Oct  4 02:54:11 2002
***************
*** 13,19 ****
  
  # Module pagespanview
  
! globalseedoffs = 0
  globalLOD = 0
  
  
--- 13,19 ----
  
  # Module pagespanview
  
! globalseedoffs = -9
  globalLOD = 0
  
  
***************
*** 87,92 ****
--- 87,94 ----
            TexParameter TEXTURE_2D TEXTURE_WRAP_T REPEAT
            TexParameter TEXTURE_2D TEXTURE_MIN_FILTER LINEAR_MIPMAP_LINEAR
            TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
+           TexParameter TEXTURE_2D TEXTURE_MAX_ANISOTROPY_EXT 10
+           
        """ % locals())
  
        ppass.setTeardowncode("""PopAttrib""")
***************
*** 100,122 ****
      papo = mpap(nvcode.combinercode("""
        Enable REGISTER_COMBINERS_NV
        CombinerParameterNV NUM_GENERAL_COMBINERS_NV 1
!       FCI A TEXTURE0 UNSIGNED_INVERT_NV RGB
        FCI B ZERO UNSIGNED_INVERT_NV RGB
        FCI C ZERO UNSIGNED_IDENTITY_NV RGB
        FCI D ZERO UNSIGNED_IDENTITY_NV RGB
        FCI G ZERO UNSIGNED_IDENTITY_NV ALPHA
!       BlendFunc ONE ONE_MINUS_SRC_COLOR
        BlendEquation FUNC_REVERSE_SUBTRACT
      """), pap = background.clone())
      return (papw, pw, ph, papo)
  
  
  class CellPDFView:
!     dicefactor = 1.0
      """A view of a PDF file in a cell, spread out in space.
      """
      def __init__(self, cell):
!         self.white = GLCache.getCallList("Color 1 1 1")
          self.black = GLCache.getCallList("Color 0 0 0")
        self.cell = cell
        self.content = cell.space.cellTexter.getEnfilade(cell, None)
--- 102,130 ----
      papo = mpap(nvcode.combinercode("""
        Enable REGISTER_COMBINERS_NV
        CombinerParameterNV NUM_GENERAL_COMBINERS_NV 1
! 
!       CI0 RGB A TEXTURE0 EXPAND_NEGATE_NV RGB
!       CI0 RGB B ZERO UNSIGNED_INVERT_NV RGB
!       CI0 RGB C ZERO UNSIGNED_INVERT_NV RGB
!       CI0 RGB D ZERO UNSIGNED_INVERT_NV RGB
!       CO0 RGB DISCARD_NV DISCARD_NV SPARE0_NV NONE NONE FALSE FALSE FALSE
!       FCI A SPARE0_NV UNSIGNED_IDENTITY_NV RGB
        FCI B ZERO UNSIGNED_INVERT_NV RGB
        FCI C ZERO UNSIGNED_IDENTITY_NV RGB
        FCI D ZERO UNSIGNED_IDENTITY_NV RGB
        FCI G ZERO UNSIGNED_IDENTITY_NV ALPHA
!       BlendFunc ONE ONE
        BlendEquation FUNC_REVERSE_SUBTRACT
      """), pap = background.clone())
      return (papw, pw, ph, papo)
  
  
  class CellPDFView:
!     dicefactor = 3.0
      """A view of a PDF file in a cell, spread out in space.
      """
      def __init__(self, cell):
!         self.contentcolor = GLCache.getCallList("Color 0.1 0 0")
          self.black = GLCache.getCallList("Color 0 0 0")
        self.cell = cell
        self.content = cell.space.cellTexter.getEnfilade(cell, None)
***************
*** 216,232 ****
                    vs.map.put(self.irregu.frame, cs1into, irr)
            class ContentR(java.lang.Runnable):
                def run(rself):
!                   vs.map.put(self.white)
                    vs.map.put(self.irregu.content, cs1into, irr)
  
            if showTessel:
                vs.map.put(GLCache.getCallList("""
!                   PushAttrib POLYGON_BIT
                    PolygonMode FRONT_AND_BACK LINE
                    LineWidth 1
                """))
                ContentR().run()
!               FrameR().run()
                pp.run()
                vs.map.put(GLCache.getCallList("""
                    PopAttrib
--- 224,241 ----
                    vs.map.put(self.irregu.frame, cs1into, irr)
            class ContentR(java.lang.Runnable):
                def run(rself):
!                   vs.map.put(self.contentcolor)
                    vs.map.put(self.irregu.content, cs1into, irr)
  
            if showTessel:
                vs.map.put(GLCache.getCallList("""
!                   PushAttrib POLYGON_BIT LINE_BIT ENABLE_BIT DEPTH_BUFFER_BIT
                    PolygonMode FRONT_AND_BACK LINE
                    LineWidth 1
+                   Disable DEPTH_TEST
                """))
                ContentR().run()
!               # FrameR().run() Too much mess
                pp.run()
                vs.map.put(GLCache.getCallList("""
                    PopAttrib
Index: gzz/gzz/view/xubuoy.py
diff -c gzz/gzz/view/xubuoy.py:1.22 gzz/gzz/view/xubuoy.py:1.23
*** gzz/gzz/view/xubuoy.py:1.22 Thu Oct  3 15:48:29 2002
--- gzz/gzz/view/xubuoy.py      Fri Oct  4 02:54:11 2002
***************
*** 22,27 ****
--- 22,31 ----
  import gzz
  import traceback
  
+ # Slow animation for the demo.
+ AbstractUpdateManager.defaultAnimationTime = 3000
+ AbstractUpdateManager.fractCalc = AbstractUpdateManager.LinearCalculator()
+ 
  screensize = (1024, 768) # assuming XGA projector.
  
  # center = little above physical center
***************
*** 239,247 ****
        self.__dict__ = args
          
  def rotatelist(list):
!     x = list[-1]
!     del list[-1]
!     list.insert(0, x)
      
  def ispdf(cell):
      # xxx
--- 243,249 ----
        self.__dict__ = args
          
  def rotatelist(list):
!     list.append(list.pop(0))
      
  def ispdf(cell):
      # xxx
***************
*** 277,283 ****
        self.ctrx = screensize[0]/2
        self.ctry = screensize[1]/2
  
!       self.rad = screensize[0] /  2
  
        self.nadir = NadirAngler(self.ctrx, screensize[1]*2)
        self.clip = 0
--- 279,285 ----
        self.ctrx = screensize[0]/2
        self.ctry = screensize[1]/2
  
!       self.rad = screensize[0] * 5/11  
  
        self.nadir = NadirAngler(self.ctrx, screensize[1]*2)
        self.clip = 0
***************
*** 287,297 ****
          
      def key(self, key):
        global currentScene
!         fallback = self.win.getFallback()
!         if fallback.mode != fallback.NORMAL: return 1
          
        if key == 'M':
            rotatelist(self.modes)
          elif key == 'm':
              if not self.corner1: return
              print "Mark: %s; %s" % (self.corner1, self.corner2)
--- 289,301 ----
          
      def key(self, key):
        global currentScene
!       if self.win:
!           fallback = self.win.getFallback()
!           if fallback.mode != fallback.NORMAL: return 1
          
        if key == 'M':
            rotatelist(self.modes)
+           AbstractUpdateManager.chg()
          elif key == 'm':
              if not self.corner1: return
              print "Mark: %s; %s" % (self.corner1, self.corner2)
***************
*** 318,337 ****
--- 322,351 ----
              AbstractUpdateManager.chg()
        elif key == 'c':
            self.clip = not self.clip
+           AbstractUpdateManager.chg()
        elif key == 'l':
            pagespanview.globalLOD = 1 - pagespanview.globalLOD
            print "Lod: ",pagespanview.globalLOD
+           AbstractUpdateManager.setNoAnimation()
            AbstractUpdateManager.chg()
        elif key == 'p':
            self.usefancypaper = not self.usefancypaper
+           AbstractUpdateManager.setNoAnimation()
+           AbstractUpdateManager.chg()
        elif key == ',':
            pagespanview.globalseedoffs -= 1
+           AbstractUpdateManager.setNoAnimation()
+           AbstractUpdateManager.chg()
            self.moveToCell(self.cursor)
        elif key == '.':
            pagespanview.globalseedoffs += 1
+           AbstractUpdateManager.setNoAnimation()
+           AbstractUpdateManager.chg()
            self.moveToCell(self.cursor)
        elif key == 't':
            self.showtessel = not self.showtessel
+           AbstractUpdateManager.setNoAnimation()
+           AbstractUpdateManager.chg()
          elif key == 's':
              # select some rect at random
              # for testing w/o mouse :-)
***************
*** 387,397 ****
--- 401,416 ----
                h = b.hit(self.currentvs.coords, point)
                if h:
                    print "BUOY HIT!\n"
+                   global globalx, globaly
+                   globalx, globaly = h[0], h[1]
+                   if self.win:
+                       self.win.cursor = b.cell
                    self.moveToCell(b.cell, h[0], h[1], redraw=1)
                    AbstractUpdateManager.chg()
                    return
            h = self.view.hitClip(self.currentvs.coords, point, None)
            if h:
+               print "Move to ",globalx, globaly
                globalx,globaly = h
            else:
                print "Didn't hit anything"
***************
*** 437,443 ****
                replaceNewScene(self.currentvs)
  
  
!     def moveToCell(self, cell, nx=1, ny=1, redraw=1):
        global globalx, globaly
        global globalforw, globalback
  
--- 456,462 ----
                replaceNewScene(self.currentvs)
  
  
!     def moveToCell(self, cell, nx=None, ny=None, redraw=1):
        global globalx, globaly
        global globalforw, globalback
  
***************
*** 448,454 ****
              self.view = None
  
        self.cursor = cell
!       globalx, globaly = nx, ny
  
        content = cell.space.cellTexter.getEnfilade(cell, None)
        self.span = enf2span(content)
--- 467,474 ----
              self.view = None
  
        self.cursor = cell
!       if nx != None:
!           globalx, globaly = nx, ny
  
        content = cell.space.cellTexter.getEnfilade(cell, None)
        self.span = enf2span(content)
***************
*** 568,575 ****
--- 588,597 ----
  
      def windowClosed(self, win): pass
      def mouse(self, ev, win):
+       win.prioritize()
        self._getview(win).mouse(ev)
      def keystroke(self, key, win):
+       win.prioritize()
        if self._getview(win).key(key): 
              # event not handled
              win.getFallback().binder.keystroke(key, win)




reply via email to

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