UiAdmin Class

The UiAdmin controls various UI components and is callable from IModelApp.uiAdmin in the core-frontend package.

Methods

Name Description
constructor(): UiAdmin    
closeDialog(_dialogId: string): boolean Closes the Dialog with a given Id.  
closeToolSettingsPopup(): boolean Closes the Tool Settings Ui popup.  
createXAndY(x: number, y: number): XAndY Create a PointProps object. Deprecated  
hideCalculator(): boolean Hides the calculator.  
hideCard(): boolean Hides the Card.  
hideHTMLElement(): boolean Hides the HTML Element.  
hideInputEditor(): boolean Hides the input editor.  
hideKeyinPalette(): boolean Hides the Keyin Palette.  
hideMenuButton(_id: string): boolean Hides a menu button.  
hideToolbar(): boolean Hides the toolbar.  
openDialog(_uiDataProvider: DialogLayoutDataProvider, _title: string, _isModal: boolean, _id: string, _optionalProps?: DialogProps): boolean Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider.  
openToolSettingsPopup(_dataProvider: UiDataProvider, _location: XAndY, _offset: XAndY, _onCancel: OnCancelFunc, _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean Opens a Tool Settings Ui popup at a particular location.  
setFocusToHome(): void Sets focus to Home  
showAngleEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean Show an input editor for an angle value at a particular location.  
showCalculator(_initialValue: number, _resultIcon: string, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean Show a calculator at a particular location.  
showCard(_content: HTMLElement, _title: undefined | string | PropertyRecord, _toolbarProps: undefined | AbstractToolbarProps, _location: XAndY, _offset: XAndY, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc, _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean Show a Card containing content, a title and a toolbar at a particular location.  
showContextMenu(_menuItemsProps: AbstractMenuItemProps[], _location: XAndY, _htmlElement?: HTMLElement): boolean Show a context menu at a particular location.  
showHTMLElement(_displayElement: HTMLElement, _location: XAndY, _offset: XAndY, _onCancel: OnCancelFunc, _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean Show an HTML element at a particular location.  
showHeightEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean Show an input editor for a height value at a particular location.  
showInputEditor(_initialValue: Primitives.Value, _propertyDescription: PropertyDescription, _location: XAndY, _onCommit: OnValueCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean Show an input editor for a primitive value at a particular location.  
showKeyinPalette(_htmlElement?: HTMLElement): boolean Show the Keyin Palette to display all support Tool key-ins.  
showLengthEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean Show an input editor for a length value at a particular location.  
showMenuButton(_id: string, _menuItemsProps: AbstractMenuItemProps[], _location: XAndY, _htmlElement?: HTMLElement): boolean Show a menu button at a particular location.  
showToolbar(_toolbarProps: AbstractToolbarProps, _location: XAndY, _offset: XAndY, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc, _relativePosition?: RelativePosition, _htmlElement?: HTMLElement): boolean Show a Toolbar at a particular location.  
updateFeatureFlags(uiFlags: UiFlags): void    
sendUiEvent(args: GenericUiEventArgs): void Static Send a UI event  

Properties

Name Type Description
cursorPosition Accessor ReadOnly XAndY Get the cursor X and Y position.  
featureFlags Accessor ReadOnly UiFlags    
isFocusOnHome Accessor ReadOnly boolean Determines if focus is set to Home  
messagePresenter Accessor Static MessagePresenter The MessagePresenter used to display messages.  
onGenericUiEvent StaticReadonly GenericUiEvent GenericUiEvent  

Defined in

Last Updated: 16 April, 2024