58 |
def run(rself): |
def run(rself): |
59 |
data.layout.place(vs, paperCS, .05, 100, cull) |
data.layout.place(vs, paperCS, .05, 100, cull) |
60 |
|
|
61 |
vob.gl.Stencil.drawStenciled(vs, ContentR(), None, FrameR(), LayoutR(), 1) |
# vob.gl.Stencil.drawStenciled(vs, ContentR(), None, FrameR(), LayoutR(), 1) |
62 |
|
LayoutR().run() |
63 |
|
|
64 |
|
|
65 |
|
|
66 |
class ScrollblockData: |
class ScrollblockData: |
179 |
|
|
180 |
xywh = self.data.layout.getExtents(anchorSpan, None) |
xywh = self.data.layout.getExtents(anchorSpan, None) |
181 |
|
|
|
#self.fisheye = gzz.view.FisheyeState( |
|
|
# 1.1, .1, 5, 2, 1000 |
|
|
#) |
|
182 |
|
|
183 |
self.fisheye.setCenter(xywh[0] + .5 * xywh[2], |
self.fisheye.setCenter(xywh[0] + .5 * xywh[2], |
184 |
xywh[1] + .5 * xywh[3]) |
xywh[1] + .5 * xywh[3]) |
186 |
def _linkEndCS(self, enf, key): |
def _linkEndCS(self, enf, key): |
187 |
"""Make a coordinate system for the link end and return it. |
"""Make a coordinate system for the link end and return it. |
188 |
""" |
""" |
189 |
for repr in gzz.zzutil.Media.getScrollBlockRepresentatives(enf): |
for repr in alph.util.EnfUtil.getScrollBlockRepresentatives(enf): |
190 |
if repr.getScrollBlock() == self.scrollBlock: |
if repr.getScrollBlock() == self.scrollBlock: |
191 |
xywh = self.data.layout.getExtents(repr, None) |
xywh = self.data.layout.getExtents(repr, None) |
192 |
return self.vs.orthoBoxCS(self.shift, key, -20, |
return self.vs.orthoBoxCS(self.shift, key, -20, |
220 |
.enfiladeOverlap.getMatches(self.enf)) |
.enfiladeOverlap.getMatches(self.enf)) |
221 |
for m in matches: |
for m in matches: |
222 |
enf = m.space.getCellTexter().getEnfilade(m, None) |
enf = m.space.getCellTexter().getEnfilade(m, None) |
223 |
linkId = gzz.util.Pair(m, self.scrollBlock) |
linkId = vob.util.Pair(m, self.scrollBlock) |
224 |
thisEndCS = self._linkEndCS(enf, linkId) |
thisEndCS = self._linkEndCS(enf, linkId) |
225 |
self.listener.link(-1, thisEndCS, |
self.listener.link(-1, thisEndCS, |
226 |
self.nodetype.scrollBlockLinker.cellNodeType, |
self.nodetype.scrollBlockLinker.cellNodeType, |
235 |
myenf = getattr(xulink, thisEndName) |
myenf = getattr(xulink, thisEndName) |
236 |
thisEndCS = self._linkEndCS(myenf, xulink) |
thisEndCS = self._linkEndCS(myenf, xulink) |
237 |
endenf = getattr(xulink, otherEndName) |
endenf = getattr(xulink, otherEndName) |
238 |
for repr in gzz.zzutil.Media.getScrollBlockRepresentatives(endenf): |
for repr in alph.util.EnfUtil.getScrollBlockRepresentatives(endenf): |
239 |
self.listener.link(dir, thisEndCS, |
self.listener.link(dir, thisEndCS, |
240 |
self.nodetype.scrollBlockLinker.xulinkPageSpanNodeType, |
self.nodetype.scrollBlockLinker.xulinkPageSpanNodeType, |
241 |
xulink, repr) |
xulink, repr) |
251 |
if x > self.data.layout.w: x = self.data.layout.w |
if x > self.data.layout.w: x = self.data.layout.w |
252 |
if y > self.data.layout.h: y = self.data.layout.h |
if y > self.data.layout.h: y = self.data.layout.h |
253 |
self.fisheye.setCenter(x, y) |
self.fisheye.setCenter(x, y) |
254 |
gzz.client.AbstractUpdateManager.chg() |
vob.AbstractUpdateManager.chg() |
255 |
self.doReq() |
self.doReq() |
256 |
|
|
257 |
def mouse(self, mouseEvent, oldVS): |
def mouse(self, mouseEvent, oldVS): |
260 |
self.doReq() |
self.doReq() |
261 |
return 1 |
return 1 |
262 |
if mouseEvent.getID() == mouseEvent.MOUSE_CLICKED: |
if mouseEvent.getID() == mouseEvent.MOUSE_CLICKED: |
263 |
# print "MOUSE PSPMAIN ",mouseEvent |
print "MOUSE PSPMAIN ",mouseEvent |
264 |
size[0] = mouseEvent.getX() |
size[0] = mouseEvent.getX() |
265 |
size[1] = mouseEvent.getY() |
size[1] = mouseEvent.getY() |
266 |
size[2] = 0 |
size[2] = 0 |
267 |
tmp = jarray.zeros(3, 'f') |
tmp = jarray.zeros(3, 'f') |
268 |
oldVS.coords.inverseTransformPoints3(self.ctr, size, tmp) |
oldVS.coords.inverseTransformPoints3(self.ctr, size, tmp) |
269 |
# print "Ev - ctr: ",mouseEvent, tmp[0], tmp[1], tmp[2] |
print "Ev - ctr: ",mouseEvent, tmp[0], tmp[1], tmp[2] |
270 |
oldVS.coords.inverseTransformPoints3(self.scale, size, tmp) |
oldVS.coords.inverseTransformPoints3(self.scale, size, tmp) |
271 |
# print "Ev - scale: ",mouseEvent, tmp[0], tmp[1], tmp[2] |
print "Ev - scale: ",mouseEvent, tmp[0], tmp[1], tmp[2] |
272 |
|
|
273 |
oldVS.coords.inverseTransformPoints3(self.shift, size, size) |
oldVS.coords.inverseTransformPoints3(self.shift, size, size) |
274 |
# print "Ev: ",size[0], size[1], size[2] |
print "Ev: ",size[0], size[1], size[2] |
275 |
# print "Self.xy was",self.x,self.y |
# print "Self.xy was",self.x,self.y |
276 |
oldVS.coords.transformPoints3(self.shift, size, tmp) |
oldVS.coords.transformPoints3(self.shift, size, tmp) |
277 |
print "Retransformed:", tmp[0], tmp[1], tmp[2] |
print "Retransformed:", tmp[0], tmp[1], tmp[2] |