WidgetManager
Methods
disablePicking
Disable the picking.
enablePicking
Enable the picking.
extend
Method used to decorate a given object (publicAPI+model) with vtkWidgetManager 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: {}) |
extractRenderingComponents
Extract the rendering components from the given renderer.
| Argument | Type | Required | Description |
|---|---|---|---|
renderer | vtkRenderer | Yes | The vtkRenderer instance. |
getActiveWidget
Get the active widget.
If no widget is active, returns null.
getCaptureOn
Get the captureOn value.
getCursorStyles
Retrieves the current cursor styles.
getPickingEnabled
Returns true if picking is enabled, false otherwise.
getPixelWorldHeightAtCoord
This method returns the world distance that corresponds to the height of a single display pixel at a given coordinate. For example, to determine the (vertical) distance that matches a display distance of 30px for a coordinate coord, you would compute 30 * getPixelWorldHeightAtCoord(coord).
getSelectedData
The all currently selected data.
getSelectedDataForXY
Given x and y parameter, get selected data.
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | |
y | Number | Yes |
getSelections
Get the current selection.
getViewId
Get the view id.
getViewType
Get the view type.
getWidgets
Get all the underlying widgets.
grabFocus
Given the focus to the given widget instance.
| Argument | Type | Required | Description |
|---|---|---|---|
widget | vtkAbstractWidget or vtkAbstractWidgetFactory | Yes | The widget instance which should get the focus. |
newInstance
Method used to create a new instance of vtkCellArray
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | Yes | for pre-setting some of its content |
releaseFocus
Release the focus.
removeWidget
Remove a widget from the widget manager.
| Argument | Type | Required | Description |
|---|---|---|---|
widget | vtkAbstractWidget or vtkAbstractWidgetFactory | Yes | The widget to remove |
removeWidgets
Unregister all widgets from the widget manager.
renderWidgets
Renders all the widgets.
setCaptureOn
The the captureOn value. CaptureOn.MOUSE_MOVE: captures small region when moving mouse CaptureOn.MOUSE_RELEASE: captures entire region when mouse button is released
| Argument | Type | Required | Description |
|---|---|---|---|
captureOn | CaptureOn | Yes |
setCursorStyles
Sets the default cursor styles.
Known style keys:
- default: when not interacting with a widget
- hover: when hovering over a widget.
If a known style key is not present, the cursor style will not be changed.
| Argument | Type | Required | Description |
|---|---|---|---|
cursorStyles | Record<string> | Yes |
setRenderer
Set the renderer.
| Argument | Type | Required | Description |
|---|---|---|---|
renderer | vtkRenderer | Yes |
setViewType
The the view type.
| Argument | Type | Required | Description |
|---|---|---|---|
type | ViewTypes | Yes |