Inherits from
- HasTraits: enthought.traits.has_traits.HasTraits
Attributes
- changed
fixme: We probably need more granular events than this!
changed = Event
- controller
The action controller (if any) used to control how actions are performed.
controller = Instance(ActionController)
- DEFAULT_GROUP
The Id of the default group.
DEFAULT_GROUP = Constant('additions')
- enabled
Is the action manager enabled?
enabled = Bool(True)
- groups
All of the contribution groups in the manager.
groups = Property(List(Group))
- id
The manager's unique identifier (if it has one).
id = Str
- visible
Is the action manager visible?
visible = Bool(True)
Method summary
- __init__(self, *args, **traits)
- append(self, item)
- destroy(self)
- dump(self, indent = '')
- find_group(self, id)
- find_item(self, path)
- insert(self, index, item)
- render_group(self, group, indent = '')
- render_item(self, item, indent = '')
- walk(self, fn)
- walk_group(self, group, fn)
- walk_item(self, item, fn)
Methods
- __init__(self, *args, **traits)
Creates a new menu manager.
- append(self, item)
Append an item to the manager.
See the documentation for 'insert'.
- destroy(self)
Called when the manager is no longer required.
By default this method simply calls 'destroy' on all of the manager's groups.
- dump(self, indent = '')
Render a manager!
- find_group(self, id)
Return the group with the specified Id.
Return None if no such group exists.
- find_item(self, path)
Return the item found at the specified path.
'path' is a '/' separated list of contribution Ids.
Returns None if any component of the path is not found.
- insert(self, index, item)
Insert an item into the manager at the specified index.
The item can be:-
A 'Group' instance.
In which case the group is inserted into the manager's list of groups.
A string.
In which case a 'Group' instance is created with that Id, and then inserted into the manager's list of groups.
An 'ActionManagerItem' instance.
In which case the item is inserted into the manager's default group.
- render_group(self, group, indent = '')
Render a group!
- render_item(self, item, indent = '')
Render an item!
- walk(self, fn)
Walk the manager applying a function at every item.
- walk_group(self, group, fn)
Walk a group applying a function at every item.
- walk_item(self, item, fn)
Walk an item (may be a sub-menu manager remember!).