Manages the actions in a project.
Clients can register for events related to the actions. The events supported by the listener interface are:
def action_added(self, action): def action_moved(self, action): def action_removed(self, action): def channel_added(self, source, dest): def channel_removed(self, source, dest):
Operations Summary: | |
__init__(self, project) Constructor [Source] | |
actions(self) Returns the list of actions in this project Actions. [Source] | |
get_action(self, name) Returns the Action object by name. [Source] | |
add_listener(self, l) Adds a listener to this Projec Actions' events. [Source] | |
__fire(self, signal, *args) Fires the given event to all listeners [Source] | |
add_action(self, action) Adds the given action to this project [Source] | |
move_action(self, action, x, y) Moves the given action to the given screen coordinates [Source] | |
move_action_by(self, action, dx, dy) Moves the given action by the given screen delta-coordinates [Source] | |
remove_action(self, action) Removes the given action, and destroys all channels to/from it [Source] | |
rename_action(self, action, newname) Renames the given action to the given name [Source] | |
add_channel(self, source, dest) Adds a "channel" between two actions. [Source] | |
remove_channel(self, source, dest) Removes a "channel" between two actions. [Source] | |
action_changed(self, action) Indicates that the given action has changed, so that listeners can update themselves [Source] | |
check_name(self, action) Checks the name, and renames if necessary [Source] | |
is_valid_channel(self, source, dest) Returns true if the given source-dest pair would form a valid channel. [Source] |
Operation Details: |
Returns the list of actions in this project Actions. The list returned should be considered read-only
Returns the Action object by name. This method uses a dictionary lookup so should be preferred to iteration. Returns None if the name is not found.
Adds a listener to this Projec Actions' events. The listener may implement any of the supported methods and will receive those events.
Adds a "channel" between two actions. Causes the output of the first to be connected to the input of the second. The event 'channel_added' is fired.
Removes a "channel" between two actions. If the channel doesn't exist, it is silently ignored. The event 'channel_removed' is fired.
Returns true if the given source-dest pair would form a valid channel. Invalid pairs (eg: formatter->formatter) return false. Cyclic channels are also disallowed.