/[gzz]/gzz/gzz/view/buoy/pagespanNodes.py
ViewVC logotype

Diff of /gzz/gzz/view/buoy/pagespanNodes.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by tjl, Tue Feb 11 20:10:12 2003 UTC revision 1.26 by tjl, Wed Feb 12 10:13:03 2003 UTC
# Line 48  class WholePageSpanNodeType(AbstractPage Line 48  class WholePageSpanNodeType(AbstractPage
48          if layout == None:          if layout == None:
49              layout = pscv.getLayout(anchorSpan.getScrollBlock())              layout = pscv.getLayout(anchorSpan.getScrollBlock())
50          # For now, we'll just squish to fit          # For now, we'll just squish to fit
51          layout.placeBoxed(vs, into, .5, 200)          layout.placeBoxed(vs, into, .2, 40)
52    
53          return into          return into
54    
# Line 95  class AnchorPageSpanNodeType(AbstractPag Line 95  class AnchorPageSpanNodeType(AbstractPag
95                  vs.map.put(irregu.content, paperCS, paperLoc)                  vs.map.put(irregu.content, paperCS, paperLoc)
96          class LayoutR(java.lang.Runnable):          class LayoutR(java.lang.Runnable):
97              def run(rself):              def run(rself):
98                  layout.place(vs, paperCS, .5, 200, into)                  layout.place(vs, paperCS, .6, 100, into)
99                    
100          gzz.gfx.gl.Stencil.drawStenciled(vs, ContentR(), None, FrameR(), LayoutR(), 1)          gzz.gfx.gl.Stencil.drawStenciled(vs, ContentR(), None, FrameR(), LayoutR(), 1)
101    
# Line 120  class PageSpanMainNode(BuoyViewMainNode) Line 120  class PageSpanMainNode(BuoyViewMainNode)
120    
121          xywh = self.layout.getExtents(anchorSpan, None)          xywh = self.layout.getExtents(anchorSpan, None)
122    
123          self.x = xywh[0] + .5 * xywh[2]          self.fisheye = gzz.view.FisheyeState(
124          self.y = xywh[1] + .5 * xywh[3]              1.1, .04, 5, 2, 1000
125      def _setShift(self, vs):          )
126          vs.coords.setTranslateParams(self.shift, -self.x, -self.y)  
127            self.fisheye.setCenter(xywh[0] + .5 * xywh[2],
128                                    xywh[1] + .5 * xywh[3])
129    
130      def _linkEndCS(self, enf, key):      def _linkEndCS(self, enf, key):
131          """Make a coordinate system for the link end and return it.          """Make a coordinate system for the link end and return it.
# Line 145  class PageSpanMainNode(BuoyViewMainNode) Line 147  class PageSpanMainNode(BuoyViewMainNode)
147          self.ctr = vs.translateCS(into, "ORIGIN", .5 * size[0],          self.ctr = vs.translateCS(into, "ORIGIN", .5 * size[0],
148                      .5 * size[1])                      .5 * size[1])
149          self.scale = vs.scaleCS(self.ctr, "SCALE", self.scale, self.scale)          self.scale = vs.scaleCS(self.ctr, "SCALE", self.scale, self.scale)
150          self.shift = vs.translateCS(self.scale, "TR", -self.x, -self.y)  
151                                self.shift = self.fisheye.getCoordsys(vs, self.scale, "TR")
152    
153          # XXX This is not right: the distortion          # XXX This is not right: the distortion
154          # should be done here.          # should be done here.
155          self.layout.place(vs, self.shift, 1, 200)          self.layout.place(vs, self.shift, .7, 150)
156    
157          if self.nodetype.scrollBlockLinker.enfiladeOverlap != None:          if self.nodetype.scrollBlockLinker.enfiladeOverlap != None:
158              matches = (self.nodetype.scrollBlockLinker              matches = (self.nodetype.scrollBlockLinker
# Line 178  class PageSpanMainNode(BuoyViewMainNode) Line 180  class PageSpanMainNode(BuoyViewMainNode)
180                                  xulink, repr)                                  xulink, repr)
181    
182      def mouse(self, mouseEvent, oldVS):      def mouse(self, mouseEvent, oldVS):
183            if self.fisheye.event(mouseEvent):
184                self.fisheye.setCoordsysParams()
185                return 1
186          if mouseEvent.getID() == mouseEvent.MOUSE_CLICKED:          if mouseEvent.getID() == mouseEvent.MOUSE_CLICKED:
187              # print "MOUSE PSPMAIN ",mouseEvent              # print "MOUSE PSPMAIN ",mouseEvent
188              size[0] = mouseEvent.getX()              size[0] = mouseEvent.getX()
# Line 194  class PageSpanMainNode(BuoyViewMainNode) Line 199  class PageSpanMainNode(BuoyViewMainNode)
199              # print "Self.xy was",self.x,self.y              # print "Self.xy was",self.x,self.y
200              oldVS.coords.transformPoints3(self.shift, size, tmp)              oldVS.coords.transformPoints3(self.shift, size, tmp)
201              # print "Retransformed:", tmp[0], tmp[1], tmp[2]              # print "Retransformed:", tmp[0], tmp[1], tmp[2]
202              self.x = size[0]              x = size[0]
203              self.y = size[1]              y = size[1]
204              if self.x < 0: self.x = 0              if x < 0: x = 0
205              if self.y < 0: self.y = 0              if y < 0: y = 0
206              if self.x > self.layout.w: self.x = self.layout.w              if x > self.layout.w: x = self.layout.w
207              if self.y > self.layout.h: self.y = self.layout.h              if y > self.layout.h: y = self.layout.h
208              # self.setShift(oldVS)              self.fisheye.setCenter(x, y)
209              gzz.client.AbstractUpdateManager.chg()              gzz.client.AbstractUpdateManager.chg()
210                # self.setShift(oldVS)
211              return 0              return 0
212          return 0          return 0
213      def keystroke(self, key):      def keystroke(self, key):

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26