Used to create menu entries, keyboard shortcuts and/or toolbar buttons.
More...
Used to create menu entries, keyboard shortcuts and/or toolbar buttons.
Definition at line 176 of file actioninfo.py.
◆ __init__()
| def robotide.action.actioninfo.ActionInfo.__init__ |
( |
|
self, |
|
|
|
menu_name, |
|
|
|
name, |
|
|
|
action = None, |
|
|
|
container = None, |
|
|
|
shortcut = None, |
|
|
|
icon = None, |
|
|
|
doc = '', |
|
|
|
position = -1 |
|
) |
| |
Initializes information needed to create actions.
:Parameters:
menu_name
The name of the menu where the new entry will be added. The menu is
created if it does not exist.
name
The name of the new menu entry. The name may contain an accelerator
key prefixed by an ampersand like ``New &Action``. If an accelerator
is not specified, or the one requested is already taken, the next
free key is selected.
action
The callable which will be called when a user does any of the
associated UI actions.
container
The wxPython element containing the UI components associated with
the ``action``. When any of the registered UI actions is executed,
the ``action`` is called only if the ``container`` or any of its
child components has focus. It is possible to make the ``action``
always active by using ``None`` as the ``container``.
shortcut
The keyboard shortcut associated to the ``action``. The ``shortcut``
must be a string constructed from optional modifiers (``Ctrl, Shift,
Alt``) and the actual shortcut key separating the parts with a hyphen.
The shortcut key can be either a single character or any of the
`wx keycodes`__ without the ``WXK_`` prefix. Examples: ``Ctrl-C``,
``Shift-Ctrl-6``, ``Alt-Left``, ``F6``.
icon
The icon added to the toolbar as a toolbar button. It can be either
a 16x16 bitmap or a string presenting one of the icons provided by
`wxPython's ArtProvider`__ like ``ART_FILE_OPEN``.
doc
The documentation shown on the statusbar when selection is on
the associated menu entry or toolbar button.
position
The positional value of an item in the menu. Provided for ordering
Tools menu. Defaults to -1.
__ http://docs.wxwidgets.org/stable/wx_keycodes.html#keycodes
__ http://www.wxpython.org/docs/api/wx.ArtProvider-class.html
Definition at line 219 of file actioninfo.py.
◆ _get_icon()
| def robotide.action.actioninfo.ActionInfo._get_icon |
( |
|
self | ) |
|
|
private |
◆ icon()
| def robotide.action.actioninfo.ActionInfo.icon |
( |
|
self | ) |
|
|
private |
◆ position()
| def robotide.action.actioninfo.ActionInfo.position |
( |
|
self | ) |
|
|
private |
◆ _icon
| robotide.action.actioninfo.ActionInfo._icon |
|
private |
◆ _icon_source
| robotide.action.actioninfo.ActionInfo._icon_source |
|
private |
◆ _position
| robotide.action.actioninfo.ActionInfo._position |
|
private |
◆ action
| robotide.action.actioninfo.ActionInfo.action |
◆ container
| robotide.action.actioninfo.ActionInfo.container |
◆ doc
| robotide.action.actioninfo.ActionInfo.doc |
◆ menu_name
| robotide.action.actioninfo.ActionInfo.menu_name |
◆ name
| robotide.action.actioninfo.ActionInfo.name |
◆ shortcut
| robotide.action.actioninfo.ActionInfo.shortcut |
◆ icon
| robotide.action.actioninfo.ActionInfo.icon = property |
|
static |
◆ position
| robotide.action.actioninfo.ActionInfo.position = property |
|
static |
The documentation for this class was generated from the following file: