UNPKG

@itwin/core-frontend

Version:
47 lines 2.48 kB
/** @packageDocumentation * @module Views */ import { Id64Arg, Id64String, ObservableSet } from "@itwin/core-bentley"; import { CategorySelectorProps } from "@itwin/core-common"; import { ElementState } from "./EntityState"; import { IModelConnection } from "./IModelConnection"; /** A set of Categories to be displayed in a [[ViewState]]. * Elements belonging to categories not specified in the category selector will not be drawn in the view. * By default, geometry belonging to any [[SubCategory]] of a visible Category is also visible in the view, * unless the [[SubCategoryAppearance]] or [[SubCategoryOverride]] specifies that it should be invisible. * @note To change the set of categories visible in a [[ViewState]] currently associated with a [[Viewport]], * use [[ViewState.changeCategoryDisplay]] to ensure the view updates appropriately on screen. * @see [[Category]] * @public * @extensions */ export declare class CategorySelectorState extends ElementState { static get className(): string; private readonly _categories; constructor(props: CategorySelectorProps, iModel: IModelConnection); get categories(): Set<string>; set categories(categories: Set<string>); /** @internal */ get observableCategories(): ObservableSet<string>; toJSON(): CategorySelectorProps; /** Returns true if this category selector is logically equivalent to the specified category selector. * Two category selectors are logically equivalent if they have the same name and Id and contain the same set of category Ids. */ equalState(other: CategorySelectorState): boolean; /** The name of this CategorySelector */ get name(): string; /** Determine whether this CategorySelector includes the specified categoryId string */ has(id: Id64String): boolean; /** Determine whether this CategorySelector includes the specified category */ isCategoryViewed(categoryId: Id64String): boolean; /** Add one or more categories to this CategorySelector */ addCategories(arg: Id64Arg): void; /** Remove one or more categories from this CategorySelector */ dropCategories(arg: Id64Arg): void; /** Add or remove categories from this CategorySelector. * @param arg The categories to add or remove * @param add If true, categories will be added; otherwise they will be removed. */ changeCategoryDisplay(arg: Id64Arg, add: boolean): void; } //# sourceMappingURL=CategorySelectorState.d.ts.map