AccuDrawViewportUI Class @beta
Provides an in viewport user interface for AccuDraw that can optionally follow the cursor or remain at a fixed location.
Extends
Methods
| Name |
Description |
|
| constructor(): AccuDrawViewportUI |
Create a new instance of this class to set as accuDraw for this session. |
|
| changedControlRect(_rect: ViewRect, _vp: ScreenViewport): void Protected |
Called after the position of the controls in the supplied view is updated. |
|
| currentControlRect(vp: ScreenViewport): undefined | ViewRect Protected |
Return the ViewRect currently occupied by the controls in the supplied view. |
|
| getFocusItem(): undefined | ItemField |
Get the item field that currently has input focus. |
|
| grabInputFocus(): void |
Request to set focus to the active AccuDraw input field to start entering values. |
|
| modifyControlRect(_rect: ViewRect, _vp: ScreenViewport): void Protected |
Use to override the position of the controls in the supplied view. |
|
| onCompassDisplayChange(state: "show" | "hide"): void |
Change notification for when the compass is shown or hidden. |
|
| onCompassModeChange(): void |
Change notification for when the compass mode switches between polar and rectangular inputs. |
|
| onFieldKeyinStatusChange(item: ItemField): void |
Change notification for when the supplied input field switches between dynamic and partial input. |
|
| onFieldLockChange(item: ItemField): void |
Change notification for when the supplied input field lock status is modified. |
|
| onFieldValueChange(item: ItemField): void |
Change notification for when the supplied input field value has been modified. |
|
| onMotion(ev: BeButtonEvent): void |
Change notification of a motion event in the view. |
|
| refreshControls(): void |
Call to update the currently displayed controls after settings are changed. |
|
| removedControlRect(): void Protected |
Called after the controls have been removed from the view. |
|
| setFocusItem(index: ItemField): void |
Request to set focus to the specified AccuDraw input field to start entering values. |
|
| setHorizontalFixedLayout(): void |
Call to set a horizontal layout that is anchored to the bottom middle of the view. |
|
| setVerticalCursorLayout(): void |
Call to set a vertical layout that follows the cursor. |
|
Inherited methods
Properties
| Name |
Type |
Description |
|
| controlProps Static |
{ button: { locked: { backgroundColor: string, border: { color: string }, color: string }, padding: string, unlocked: { backgroundColor: string, border: { color: string }, color: string } }, cursorOffset: { x: number, y: number }, field: { border: { radius: string, style: string, width: string }, height: string, size: number, text: { fontFamily: string, fontSize: string } }, fixedLocation: boolean, horizontalArrangement: boolean, input: { color: string, focused: { backgroundColor: string, border: { color: string }, innerStroke: string }, padding: string, unfocused: { backgroundColor: string, border: { color: string } } }, mathOperations: boolean, simplifiedInput: boolean, spacing: { gap: string, margin: string }, suspendLocateToolTip: boolean } |
Settings to control the behavior and visual appearance of the viewport controls. |
|
| hasInputFocus Accessor ReadOnly |
boolean |
Return whether keyboard shortcuts can or can't be used. |
|
Inherited properties
| Name |
Type |
Inherited from |
Description |
| alwaysShowCompass Inherited |
boolean |
AccuDraw |
When true the compass is always active and on screen instead of following the current tools request to activate |
| angleRoundOff Accessor Inherited ReadOnly |
RoundOff |
AccuDraw |
Get angle round off settings |
| autoFocusFields Inherited |
boolean |
AccuDraw |
When true locking the angle also moves focus to the angle input field |
| autoPointPlacement Inherited |
boolean |
AccuDraw |
When true fully specifying a point by entering both distance and angle in polar mode or XY[Z] in rectangular mode, the point is automatically accepted |
| axisIndexing Inherited |
boolean |
AccuDraw |
When true the current point is adjusted to the x and y axes when within a close tolerance |
| bearingFixedToPlane2d Accessor Inherited |
boolean |
AccuDraw |
Allow the AccuDraw user interface to specify bearing directions are always in xy plane |
| compassMode Inherited |
CompassMode |
AccuDraw |
The current compass mode |
| contextSensitive Inherited |
boolean |
AccuDraw |
When true all tool hints are applied as opposed to only selected hints |
| currentState Accessor Inherited |
CurrentState |
AccuDraw |
Current AccuDraw state |
| distanceIndexing Inherited |
boolean |
AccuDraw |
When true the current point is adjusted to the last locked distance value when within a close tolerance |
| distanceRoundOff Accessor Inherited ReadOnly |
RoundOff |
AccuDraw |
Get distance round off settings |
| dontMoveFocus Inherited |
boolean |
AccuDraw |
Disable automatic focus change when user is entering input. |
| floatingOrigin Inherited |
boolean |
AccuDraw |
When true the compass follows the origin hint as opposed to remaining at a fixed location |
| isActive Accessor Inherited ReadOnly |
boolean |
AccuDraw |
When true the compass is displayed and adjusting input points for the current interactive tool |
| isBearingMode Accessor Inherited ReadOnly |
boolean |
AccuDraw |
Allow the AccuDraw user interface to specify bearing |
| isDeactivated Accessor Inherited ReadOnly |
boolean |
AccuDraw |
When true the compass is not displayed or adjusting points, the current interactive tool has disabled automatic activation, but can still be enabled via shortcuts |
| isEnabled Accessor Inherited ReadOnly |
boolean |
AccuDraw |
When true AccuDraw is enabled by the application and can be used by interactive tools |
| isInactive Accessor Inherited ReadOnly |
boolean |
AccuDraw |
When true the compass is not displayed or adjusting points, but it can be automatically activated by the current interactive tool or via shortcuts |
| newFocus Inherited |
ItemField |
AccuDraw |
Set input field to move focus to (X_Item or Y_Item) for automatic focus change. |
| rotationMode Inherited |
RotationMode |
AccuDraw |
The current compass rotation |
| smartKeyin Inherited |
boolean |
AccuDraw |
When true improve behavior for +/- input when cursor switches side and try to automatically manage focus |
| snapIndexing Inherited |
boolean |
AccuDraw |
When true and axisIndexing is allowed the current point is adjusted to the tangent or binormal vector from the last snap when within a close tolerance |
| stickyZLock Inherited |
boolean |
AccuDraw |
When true the z input field will remain locked with it's current value after a data button |
Defined in
Last Updated: 24 October, 2025