31 |
return |
return |
32 |
|
|
33 |
fen = self.states.fen |
fen = self.states.fen |
34 |
pp = self.states.pp |
pp = self.states.ppActions |
35 |
cur = self.states.cursor |
cur = self.states.cursor |
36 |
acc = cur.getAccursed() |
acc = cur.getAccursed() |
37 |
offs = cur.getCursorOffset() |
offs = cur.getCursorOffset() |
113 |
def __init__(self, fen, pp, spanImageFactory, nodeview): |
def __init__(self, fen, pp, spanImageFactory, nodeview): |
114 |
self.clean() |
self.clean() |
115 |
self.cursor = ff.view.lava.Cursor(fen) |
self.cursor = ff.view.lava.Cursor(fen) |
116 |
self.pp = pp |
self.ppActions = pp |
117 |
self.fen = fen |
self.fen = fen |
118 |
self.spanImageFactory = spanImageFactory |
self.spanImageFactory = spanImageFactory |
119 |
self.nodeview = nodeview |
self.nodeview = nodeview |
175 |
class LinkL(Action): |
class LinkL(Action): |
176 |
def run(self): |
def run(self): |
177 |
obj = self.states.objectOnPlane |
obj = self.states.objectOnPlane |
178 |
pp = self.states.pp |
pp = self.states.ppActions |
179 |
pp.assocNotes(obj, -1, self.states.cursor.getAccursed()) |
pp.assocNotes(obj, -1, self.states.cursor.getAccursed()) |
180 |
class LinkR(Action): |
class LinkR(Action): |
181 |
def run(self): |
def run(self): |
182 |
obj = self.states.objectOnPlane |
obj = self.states.objectOnPlane |
183 |
pp = self.states.pp |
pp = self.states.ppActions |
184 |
pp.assocNotes(obj, 1, self.states.cursor.getAccursed()) |
pp.assocNotes(obj, 1, self.states.cursor.getAccursed()) |
185 |
class UnlinkBuoy(Action): |
class UnlinkBuoy(Action): |
186 |
def run(self): |
def run(self): |
187 |
link = self.states.buoymanager.buoyHit.link |
link = self.states.buoymanager.buoyHit.link |
188 |
#(otherNode, linkId, otherAnchor, into) |
#(otherNode, linkId, otherAnchor, into) |
189 |
if dbg: p('linkid',link[1],'otheranchor',link[2],'othernode',link[0]) |
if dbg: p('linkid',link[1],'otheranchor',link[2],'othernode',link[0]) |
190 |
pp = self.states.pp |
pp = self.states.ppActions |
191 |
a,b = link[1].first, link[1].second |
a,b = link[1].first, link[1].second |
192 |
pp.detachNotes(a, 1, b) |
pp.detachNotes(a, 1, b) |
193 |
pp.detachNotes(a, -1, b) |
pp.detachNotes(a, -1, b) |
196 |
def run(self): |
def run(self): |
197 |
main = self.states.buoymanager.getLastMain() |
main = self.states.buoymanager.getLastMain() |
198 |
if isinstance(main, ff.view.buoy.MainNode2D): |
if isinstance(main, ff.view.buoy.MainNode2D): |
199 |
self.states.pp.deletePaper(main.getPlane()) |
self.states.ppActions.deletePaper(main.getPlane()) |
200 |
elif isinstance(main, ff.view.buoy.FisheyeMainNode2D): |
elif isinstance(main, ff.view.buoy.FisheyeMainNode2D): |
201 |
p('foo fish eye') |
p('foo fish eye') |
202 |
|
|
373 |
self.states.mainMouse)) |
self.states.mainMouse)) |
374 |
return 1 |
return 1 |
375 |
elif key == 'NEW_PAPER': |
elif key == 'NEW_PAPER': |
376 |
paper = self.states.pp.newPaper(); |
paper = self.states.ppActions.newPaper(); |
377 |
buoymanager.replaceManager(0, |
buoymanager.replaceManager(0, |
378 |
ff.view.buoy.MainNode2D(ff.swamp.Nodes.get(paper), |
ff.view.buoy.MainNode2D(ff.swamp.Nodes.get(paper), |
379 |
views.irregu, ff.view.buoy.AbstractMainNode2D.SimpleFocus(0,0),1, |
views.irregu, ff.view.buoy.AbstractMainNode2D.SimpleFocus(0,0),1, |