AccuDraw Class
Accudraw is an aide for entering coordinate data. This class is public to allow applications to provide a user interface for AccuDraw, either by implementing their own, or using the one supplied by the itwin appui package.
@note When writing an InteractiveTool it is not correct to call methods on AccuDraw directly, tools should instead provide hints to AccuDraw using AccuDrawHintBuilder.
Methods
Name | Description | |
---|---|---|
constructor(): AccuDraw | ||
getAngleParser(): undefined | ParserSpec | Allow the AccuDraw user interface to supply the angle/direction parser | |
getFieldLock(index: ItemField): boolean | Get the current lock state for the supplied input field | |
getLengthParser(): undefined | ParserSpec | Allow the AccuDraw user interface to supply the distance parser | |
getValueByIndex(index: ItemField): number | Get the current value for the supplied input field | |
grabInputFocus(): void | Implement this method to set focus to the AccuDraw UI. | |
onCompassDisplayChange(_state: "show" | "hide"): void | Called after compass state is changed between the active state and one of the disabled states | |
onCompassModeChange(): void | Called after compass mode is changed between polar and rectangular | |
onFieldLockChange(_index: ItemField): void | Called after input field locked state is changed | |
onFieldValueChange(_index: ItemField): void | Called after input field value changes | |
onMotion(_ev: BeButtonEvent): void | Implemented by sub-classes to update ui fields to show current deltas or coordinates when inactive. | |
onRotationModeChange(): void | Called after compass rotation is changed | |
processFieldInput(index: ItemField, input: string, synchText: boolean): Promise<void> | Call from an AccuDraw UI event to sync the supplied input field value | |
sendDataPoint(pt: Point3d, viewport: ScreenViewport): Promise<void> | Emulate a mouse click at the specified location in the supplied view by sending button down/up events. | |
setCompassMode(mode: CompassMode): void | Change current compass input mode to either polar or rectangular | |
setFieldLock(index: ItemField, locked: boolean): void | Change the lock status for the supplied input field | |
setFocusItem(_index: ItemField): void | Set focus to the specified input field | |
setRotationMode(mode: RotationMode): void | Change current compass orientation | |
setValueByIndex(index: ItemField, value: number): void | Set the current value for the supplied input field |
Properties
Name | Type | Description | |
---|---|---|---|
alwaysShowCompass | boolean | ||
autoFocusFields | boolean | ||
autoPointPlacement | boolean | ||
axisIndexing | boolean | ||
compassMode | CompassMode | ||
contextSensitive | boolean | ||
currentState Accessor | CurrentState | Current AccuDraw state | |
distanceIndexing | boolean | ||
dontMoveFocus | boolean | Disable automatic focus change when user is entering input. | |
floatingOrigin | boolean | ||
hasInputFocus Accessor ReadOnly | boolean | Whether AccuDraw currently has input focus | |
isActive Accessor ReadOnly | boolean | ||
isBearingMode Accessor ReadOnly | boolean | Allow the AccuDraw user interface to specify bearing | |
isDeactivated Accessor ReadOnly | boolean | ||
isEnabled Accessor ReadOnly | boolean | ||
isInactive Accessor ReadOnly | boolean | ||
newFocus | ItemField | Set input field to move focus to (X_Item or Y_Item) for automatic focus change. | |
rotationMode | RotationMode | ||
smartKeyin | boolean | ||
stickyZLock | boolean |
Defined in
Last Updated: 04 October, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.