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.
| Argument | Type | Required | Description |
|---|---|---|---|
subState | vtkWidgetState | Yes | The 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.
| Argument | Type | Required | Description |
|---|---|---|---|
subState | vtkWidgetState | Yes | The state to bound. |
labels | String or Array[String] | No | The labels to which the state should be bound. |
deactivate
Deactivate thie widget state instance and all its sub states, except the excludingState argument.
| Argument | Type | Required | Description |
|---|---|---|---|
excludingState | vtkWidgetState | No | A sub-state instance that should not be deactivated. |
extend
Method use to decorate a given object (publicAPI+model) with vtkWidgetState characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | object | No | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
label | String | Yes | The label from which to retrieve the states. |
setActive
Set the active flag of the widget state instance
| Argument | Type | Required | Description |
|---|---|---|---|
active | Yes | The active flag |
unbindAll
Unbind all states from the widget state instance
unbindState
Unbind a specific state from the widget state instance
| Argument | Type | Required | Description |
|---|---|---|---|
subState | vtkWidgetState | Yes | The state to be unbound. |