Skip to content

AbstractWidget ​

Introduction ​

vtkAbstractWidget is an abstract class to construct a widget.

Methods ​

activateHandle ​

Activate a handle, identified by both a state and a representation. Will also invoke appropriate events.

ArgumentTypeRequiredDescription
locatorYesAn object describing the handle to activate.

deactivateAllHandles ​

Deactivate all the handles on the widget instance.

extend ​

Method used to decorate a given object (publicAPI+model) with vtkAbstractWidget characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesYes(default: {})

getBounds ​

Get the bounds of the widget

getContextVisibility ​

Get the context visibility.

getHandleVisibility ​

Returns true if the handles are visible, false otherwise.

getNestedProps ​

Get all representations of the widget.

getPlaceFactor ​

Get the place factor.

getRepresentationFromActor ​

Get the vtkWidgetRepresentation instance associated with the given vtkActor instance.

ArgumentTypeRequiredDescription
actorvtkPropYes

getRepresentations ​

Get all the representations of the widget instance.

getViewWidgets ​

Get all the underlyings view widgets.

getWidgetManager ​

Get the widget manager associated with the widget instance.

getWidgetState ​

Get the the state of the widget instance.

grabFocus ​

Make the widget instance grab the focus. Should not be called directly or this will lead to unexpected behavior. To grab the focus on a widget, one should call vtkWidgetManager.grabFocus(widgetInstanceToGiveFocusTo)

hasActor ​

Returns true if the widget instance holds the given actor, false otherwise.

ArgumentTypeRequiredDescription
actorvtkPropYes

hasFocus ​

Returns true if the widget instance holds the focus, false otherwise.

invokeActivateHandle ​

Invoke the ActivateHandle event with the given payload.

ArgumentTypeRequiredDescription
argsYesThe event payload

loseFocus ​

Make the widget instance release the focus.

newInstance ​

Method used to create a new instance of vtkAbstractWidget

ArgumentTypeRequiredDescription
initialValuesYesFor pre-setting some of its content

onActivateHandle ​

Register a callback to be invoked when the ActivateHandle event occurs.

ArgumentTypeRequiredDescription
cbEventHandlerYesThe callback to register
priorityNumberNoPriority of this subscription

placeWidget ​

Place a widget at the given bounds.

ArgumentTypeRequiredDescription
boundsBoundsYes

setContextVisibility ​

Set the context visibility.

ArgumentTypeRequiredDescription
visibleBooleanYes

setHandleVisibility ​

Defines if the handles should be visible or not.

ArgumentTypeRequiredDescription
visibleBooleanYes

setPlaceFactor ​

Set the place factor.

ArgumentTypeRequiredDescription
factorNumberYesThe place factor.

setWidgetManager ​

Set the widget manager associated with the widget instance.

ArgumentTypeRequiredDescription
wmvtkWidgetManagerYesThe widget manager instance

updateRepresentationForRender ​

Update all the widget representations for render.

ArgumentTypeRequiredDescription
renderingTypeRenderingTypesYesDefault value if RenderingTypes.FRONT_BUFFER