/[fenfire]/fenfire/org/fenfire/fenpdf/actions/mouse.py
ViewVC logotype

Diff of /fenfire/org/fenfire/fenpdf/actions/mouse.py

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

revision 1.5 by tjl, Sat Aug 23 13:25:18 2003 UTC revision 1.6 by tjl, Sat Aug 23 17:13:33 2003 UTC
# Line 41  def defineActions(fenPDF, context): Line 41  def defineActions(fenPDF, context):
41      def getMainNode():      def getMainNode():
42          return context.states.buoymanager.getLastMain()          return context.states.buoymanager.getLastMain()
43      def getOldVS():      def getOldVS():
44          return fenPDF.uistate.lastVs          return fenPDF.animation.lastVs
45    
46  # Inside the action, we have the following symbols usable:  # Inside the action, we have the following symbols usable:
47  #  fenPDF - the main FenPDF object  #  fenPDF - the main FenPDF object
# Line 51  def defineActions(fenPDF, context): Line 51  def defineActions(fenPDF, context):
51    
52  # Note that the default is that the old vobscene is reused.  # Note that the default is that the old vobscene is reused.
53  # If an action needs regeneration, it has to explicitly call for  # If an action needs regeneration, it has to explicitly call for
54  # that by fenPDF.uistate.regenerateVs()  # that by fenPDF.animation.regenerateVs()
55    
56      ######## Actions to control pan of main nodes etc.      ######## Actions to control pan of main nodes etc.
57    
# Line 77  def defineActions(fenPDF, context): Line 77  def defineActions(fenPDF, context):
77              obj = getMainNode().getNodeOnPlane(getOldVS(), x,y)              obj = getMainNode().getNodeOnPlane(getOldVS(), x,y)
78              context.states.cursor.setAccursed(obj)              context.states.cursor.setAccursed(obj)
79              getMainNode().moveToPoint(int(x),int(y), getOldVS())              getMainNode().moveToPoint(int(x),int(y), getOldVS())
80              fenPDF.uistate.regenerateVS()              fenPDF.animation.regenerateVS()
81    
82    
83      class ZoomPan(vob.input.RelativeAxisListener):      class ZoomPan(vob.input.RelativeAxisListener):
# Line 94  def defineActions(fenPDF, context): Line 94  def defineActions(fenPDF, context):
94          def clicked(self, x, y):          def clicked(self, x, y):
95              obj = getMainNode().getNodeOnPlane(getOldVS(), x,y)              obj = getMainNode().getNodeOnPlane(getOldVS(), x,y)
96              context.states.cursor.setAccursed(obj)              context.states.cursor.setAccursed(obj)
97              fenPDF.uistate.regenerateVS()              fenPDF.animation.regenerateVS()
98    
99      class MouseMenu(vob.mouse.MouseClickListener):      class MouseMenu(vob.mouse.MouseClickListener):
100          def clicked(self, x, y):          def clicked(self, x, y):
# Line 103  def defineActions(fenPDF, context): Line 103  def defineActions(fenPDF, context):
103                  context.states.objectOnPlane = obj                  context.states.objectOnPlane = obj
104                  context.mousemenu.link = 1                  context.mousemenu.link = 1
105              else: context.mousemenu.link = 0              else: context.mousemenu.link = 0
106    
107                fenPDF.uistate.menu.originateFromMainNode(getMainNode(), obj)
108    
109              context.mousemenu.showList(x,y,'mainmenu')              context.mousemenu.showList(x,y,'mainmenu')
110              fenPDF.uistate.regenerateVS()              fenPDF.animation.regenerateVS()
111              vob.AbstractUpdateManager.setNoAnimation()              vob.AbstractUpdateManager.setNoAnimation()
112    
113      ####### Actions to control nodes on main node plane      ####### Actions to control nodes on main node plane
# Line 192  def defineActions(fenPDF, context): Line 195  def defineActions(fenPDF, context):
195          def clicked(self, x, y):          def clicked(self, x, y):
196              buoymanager = context.states.buoymanager              buoymanager = context.states.buoymanager
197              p('hit',buoymanager.buoyHit)              p('hit',buoymanager.buoyHit)
198                fenPDF.uistate.menu.originateFromBuoy(buoymanager.buoyHit)
199              context.mousemenu.showList(x,y, 'buoymenu')              context.mousemenu.showList(x,y, 'buoymenu')
200              fenPDF.uistate.regenerateVS()              fenPDF.animation.regenerateVS()
201              vob.AbstractUpdateManager.setNoAnimation()              vob.AbstractUpdateManager.setNoAnimation()
202    
203      class BuoyFollowClick(vob.mouse.MouseClickListener):      class BuoyFollowClick(vob.mouse.MouseClickListener):
# Line 201  def defineActions(fenPDF, context): Line 205  def defineActions(fenPDF, context):
205              buoymanager = context.states.buoymanager              buoymanager = context.states.buoymanager
206              p('hit',buoymanager.buoyHit, buoymanager.buoyHit.single)              p('hit',buoymanager.buoyHit, buoymanager.buoyHit.single)
207              buoymanager.buoyHit.single.followLink(buoymanager.buoyHit.link)              buoymanager.buoyHit.single.followLink(buoymanager.buoyHit.link)
208              fenPDF.uistate.regenerateVS()              fenPDF.animation.regenerateVS()
209    
210      # Return a map of symbols      # Return a map of symbols
211      res = { }      res = { }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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