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.
| Argument | Type | Required | Description |
|---|---|---|---|
locator | Yes | An 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.
| 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 | Yes | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
actor | vtkProp | Yes |
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.
| Argument | Type | Required | Description |
|---|---|---|---|
actor | vtkProp | Yes |
hasFocus
Returns true if the widget instance holds the focus, false otherwise.
invokeActivateHandle
Invoke the ActivateHandle event with the given payload.
| Argument | Type | Required | Description |
|---|---|---|---|
args | Yes | The event payload |
loseFocus
Make the widget instance release the focus.
newInstance
Method used to create a new instance of vtkAbstractWidget
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | Yes | For pre-setting some of its content |
onActivateHandle
Register a callback to be invoked when the ActivateHandle event occurs.
| Argument | Type | Required | Description |
|---|---|---|---|
cb | EventHandler | Yes | The callback to register |
priority | Number | No | Priority of this subscription |
placeWidget
Place a widget at the given bounds.
| Argument | Type | Required | Description |
|---|---|---|---|
bounds | Bounds | Yes |
setContextVisibility
Set the context visibility.
| Argument | Type | Required | Description |
|---|---|---|---|
visible | Boolean | Yes |
setHandleVisibility
Defines if the handles should be visible or not.
| Argument | Type | Required | Description |
|---|---|---|---|
visible | Boolean | Yes |
setPlaceFactor
Set the place factor.
| Argument | Type | Required | Description |
|---|---|---|---|
factor | Number | Yes | The place factor. |
setWidgetManager
Set the widget manager associated with the widget instance.
| Argument | Type | Required | Description |
|---|---|---|---|
wm | vtkWidgetManager | Yes | The widget manager instance |
updateRepresentationForRender
Update all the widget representations for render.
| Argument | Type | Required | Description |
|---|---|---|---|
renderingType | RenderingTypes | Yes | Default value if RenderingTypes.FRONT_BUFFER |