Inherits from
- Widget: enthought.pyface.widget.Widget
Attributes
- button_size
button_size = Tuple((25, 25), Int, Int)
- button_tool_map
Maps a button id to its tool id.
button_tool_map = Dict
- id_tool_map
id_tool_map = Dict
- is_realized
is_realized = Bool(False)
- tool_id_to_button_map
tool_id_to_button_map = Dict
- tool_listeners
tool_listeners = Dict
- tools
tools = List
Method summary
- __init__(self, parent, **traits)
- add_tool(self, label, bmp, kind, tooltip, longtip)
- enable_tool(self, id, enabled)
- get_tool_state(self, id)
- on_tool_event(self, id, callback)
- realize(self)
- toggle_tool(self, id, checked)
Methods
- __init__(self, parent, **traits)
Creates a new tool palette.
- add_tool(self, label, bmp, kind, tooltip, longtip)
Add a tool with the specified properties to the palette.
Return an id that can be used to reference this tool in the future.
- enable_tool(self, id, enabled)
Enable or disable the tool identified by 'id'.
- get_tool_state(self, id)
Get the toggle state of the tool identified by 'id'.
- on_tool_event(self, id, callback)
Register a callback for events on the tool identified by 'id'.
- realize(self)
Realize the control so that it can be displayed.
- toggle_tool(self, id, checked)
Toggle the tool identified by 'id' to the 'checked' state.
If the button is a toggle or radio button, the button will be checked if the 'checked' parameter is True; unchecked otherwise. If the button is a standard button, this method is a NOP.