Button#

class ansys.tools.visualization_interface.backends.pyvista.widgets.button.Button(plotter: pyvista.Plotter, button_config: tuple)#

Bases: ansys.tools.visualization_interface.backends.pyvista.widgets.widget.PlotterWidget

Provides the abstract class for implementing buttons in PyAnsys.

Parameters:
plotterPlotter

Plotter to draw the buttons on.

button_configtuple

Tuple containing the position and the path to the icon of the button.

Notes

This class wraps the PyVista add_checkbox_button_widget() method.

Overview#

callback

Get the functionality of the button, which is implemented by subclasses.

update

Assign the image that represents the button.

Import detail#

from ansys.tools.visualization_interface.backends.pyvista.widgets.button import Button

Attribute detail#

Button.button_config#

Method detail#

abstract Button.callback(state: bool) None#

Get the functionality of the button, which is implemented by subclasses.

Parameters:
statebool

Whether the button is active.

Button.update() None#

Assign the image that represents the button.