Class | ActionClassMethod |
Undocumented |
Class | ActionDescriptor |
Undocumented |
Class | ActionMethod |
Undocumented |
Class | BoundActionMethod |
Undocumented |
Class | RadioActionClassMethod |
Undocumented |
Class | RadioActionMethod |
Undocumented |
Class | ToggleActionClassMethod |
Toggle action, used by the toggle_action decorator |
Class | ToggleActionMethod |
No class docstring; 0/2 instance variable, 0/2 class variable, 3/9 methods documented |
Function | action |
No summary |
Function | get_actions |
Returns bound actions for object |
Function | get_gtk_actiongroup |
Return a Gtk.ActionGroup for an object using Action objects as attributes. |
Function | gtk_radioaction_set_current |
Undocumented |
Function | hasaction |
Like hasattr but for attributes that define an action |
Function | initialize_actiongroup |
Undocumented |
Function | radio_action |
Undocumented |
Function | radio_option |
Undocumented |
Function | toggle_action |
Decorator to turn a method into an ToggleActionMethod object |
Constant | PRIMARY_MODIFIER_MASK |
Undocumented |
Constant | PRIMARY_MODIFIER_STRING |
Undocumented |
Variable | Gio |
Undocumented |
Variable | GLib |
Undocumented |
Variable | Gtk |
Undocumented |
Variable | logger |
Undocumented |
Function | _get_modifier_mask |
Undocumented |
Function | _gtk_add_action_with_accel |
Undocumented |
ActionMethod
object Methods decorated with this decorator can have keyword arguments but no positional arguments.Parameters | |
label | the label used e.g for the menu item (can use "_" for mnemonics) |
accelerator | accelerator key description |
icon | name of a "noun" icon - used together with the label. Only use this for "things and places", not for actions or commands, and only if the icon makes the item easier to recognize. |
verb_icon | name of a "verb" icon - only used for compact menu views |
menuhints | string with hints for menu placement and sensitivity |
alt_accelerator | alternative accelerator key binding |
tooltip | tooltip label, defaults to label |
Returns bound actions for object
NOTE: See also zim.plugins.list_actions()
if you want to include actions of plugin extensions
Return a Gtk.ActionGroup for an object using Action
objects as attributes.
Defines the attribute obj.actiongroup if it does not yet exist.
This method can only be used when gtk is available
Decorator to turn a method into an ToggleActionMethod
object
The decorated method should be defined as: my_toggle_method(self, active). The 'active' parameter is a boolean that reflects the new state of the toggle.
Users can also call the method without setting the active parameter. In this case the wrapper determines how to toggle the state and calls the inner function with the new state.
Parameters | |
label | the label used e.g for the menu item (can use "_" for mnemonics) |
accelerator | accelerator key description |
icon | name of a "noun" icon - used together with the label. Only use this for "things and places", not for actions or commands, and only if the icon makes the item easier to recognize. |
verb_icon | name of a "verb" icon - only used for compact menu views |
init | initial state of the toggle |
menuhints | string with hints for menu placement and sensitivity |
tooltip | tooltip label, defaults to label |