Package muntjac :: Package event :: Module action_manager :: Class ActionManager
[hide private]
[frames] | no frames]

Class ActionManager

source code

           object --+    
                    |    
      action.IHandler --+
                        |
       object --+       |
                |       |
action.IContainer --+   |
                    |   |
     action.INotifier --+
                        |
                       ActionManager

Notes:

Empties the keymapper for each repaint to avoid leaks; can cause problems in the future if the client assumes key don't change. (if lazyloading, one must not cache results)

Instance Methods [hide private]
 
__init__(self, viewer=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
requestRepaint(self) source code
 
setViewer(self, viewer) source code
 
addAction(self, action) source code
 
removeAction(self, action) source code
 
addActionHandler(self, actionHandler)
Registers a new action handler for this container
source code
 
removeActionHandler(self, actionHandler)
Removes a previously registered action handler for the contents of this container.
source code
 
removeAllActionHandlers(self) source code
 
paintActions(self, actionTarget, paintTarget) source code
 
handleActions(self, variables, sender) source code
 
getActions(self, target, sender)
Gets the list of actions applicable to this handler.
source code
 
handleAction(self, a, sender, target)
Handles an action for the given target.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
  ownActions
List of action handlers
  actionHandlers
List of action handlers
  actionMapper
Action mapper
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, viewer=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

addAction(self, action)

source code 
Overrides: action.INotifier.addAction

removeAction(self, action)

source code 
Overrides: action.INotifier.removeAction

addActionHandler(self, actionHandler)

source code 

Registers a new action handler for this container

Parameters:
  • actionHandler - the new handler to be added.
Overrides: action.IContainer.addActionHandler
(inherited documentation)

removeActionHandler(self, actionHandler)

source code 

Removes a previously registered action handler for the contents of this container.

Parameters:
  • actionHandler - the handler to be removed.
Overrides: action.IContainer.removeActionHandler
(inherited documentation)

getActions(self, target, sender)

source code 

Gets the list of actions applicable to this handler.

Parameters:
  • target - the target handler to list actions for. For item containers this is the item id.
  • sender - the party that would be sending the actions. Most of this is the action container.
Returns:
the list of Action
Overrides: action.IHandler.getActions
(inherited documentation)

handleAction(self, a, sender, target)

source code 

Handles an action for the given target. The handler method may just discard the action if it's not suitable.

Parameters:
  • a - the action to be handled.
  • sender - the sender of the action. This is most often the action container.
  • target - the target of the action. For item containers this is the item id.
Overrides: action.IHandler.handleAction
(inherited documentation)