Package Pmv :: Module interactiveCommands :: Class MVBindCmdToKey
[hide private]
[frames] | no frames]

Class MVBindCmdToKey

source code

ViewerFramework.VFCommand.Command --+    
                                    |    
                  mvCommand.MVCommand --+
                                        |
                                       MVBindCmdToKey

Instance Methods [hide private]
  __init__(self, func=None)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  processRelease_cb(self, event)
  setupUndoBefore(self, key, modifier, cmd, args, kw)
This method builds the self.undoCmds string.
  doit(self, key, modifier, cmd, args=(), kw={})
virtual method.
  __call__(self, key, modifier, cmd, args=(), kwa={}, **kw)
None <- bindCmdToKey(key, modifier, cmd, args=(), kwa={}, **kw) key: name of the key modifier: name of the modifier ('Shift_L', 'Control_L', 'Alt_L' ...) cmd: name of the command which wanted to be bound to the key

Inherited from mvCommand.MVCommand: guiCallback, strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildFormDescr, buildLogArgList, checkDependencies, cleanup, customizeGUI, doitWrapper, getArguments, getHelp, getLastUsedValues, getLogArgs, getValNamedArgs, log, logString, onAddNewCmd, onCmdRun, setLastUsedValues, setupUndoAfter, showForm, tkCb, updateGeom, warningMsg


Class Variables [hide private]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

__init__(self, func=None)
(Constructor)

source code 
None
Overrides: mvCommand.MVCommand.__init__

onAddCmdToViewer(self)

source code 
method called when an instance of this command is added to the viewer. This enable viewer-addition time initializations
Overrides: ViewerFramework.VFCommand.Command.onAddCmdToViewer
(inherited documentation)

processRelease_cb(self, event)

source code 
None

setupUndoBefore(self, key, modifier, cmd, args, kw)

source code 
This method builds the self.undoCmds string. This method should have the same signature than the __call__. When this string is executed it should undo the actions of this command. This string will be appended to the undoCmdStack list if the command is successfuly carried out. This method handles only commands with the negateKw. Other commands have to overwrite it.
Overrides: ViewerFramework.VFCommand.Command.setupUndoBefore
(inherited documentation)

doit(self, key, modifier, cmd, args=(), kw={})

source code 
virtual method. Has to be implemented by the sub classes
Overrides: ViewerFramework.VFCommand.Command.doit
(inherited documentation)

__call__(self, key, modifier, cmd, args=(), kwa={}, **kw)
(Call operator)

source code 
None <- bindCmdToKey(key, modifier, cmd, args=(), kwa={}, **kw) key: name of the key modifier: name of the modifier ('Shift_L', 'Control_L', 'Alt_L' ...) cmd: name of the command which wanted to be bound to the key
Overrides: ViewerFramework.VFCommand.Command.__call__