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

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

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

revision 1.15 by tjl, Sat Oct 18 06:06:29 2003 UTC revision 1.16 by tjl, Wed Nov 5 10:25:51 2003 UTC
# Line 42  def p(*s): Line 42  def p(*s):
42  # that by fenPDF.animation.regenerateVs()  # that by fenPDF.animation.regenerateVs()
43    
44  class KeyActions:  class KeyActions:
45      def __init__(self, context):      def __init__(self, fenpdf):
46          self.context = context          self.fenPDF = fenpdf
47      def insertChar(self, main, char):      def insertChar(self, main, char):
48          """Insert a character to the accursed node - no creation.          """Insert a character to the accursed node - no creation.
49    
50          If no node is accursed, will do nothing.          If no node is accursed, will do nothing.
51          """          """
52          cur = self.context.states.cursor          cur = self.fenPDF.uistate.cursor
53    
54          acc = cur.getAccursed()          acc = cur.getAccursed()
55    
# Line 67  class KeyActions: Line 67  class KeyActions:
67    
68          If no node is accursed, create a new node at cursor.          If no node is accursed, create a new node at cursor.
69          """          """
70          cur = self.context.states.cursor          cur = self.fenPDF.uistate.cursor
71    
72          if cur.getAccursed() == None:          if cur.getAccursed() == None:
73              node = self.fenPDF.actions.abstract.createNewNode(              node = self.fenPDF.actions.abstract.createNewNode(
# Line 87  class KeyActions: Line 87  class KeyActions:
87          The number n may be positive or negative.          The number n may be positive or negative.
88          If no node is accursed, will do nothing.          If no node is accursed, will do nothing.
89          """          """
90          cur = self.context.states.cursor          cur = self.fenPDF.uistate.cursor
91          acc = cur.getAccursed()          acc = cur.getAccursed()
92          if acc == None: return          if acc == None: return
93    
# Line 102  class KeyActions: Line 102  class KeyActions:
102          self.fenPDF.animation.regenerateVS()          self.fenPDF.animation.regenerateVS()
103    
104      def backspace(self, main):      def backspace(self, main):
105          cur = self.context.states.cursor          cur = self.fenPDF.uistate.cursor
   
106    
107          node = cur.getAccursed()          node = cur.getAccursed()
108          if node == None: return          if node == None: return
# Line 139  class KeyActions: Line 138  class KeyActions:
138          # Graa - this certainly doesn't work XXX          # Graa - this certainly doesn't work XXX
139          # **AND** breaks encapsulation. Was moved          # **AND** breaks encapsulation. Was moved
140          # here from fenpdf10.py, and needs fixing XXX          # here from fenpdf10.py, and needs fixing XXX
141          self.context.states.buoymanager.singles[1].mainNode = ff.view.buoy.MainNode2D(planeHome, irregu, ctrl)          self.fenPDF.views.buoymanager.singles[1].mainNode = ff.view.buoy.MainNode2D(planeHome, irregu, ctrl)
142    
143          self.fenPDF.animation.regenerateVS()          self.fenPDF.animation.regenerateVS()
144    
145      def save(self):      def save(self):
146          self.context.save()          self.fenPDF.actions.global.save()
147          self.fenPDF.animation.regenerateVS()          self.fenPDF.animation.regenerateVS()
148    
149      def exit(self):      def exit(self):

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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