Skip to content

WidgetState ​

Methods ​

activate ​

Activate the widget state instance. Same as calling vtkWidgetState.setActive(true)

activateOnly ​

Activate only the passed in sub state. Every other sub states will be deactivated.

ArgumentTypeRequiredDescription
subStatevtkWidgetStateYesThe sub-state that should be activated.

bindState ​

Bind a state to one or more labels. If no label is provided, the default one will be used.

ArgumentTypeRequiredDescription
subStatevtkWidgetStateYesThe state to bound.
labelsString or Array[String]NoThe labels to which the state should be bound.

deactivate ​

Deactivate thie widget state instance and all its sub states, except the excludingState argument.

ArgumentTypeRequiredDescription
excludingStatevtkWidgetStateNoA sub-state instance that should not be deactivated.

extend ​

Method use to decorate a given object (publicAPI+model) with vtkWidgetState characteristics.

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

getActive ​

Get the active flag of the widget state instance

getAllNestedStates ​

Get all the nested states on the widget state instance.

getStatesWithLabel ​

Get every states that are associated with the given label.

ArgumentTypeRequiredDescription
labelStringYesThe label from which to retrieve the states.

setActive ​

Set the active flag of the widget state instance

ArgumentTypeRequiredDescription
activeYesThe active flag

unbindAll ​

Unbind all states from the widget state instance

unbindState ​

Unbind a specific state from the widget state instance

ArgumentTypeRequiredDescription
subStatevtkWidgetStateYesThe state to be unbound.