SpriteAction (hwx.gui)¶
A SpriteAction is a palette of PushButtons with icons.
SpriteActions MUST be children of the SpriteActionGroup. The SpriteActionGroup can then be placed into the Unity RibbonPage.
- Inherits:
Public Methods¶
Method Details¶
- classmethod get(cls, name)¶
Returns the named action from defined in active profile.
- param name
Action name.
- type name
str
- onCommand(self)¶
Calls command callback method when an Action is clicked.
- onToggle(self, on)¶
Acts when an Action is toggled.
If is coupled to dialog it will show or hide the dialog.
If is coupled to a context it will get in and out the context.
If is coupled to callback it will run the callback with state or not.
- param on
Determines whether to toggle on or off.
- type on
bool
- toggle(self, on=None)¶
Simulate clicking the action.
- param on
Pass True/False to ensure you are toggling on or off. None flips the state.
- type on
bool | None