enaml.widgets.tool_bar
Classes
A widget which displays a row of tool buttons. |
- class enaml.widgets.tool_bar.ToolBar(parent=None, **kwargs)[source]
Bases:
ConstraintsWidget
A widget which displays a row of tool buttons.
A ToolBar is typically used as a child of a MainWindow where it can be dragged and docked in various locations in the same fashion as a DockPane. However, a ToolBar can also be used as the child of a Container and layed out with constraints, though in this case it will lose its ability to be docked.
- button_style
The button style to apply to actions added to the tool bar.
- movable
Whether or not the tool bar is movable by the user. This value only has meaning if the tool bar is the child of a MainWindow.
- floatable
Whether or not the tool bar can be floated as a separate window. This value only has meaning if the tool bar is the child of a MainWindow.
- floating
A boolean indicating whether or not the tool bar is floating. This value only has meaning if the tool bar is the child of a MainWindow.
- dock_area
The dock area in the MainWindow where the tool bar is docked. This value only has meaning if the tool bar is the child of a MainWindow.
- allowed_dock_areas
The areas in the MainWindow where the tool bar can be docked by the user. This value only has meaning if the tool bar is the child of a MainWindow.
- orientation
The orientation of the toolbar. This only has meaning when the toolbar is not a child of a MainWindow and is used as part of a constraints based layout.
- auto_hug
Whether or not to automatically adjust the ‘hug_width’ and ‘hug_height’ values based on the value of ‘orientation’.
- proxy
A reference to the ProxyToolBar object.
- activated
An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.
- background
The background color of the widget.
- destroyed
An event fired when an object has been destroyed. It is triggered once during the object lifetime, just before the object is removed from the tree structure.
- enabled
Whether or not the widget is enabled.
- hug_height
How strongly a widget hugs it’s height hint. This is equivalent to the constraint:
(height == hint) | hug_height
- hug_width
How strongly a widget hugs it’s width hint. This is equivalent to the constraint:
(width == hint) | hug_width
- initialized
An event fired when an object is initialized. It is triggered once during the object lifetime, at the end of the initialize method.
- name
Export the ‘name’ attribute as a declarative member.
- style_class
The style class to which this item belongs. Multiple classes can be separated with whitespace. An empty string indicates the widget does not belong to any style class.