[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] fenfire/org/fenfire/view/buoy actions.py
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] fenfire/org/fenfire/view/buoy actions.py |
Date: |
Wed, 13 Aug 2003 10:27:53 -0400 |
CVSROOT: /cvsroot/fenfire
Module name: fenfire
Branch:
Changes by: Tuomas J. Lukka <address@hidden> 03/08/13 10:27:53
Modified files:
org/fenfire/view/buoy: actions.py
Log message:
Nomenclature: in python, if there's one instance of some class or
interface that's relevant, it shall be named with the class name decapitalized.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/view/buoy/actions.py.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
Patches:
Index: fenfire/org/fenfire/view/buoy/actions.py
diff -u fenfire/org/fenfire/view/buoy/actions.py:1.12
fenfire/org/fenfire/view/buoy/actions.py:1.13
--- fenfire/org/fenfire/view/buoy/actions.py:1.12 Wed Aug 13 08:33:07 2003
+++ fenfire/org/fenfire/view/buoy/actions.py Wed Aug 13 10:27:53 2003
@@ -34,7 +34,7 @@
def __init__(self, context):
self.context = context
def super(self):
- self.main = self.context.states.buoymanager.getLastMain()
+ self.mainNode = self.context.states.buoymanager.getLastMain()
self.oldVS = self.context.states.buoymanager.getVs()
@@ -46,53 +46,53 @@
# grrr.. pythonism, overloading of own method is sicknes
if y=='foo': return self._changedRelative(x)
self.super()
- f = self.main.getFocus()
+ f = self.mainNode.getFocus()
fX, fY = f.getPanX(), f.getPanY()
f.setPan(fX-x/f.zoom,
fY-y/f.zoom)
- self.main.chgFast(self.oldVS, -1)
+ self.mainNode.chgFast(self.oldVS, -1)
def _changedRelative(self, d):
self.super()
- f = self.main.getFocus()
+ f = self.mainNode.getFocus()
fY = f.getPanY()
f.setPan(0, fY-d/f.zoom)
- self.main.chgFast(self.oldVS, -1)
+ self.mainNode.chgFast(self.oldVS, -1)
class BrowseClick(AbstractAction, vob.mouse.MouseClickListener):
def clicked(self, x, y):
if dbg: p('move pan slow')
self.super()
- obj = self.main.getNodeOnPlane(self.oldVS, x,y)
+ obj = self.mainNode.getNodeOnPlane(self.oldVS, x,y)
self.context.states.cursor.setAccursed(obj)
- self.main.moveToPoint(int(x),int(y), self.oldVS)
+ self.mainNode.moveToPoint(int(x),int(y), self.oldVS)
self.context.states.fastChg = 0
class ZoomPan(vob.input.RelativeAxisListener, AbstractAction):
def changedRelative(self, x):
self.super()
- self.main.changeZoom(x)
- self.main.chgFast(self.oldVS, -1)
+ self.mainNode.changeZoom(x)
+ self.mainNode.chgFast(self.oldVS, -1)
self.context.states.fastChg = 1
class ChangeSize(vob.input.RelativeAxisListener, AbstractAction):
def changedRelative(self, x):
self.super()
- self.main.changeSize(x)
- self.main.chgFast(self.oldVS, -1)
+ self.mainNode.changeSize(x)
+ self.mainNode.chgFast(self.oldVS, -1)
self.context.states.fastChg = 1
class IfSelectNodeOnPlane(AbstractAction, vob.mouse.MouseClickListener):
def clicked(self, x, y):
self.super()
- obj = self.main.getNodeOnPlane(self.oldVS, x,y)
+ obj = self.mainNode.getNodeOnPlane(self.oldVS, x,y)
self.context.states.cursor.setAccursed(obj)
self.context.states.fastChg = 0
class MouseMenu(AbstractAction, vob.mouse.MouseClickListener):
def clicked(self, x, y):
self.super()
- obj = self.main.getNodeOnPlane(self.oldVS, x,y)
+ obj = self.mainNode.getNodeOnPlane(self.oldVS, x,y)
if obj != None:
self.context.states.objectOnPlane = obj
self.context.mousemenu.link = 1
@@ -107,7 +107,7 @@
vob.mouse.MousePressListener):
def pressed(self, x,y):
self.super()
- self.set(self.main.getNodeOnPlane(self.oldVS, x,y))
+ self.set(self.mainNode.getNodeOnPlane(self.oldVS, x,y))
return self
def set(self, node):
self.super()
@@ -115,7 +115,7 @@
self.node, self.pp, self.graph = node, s.ppActions, s.fen.graph
def changedRelative(self, x,y):
self.super()
- f = self.main.getFocus()
+ f = self.mainNode.getFocus()
fX, fY = f.getPanX(), f.getPanY()
f.setPan(fX+x/f.zoom,
fY+y/f.zoom)
@@ -123,13 +123,13 @@
ox = ff.util.RDFUtil.getFloat(g, self.node, CANVAS2D.x)
oy = ff.util.RDFUtil.getFloat(g, self.node, CANVAS2D.y)
self.pp.moveNote(self.node, ox+x/f.zoom, oy+y/f.zoom )
- self.main.chgFast(self.oldVS, -1)
+ self.mainNode.chgFast(self.oldVS, -1)
class LinkClick(AbstractAction, vob.mouse.MouseClickListener):
def clicked(self, x,y):
self.super()
- obj = self.main.getNodeOnPlane(self.oldVS, x,y)
+ obj = self.mainNode.getNodeOnPlane(self.oldVS, x,y)
pp = self.context.states.ppActions
pp.assocNotes(obj, 1, self.context.states.cursor.getAccursed())
self.context.states.fastChg = 0
@@ -144,14 +144,14 @@
return self
def startDrag(self, x,y):
self.super()
- self.oldxy = self.main.getXYHit(self.oldVS, y, y)
+ self.oldxy = self.mainNode.getXYHit(self.oldVS, y, y)
p('old', self.oldxy)
def drag(self, x, y):
- v = ff.util.lava.view.getView(self.main, ff.view.AreaSelectingView2D)
- v.setCurrentPlane(self.main.getPlane())
- xy = self.main.getXYHit(self.oldVS, x,y)
+ v = ff.util.lava.view.getView(self.mainNode,
ff.view.AreaSelectingView2D)
+ v.setCurrentPlane(self.mainNode.getPlane())
+ xy = self.mainNode.getXYHit(self.oldVS, x,y)
v.setArea(self.oldxy[0], self.oldxy[1], xy[0], xy[1])
- self.main.chgFast(self.oldVS, -1)
+ self.mainNode.chgFast(self.oldVS, -1)
self.context.states.fastChg = 1
def endDrag(self, x,y):
self.drag(x,y)
@@ -166,7 +166,7 @@
def pressed(self, x, y):
self.super()
self.context.states.fastChg = 1
- obj = self.main.getNodeOnPlane(self.oldVS, x,y)
+ obj = self.mainNode.getNodeOnPlane(self.oldVS, x,y)
if obj != None and obj == self.context.states.cursor.getAccursed():
p('accursed!')