Button#

class ansys.geometry.core.plotting.widgets.button.Button(plotter: pyvista.Plotter, button_config: tuple)#

Bases: ansys.geometry.core.plotting.widgets.widget.PlotterWidget

Provides the abstract class for implementing buttons in PyAnsys Geometry.

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.geometry.core.plotting.widgets.button import Button

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.