====================== 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: - :ref:`Action (hwx.gui)` -------------- Public Methods -------------- +------------------------------+ | classmethod get_ (cls, name) | +------------------------------+ | onCommand_ (self) | +------------------------------+ | onToggle_ (self, on) | +------------------------------+ | toggle_ (self, on=None) | +------------------------------+ -------------- Method Details -------------- .. _get: .. classmethod:: get(cls, name) Returns the named action from defined in active profile. :param name: Action name. :type name: str .. _onCommand: .. method:: onCommand(self) Calls command callback method when an Action is clicked. .. _onToggle: .. method:: 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: .. method:: 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