Page Contents

This Page

Action

class enaml.widgets.action.Action(parent=None, **kwargs)[source]

Bases: enaml.core.messenger.Messenger

A non visible widget used in a ToolBar or Menu.

An Action represents an actionable item in a ToolBar or a Menu. Though an Action itself is a non-visible component, it will be rendered in an appropriate fashion for the location where it is used.

text = None

The text label associate with the action.

tool_tip = None

The tool tip text to use for this action. Typically displayed as a small label when the user hovers over the action.

status_tip = None

The text that is displayed in the status bar when the user hovers over the action.

icon_source = None

The source url for the icon to use for the Action.

checkable = None

Whether or not the action can be checked.

checked = None

Whether or not the action is checked. This value only has meaning if ‘checkable’ is set to True.

enabled = None

Whether or not the item representing the action is enabled.

visible = None

Whether or not the item representing the action is visible.

separator = None

Whether or not the action should be treated as a separator. If this value is True, none of the other values have meaning.

triggered = None

An event fired when the action is triggered by user interaction.

toggled = None

An event fired when a checkable action changes its checked state.

snapshot()[source]

Returns the snapshot dict for the Action.

bind()[source]

Binds the change handlers for the Action.

on_action_triggered(content)[source]

Handle the ‘triggered’ action from the client widget.

on_action_toggled(content)[source]

Handle the ‘toggled’ action from the client widget.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_action.QtAction

class enaml.qt.qt_action.QtAction(object_id, parent, session)[source]

Bases: enaml.qt.qt_object.QtObject

A Qt implementation of an Enaml Action.

create_widget(parent, tree)[source]

Create the underlying QAction object.

create(tree)[source]

Create and initialize the underlying control.

activate()[source]

Activate the action.

on_triggered()[source]

The signal handler for the ‘triggered’ signal.

on_toggled()[source]

The signal handler for the ‘toggled’ signal.

on_action_set_text(content)[source]

Handle the ‘set_text’ action from the Enaml widget.

on_action_set_tool_tip(content)[source]

Handle the ‘set_tool_tip’ action from the Enaml widget.

on_action_set_status_tip(content)[source]

Handle the ‘set_status_tip’ action from the Enaml widget.

on_action_set_icon_source(content)[source]

Handle the ‘set_icon_source’ action from the Enaml widget.

on_action_set_checkable(content)[source]

Handle the ‘set_checkable’ action from the Enaml widget.

on_action_set_checked(content)[source]

Handle the ‘set_checked’ action from the Enaml widget.

on_action_set_enabled(content)[source]

Handle the ‘set_enabled’ action from the Enaml widget.

on_action_set_visible(content)[source]

Handle the ‘set_visible’ action from the Enaml widget.

on_action_set_separator(content)[source]

Handle the ‘set_separator’ action from the Enaml widget.

set_text(text)[source]

Set the text on the underlying control.

set_tool_tip(tool_tip)[source]

Set the tool tip on the underlying control.

set_status_tip(status_tip)[source]

Set the status tip on the underyling control.

set_icon_source(icon_source)[source]

Set the icon source for the action.

set_checkable(checkable)[source]

Set the checkable state on the underlying control.

set_checked(checked)[source]

Set the checked state on the underlying control.

set_enabled(enabled)[source]

Set the enabled state on the underlying control.

set_visible(visible)[source]

Set the visible state on the underlying control.

set_separator(separator)[source]

Set the separator state on the underlying control.

Wx

Inheritance diagram of enaml.wx.wx_action.WxAction

class enaml.wx.wx_action.WxAction(object_id, parent, session)[source]

Bases: enaml.wx.wx_object.WxObject

A Wx implementation of an Enaml Action.

create_widget(parent, tree)[source]

Create the underlying wxAction object.

create(tree)[source]

Create and initialize the underlying control.

on_triggered(event)[source]

The event handler for the EVT_ACTION_TRIGGERED event.

on_toggled(event)[source]

The event handler for the EVT_ACTION_TOGGLED event.

on_action_set_text(content)[source]

Handle the ‘set_text’ action from the Enaml widget.

on_action_set_tool_tip(content)[source]

Handle the ‘set_tool_tip’ action from the Enaml widget.

on_action_set_status_tip(content)[source]

Handle the ‘set_status_tip’ action from the Enaml widget.

on_action_set_checkable(content)[source]

Handle the ‘set_checkable’ action from the Enaml widget.

on_action_set_checked(content)[source]

Handle the ‘set_checked’ action from the Enaml widget.

on_action_set_enabled(content)[source]

Handle the ‘set_enabled’ action from the Enaml widget.

on_action_set_visible(content)[source]

Handle the ‘set_visible’ action from the Enaml widget.

on_action_set_separator(content)[source]

Handle the ‘set_separator’ action from the Enaml widget.

set_text(text)[source]

Set the text on the underlying control.

set_tool_tip(tool_tip)[source]

Set the tool tip on the underlying control.

set_status_tip(status_tip)[source]

Set the status tip on the underyling control.

set_checkable(checkable)[source]

Set the checkable state on the underlying control.

set_checked(checked)[source]

Set the checked state on the underlying control.

set_enabled(enabled)[source]

Set the enabled state on the underlying control.

set_visible(visible)[source]

Set the visible state on the underlying control.

set_separator(separator)[source]

Set the separator state on the underlying control.