Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkAbstractWidgetFactory 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: {}) |
getPlaceFactor
Get the place factor.
getViewIds
Get a list of all the view ids.
getViewWidgets
Get a list of all the instances of the widget.
getWidgetForView
Will return the widget associated with the view with Id id locator.viewId
.
If there is no widget associated with the view, a new widget will be constructed, provided
that the renderer, viewType, and optionally initialValues are also provided.
Argument | Type | Required | Description |
---|---|---|---|
locator |
IGetWidgetForViewParams | Yes |
getWidgetState
Get the vtkWidgetState
instance
invokeWidgetChangeEvent
Invoke the WidgetChange event
Argument | Type | Required | Description |
---|---|---|---|
args |
Yes | The event payload |
newInstance
Method used to create a new instance of vtkAbstractWidgetFactory
Argument | Type | Required | Description |
---|---|---|---|
initialValues |
Yes | for pre-setting some of its content |
onWidgetChangeEvent
Register a callback to be called when the WidgetChange event arise.
Argument | Type | Required | Description |
---|---|---|---|
cb |
EventHandler | Yes | The callback to be invoked. |
priority |
Number | No | The priority of this subscription |
placeWidget
Place a new widget at the given bounds.
Argument | Type | Required | Description |
---|---|---|---|
bounds |
Bounds | Yes |
setContextVisibility
Set the context visibility for each associated view widget.
Argument | Type | Required | Description |
---|---|---|---|
visible |
Boolean | Yes |
setDragable
Set the dragable flag for each underlying view widget.
Argument | Type | Required | Description |
---|---|---|---|
dragable |
Boolean | Yes |
setHandleVisiblity
Set the handles visibility for each underlying view widget.
Argument | Type | Required | Description |
---|---|---|---|
visible |
Boolean | Yes |
setPickable
Set the pickable flag for each underlying view widget.
Argument | Type | Required | Description |
---|---|---|---|
pickable |
Boolean | Yes |
setPlaceFactor
Set the place factor.
Argument | Type | Required | Description |
---|---|---|---|
factor |
Number | Yes |
setVisibility
Set the visiblity on each underlying view widget.
Argument | Type | Required | Description |
---|---|---|---|
visible |
Boolean | Yes |
Source
import vtkAbstractWidget from "../AbstractWidget"; |
import macro from 'vtk.js/Sources/macros'; |