-
Notifications
You must be signed in to change notification settings - Fork 2
/
FrameworkControls.ts
63 lines (57 loc) · 2.12 KB
/
FrameworkControls.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module ConfigurableUi
*/
import type {
ConfigurableUiControlConstructor,
ConfigurableUiElement,
} from "../configurableui/ConfigurableUiControl";
/**
* [[UiFramework.controls]] interface
* @public
*/
export interface FrameworkControls {
/** Registers a control implementing the [[ConfigurableUiElement]] interface.
* These controls can be a
* [[ContentControl]],
* [[NavigationAidControl]],
* [[StatusBarWidgetControl]],
* [[WidgetControl]] or
* [[ToolUiProvider]].
* @param classId the class id of the control to register
* @param constructor the constructor of the control to register
*/
register(
classId: string,
constructor: ConfigurableUiControlConstructor
): void;
/** Determines if a control has been registered based on its classId.
* @param classId the class id of the control to test
* @returns true if the control is registered or false if not
*/
isRegistered(classId: string): boolean;
/** Unregisters a control that has been registered.
* @param classId the class id of the control to unregister
*/
unregister(classId: string): void;
/** Creates a control registered by calling registerControl.
* @param classId the class id of the control to create
* @param uniqueId a unique id for the control
* @param options options passed to the constructor of the control
* @param controlId controlId which may not be unique across all control instances.
* @returns the created control
*/
create(
classId: string,
uniqueId: string,
options?: any,
controlId?: string
): ConfigurableUiElement | undefined;
/** Gets the HTML wrapper element for Configurable UI */
getWrapperElement(): HTMLElement;
/** Closes all UI popups currently open */
closeUi(): void;
}