/** @packageDocumentation * @module Tools */ import { BeEvent } from "@bentley/bentleyjs-core"; import { IModelConnection, ScreenViewport, Viewport } from "@bentley/imodeljs-frontend"; /** Supported Hide, Isolate, and Emphasize Actions. These also serve as FeatureTracking Ids. * @public */ export declare enum HideIsolateEmphasizeAction { EmphasizeSelectedElements = "EmphasizeSelectedElements", IsolateSelectedElements = "IsolateSelectedElements", IsolateSelectedCategories = "IsolateSelectedCategories", IsolateSelectedModels = "IsolateSelectedModels", HideSelectedElements = "HideSelectedElements", HideSelectedModels = "HideSelectedModels", HideSelectedCategories = "HideSelectedCategories", ClearHiddenIsolatedEmphasized = "ClearHiddenIsolatedEmphasized", ClearOverrideModels = "ClearOverrideModels", ClearOverrideCategories = "ClearOverrideCategories" } /** Selection Context Action Event Argument * @public */ export interface EmphasizeElementsChangedArgs { /** viewport where action was performed */ readonly viewport: ScreenViewport; /** action being performed */ readonly action: HideIsolateEmphasizeAction; } /** * Interface for class that handles Hide, Isolate, and Emphasize Actions * @public */ export declare abstract class HideIsolateEmphasizeActionHandler { static emphasizeElementsChanged: BeEvent<(args: EmphasizeElementsChangedArgs) => void>; /** String Id sent to allow UI to refresh its display state. */ static get hideIsolateEmphasizeUiSyncId(): string; /** * Function run when `IsolateSelectedElementsModel` tool button is pressed */ abstract processIsolateSelectedElementsModel(): Promise; /** * Function run when `IsolateSelectedElementsModel` tool button is pressed */ abstract processIsolateSelectedElementsCategory(): Promise; /** * Function run when `HideSelectedElementsModel` tool button is pressed */ abstract processIsolateSelected(): Promise; /** * Function run when `HideSelectedElementsModel` tool button is pressed */ abstract processHideSelectedElementsModel(): Promise; /** * Function that is run when `HideSelectedElementsCategory` tool button is pressed */ abstract processHideSelectedElementsCategory(): Promise; /** * Function that is run when `HideSelected` tool button is pressed */ abstract processHideSelected(): Promise; /** * Function that is run when `EmphasizeSelected` tool button is pressed */ abstract processEmphasizeSelected(): Promise; /** * Function that is run when `ClearEmphasize` tool button is pressed */ abstract processClearEmphasize(): Promise; /** * Function that informs called if Hide, Isolate, or Emphasize of elements is active. */ abstract areFeatureOverridesActive(vp: Viewport): boolean; /** * Function run when `ClearOverrideCategories` tool button is pressed */ abstract processClearOverrideCategories(): Promise; /** * Function run when `ClearOverrideModels` tool button is pressed */ abstract processClearOverrideModels(): Promise; } /** Provides helper functions for doing commands on logical selection like categories and subjects. * @public */ export declare class HideIsolateEmphasizeManager extends HideIsolateEmphasizeActionHandler { private static _categoryClassName; private static _subjectClassName; private static _modelClassName; private static _subjectModelIdsCache; private static _overrideCategoryIds; private static _overrideModelIds; /** * Initialize the subject model cache * @param iModelConnection iModel to use for querying subject's models */ static initializeSubjectModelCache(iModelConnection: IModelConnection): void; /** * Returns true if the selection in presentation layer only has a single selection class and it is the given one * @param className ECClass name to check for */ private static _checkClassSelected; /** * Gets the Ids of all elements selected that have the given class name * @param className ECClass name to check for */ private static _getIdsOfClassName; /** Returns true if there are only categories selected in presentation's logical selection */ private static categorySelected; /** Returns true if there are only subjects selected in presentation's logical selection */ private static subjectSelected; /** Returns true if a model is selected in presentation's logical selection */ private static modelSelected; /** * Hide the selected category found in presentation layer's logical selection * @param vp Viewport to affect */ private static hideSelectedCategory; /** Get sub categories that relate to the category Id */ private static _getSubCategories; /** * Emphasize the selected category found in presentation layer's logical selection * @param vp Viewport to affect */ static emphasizeSelectedCategory(vp: Viewport): Promise; /** * Query the model Id that models a subject * @param subjectId Subject Id to use in query */ private static _getModelIds; /** * Hide the selected subject's model found in the presentation layer's logical selection * @param vp Viewport to affect */ private static hideSelectedSubject; /** * Isolate the selected subject's model found in the presentation layer's logical selection * @param vp Viewport to affect */ private static emphasizeSelectedSubject; /** * Hide the selected model * @param vp Viewport to affect */ private static hideSelectedModel; /** * Isolate the selected model * @param vp Viewport to affect */ private static emphasizeSelectedModel; /** * Isolate the selected elements * @param vp Viewport to affect */ static isolateSelected(vp: Viewport): void; /** * Hide the selected elements * @param vp Viewport to affect */ static hideSelected(vp: Viewport): void; /** * Clear Hidden,Isolated, or Emphasized elements in specified view * @param vp Viewport to affect * */ static clearEmphasize(vp: Viewport | undefined): void; /** * Emphasize the selected elements from either presentation layer's logical selection or selected graphics * @param vp Viewport to affect * @param emphasisSilhouette defaults to true */ static emphasizeSelected(vp: Viewport, emphasisSilhouette?: boolean): Promise; /** * Isolate the selected subject's model found in the presentation layer's logical selection * @param vp Viewport to affect */ static isolateSelectedSubject(vp: Viewport): Promise; /** * Isolate the selected model * @param vp Viewport to affect */ static isolateSelectedModel(vp: Viewport): Promise; /** * Isolate the selected category found in presentation layer's logical selection * @param vp Viewport to affect */ private static isolateSelectedCategory; private static getSelectionSetElementModels; private static getSelectionSetElementCategories; /** * Isolate either based on Presentation selection, if defined, else the selected graphic elements * @param vp Viewport to affect */ static isolateCommand(vp: Viewport): Promise; /** * Isolate model from selected elements * @param vp Viewport to affect */ static isolateSelectedElementsModel(vp: Viewport): Promise; /** * Isolate the selected category found in SelectionSet elements * @param vp Viewport to affect */ static isolateSelectedElementsCategory(vp: Viewport): Promise; /** * Hide either based on Presentation selection, if defined, else the selected graphic elements * @param vp Viewport to affect */ static hideCommand(vp: Viewport): Promise; /** * Hide the models defined by the elements in the current SelectionSet * @param vp Viewport to affect */ static hideSelectedElementsModel(vp: Viewport): Promise; /** * Clear (restore) the previously hidden/isolated models hidden by hideSelectedElementsModel * @param vp Viewport to affect */ static clearOverrideModels(vp: Viewport): void; /** * Determine if models are hidden by hideSelectedElementsModel or isolateSelectedElementsModel * @param vp Viewport to affect */ static isOverrideModels(vp: Viewport): boolean; /** * Determine if categories are hidden by hideSelectedElementsCategory or isolateSelectedElementsCategory * @param vp Viewport to affect */ static isOverrideCategories(vp: Viewport): boolean; /** * Hide the categories defined by the elements in the current SelectionSet * @param vp Viewport to affect */ static hideSelectedElementsCategory(vp: Viewport): Promise; /** * Clear (restore) the previously hidden categories hidden by hideSelectedElementsCategory * @param vp Viewport to affect */ static clearOverrideCategories(vp: Viewport): void; /** Checks to see if any featureOverrideProviders are active */ areFeatureOverridesActive(vp: Viewport): boolean; /** * Function that is run when `IsolateSelectedElementsModel` tool button is pressed */ processIsolateSelectedElementsModel(): Promise; /** * Function that is run when `IsolateSelectedElementsCategory` tool button is pressed */ processIsolateSelectedElementsCategory(): Promise; /** * Function that is run when `IsolateSelected` tool button is pressed */ processIsolateSelected(): Promise; /** * Function that is run when `HideSelectedElementsModel` tool button is pressed */ processHideSelectedElementsModel(): Promise; /** * Function that is run when `HideSelectedElementsCategory` tool button is pressed */ processHideSelectedElementsCategory(): Promise; /** * Function that is run when `HideSelected` tool button is pressed */ processHideSelected(): Promise; /** * Function that is run when `EmphasizeSelected` tool button is pressed */ processEmphasizeSelected(): Promise; /** * Function that is run when `ClearEmphasize` tool button is pressed */ processClearEmphasize(): Promise; /** * Function that is run when `ClearOverrideModels` tool button is pressed */ processClearOverrideModels(): Promise; /** * Function that is run when `ClearOverrideCategories` tool button is pressed */ processClearOverrideCategories(): Promise; /** * Add category ids to the category override cache (hidden or isolated categories) */ static updateCategoryOverride(vp: Viewport, ids: string[]): void; /** * Add model ids to the model override cache (hidden or isolated models) */ static updateModelOverride(vp: Viewport, ids: string[]): void; /** * Return the list of category overrides (hidden or isolated categories) */ static getCategoryOverrides(vp: Viewport): Set | undefined; /** * Return the list of model overrides (hidden or isolated models) */ static getModelOverrides(vp: Viewport): Set | undefined; /** * Clear the category override cache (hidden or isolated categories) */ private static clearCategoryOverride; /** * Clear the model override cache (hidden or isolated models) */ private static clearModelOverride; } //# sourceMappingURL=HideIsolateEmphasizeManager.d.ts.map