Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
idlelib.UndoDelegator.CommandSequence Class Reference
Inheritance diagram for idlelib.UndoDelegator.CommandSequence:
Inheritance graph
[legend]
Collaboration diagram for idlelib.UndoDelegator.CommandSequence:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__
def __len__
def append
def getcmd
def redo
def undo
def bump_depth
def do
def merge
def save_marks
def set_marks

Public Attributes

 cmds
 depth
 marks_before
 marks_after
 index1
 index2
 chars

Static Public Attributes

 tags = None

Detailed Description

Definition at line 300 of file UndoDelegator.py.


Constructor & Destructor Documentation

Definition at line 305 of file UndoDelegator.py.

00305 
00306     def __init__(self):
00307         self.cmds = []
00308         self.depth = 0

Here is the caller graph for this function:


Member Function Documentation

Definition at line 316 of file UndoDelegator.py.

00316 
00317     def __len__(self):
00318         return len(self.cmds)

Reimplemented from idlelib.UndoDelegator.Command.

Definition at line 309 of file UndoDelegator.py.

00309 
00310     def __repr__(self):
00311         s = self.__class__.__name__
00312         strs = []
00313         for cmd in self.cmds:
00314             strs.append("    %r" % (cmd,))
00315         return s + "(\n" + ",\n".join(strs) + "\n)"

Definition at line 319 of file UndoDelegator.py.

00319 
00320     def append(self, cmd):
00321         self.cmds.append(cmd)

Here is the caller graph for this function:

def idlelib.UndoDelegator.CommandSequence.bump_depth (   self,
  incr = 1 
)

Definition at line 335 of file UndoDelegator.py.

00335 
00336     def bump_depth(self, incr=1):
00337         self.depth = self.depth + incr
00338         return self.depth

def idlelib.UndoDelegator.Command.do (   self,
  text 
) [inherited]

Reimplemented in idlelib.UndoDelegator.DeleteCommand, and idlelib.UndoDelegator.InsertCommand.

Definition at line 182 of file UndoDelegator.py.

00182 
00183     def do(self, text):
00184         pass

Definition at line 322 of file UndoDelegator.py.

00322 
00323     def getcmd(self, i):
00324         return self.cmds[i]

def idlelib.UndoDelegator.Command.merge (   self,
  cmd 
) [inherited]

Reimplemented in idlelib.UndoDelegator.InsertCommand.

Definition at line 191 of file UndoDelegator.py.

00191 
00192     def merge(self, cmd):
00193         return 0

def idlelib.UndoDelegator.CommandSequence.redo (   self,
  text 
)

Reimplemented from idlelib.UndoDelegator.Command.

Definition at line 325 of file UndoDelegator.py.

00325 
00326     def redo(self, text):
00327         for cmd in self.cmds:
00328             cmd.redo(text)

def idlelib.UndoDelegator.Command.save_marks (   self,
  text 
) [inherited]

Definition at line 194 of file UndoDelegator.py.

00194 
00195     def save_marks(self, text):
00196         marks = {}
00197         for name in text.mark_names():
00198             if name != "insert" and name != "current":
00199                 marks[name] = text.index(name)
00200         return marks

def idlelib.UndoDelegator.Command.set_marks (   self,
  text,
  marks 
) [inherited]

Definition at line 201 of file UndoDelegator.py.

00201 
00202     def set_marks(self, text, marks):
00203         for name, index in marks.items():
00204             text.mark_set(name, index)
00205 

Here is the caller graph for this function:

def idlelib.UndoDelegator.CommandSequence.undo (   self,
  text 
)

Reimplemented from idlelib.UndoDelegator.Command.

Definition at line 329 of file UndoDelegator.py.

00329 
00330     def undo(self, text):
00331         cmds = self.cmds[:]
00332         cmds.reverse()
00333         for cmd in cmds:
00334             cmd.undo(text)


Member Data Documentation

Definition at line 306 of file UndoDelegator.py.

Definition at line 307 of file UndoDelegator.py.

idlelib.UndoDelegator.Command.tags = None [static, inherited]

Definition at line 164 of file UndoDelegator.py.


The documentation for this class was generated from the following file: