:class:`Button` =============== .. py:class:: ansys.tools.visualization_interface.backends.pyvista.widgets.button.Button(plotter: pyvista.Plotter, button_config: tuple) Bases: :py:obj:`ansys.tools.visualization_interface.backends.pyvista.widgets.widget.PlotterWidget` Provides the abstract class for implementing buttons in PyAnsys. :Parameters: **plotter** : :obj:`Plotter` Plotter to draw the buttons on. **button_config** : :class:`python:tuple` Tuple containing the position and the path to the icon of the button. .. rubric:: Notes This class wraps the PyVista ``add_checkbox_button_widget()`` method. .. !! processed by numpydoc !! .. py:currentmodule:: Button Overview -------- .. tab-set:: .. tab-item:: Abstract methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~callback` - Get the functionality of the button, which is implemented by subclasses. .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~update` - Assign the image that represents the button. .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~button_config` - Import detail ------------- .. code-block:: python from ansys.tools.visualization_interface.backends.pyvista.widgets.button import Button Attribute detail ---------------- .. py:attribute:: button_config Method detail ------------- .. py:method:: callback(state: bool) -> None :abstractmethod: Get the functionality of the button, which is implemented by subclasses. :Parameters: **state** : :ref:`bool ` Whether the button is active. .. !! processed by numpydoc !! .. py:method:: update() -> None Assign the image that represents the button. .. !! processed by numpydoc !!