import { EventEmitter, TreeItem, GLRenderer } from '@zeainc/zea-engine'; import { AppData } from '../types/types'; import XfoHandle from './Handles/XfoHandle'; import SelectionGroup from './SelectionGroup'; import { Change } from './UndoRedo'; /** * Class representing a selection manager * * **Events** * **leadSelectionChanged:** Triggered when selecting one item. * **selectionChanged:** Triggered when the selected objects change. * * @extends {EventEmitter} */ declare class SelectionManager extends EventEmitter { appData: AppData; leadSelection: TreeItem; selectionGroup: SelectionGroup; xfoHandle: XfoHandle; xfoHandleVisible: boolean; renderer: GLRenderer; pickFilter: (treeItem: TreeItem) => TreeItem; pickCB: (treeItem: TreeItem) => void; /** * Creates an instance of SelectionManager. * * @param appData - The options object. * @param [options={}] - The appData value. * enableXfoHandles - enables display Xfo Gizmo handles when items are selected. * selectionOutlineColor - enables highlight color to use to outline selected items. * branchSelectionOutlineColor - enables highlight color to use to outline selected items. */ constructor(appData: AppData, options?: any); /** * Adds specified the renderer to the `SelectionManager` and attaches the `SelectionGroup`. * * @param renderer - The renderer param. */ setRenderer(renderer: GLRenderer): void; /** * Sets initial Xfo mode of the selection group. * * @see `KinematicGroup` class documentation * * @param mode - The Xfo mode */ setXfoMode(mode: number): void; /** * Displays handles depending on the specified mode(Move, Rotate, Scale). * If nothing is specified, it hides all of them. * @deprecated * @param enabled - The mode of the Xfo parameter */ showHandles(enabled: boolean): void; /** * Determines if the Xfo Manipulation handle should be displayed or not. */ updateHandleVisibility(): void; /** * Returns an array with the selected items. * * @return - The return value. */ getSelection(): Set; /** * Sets a new selection of items in the `SelectionManager` * * @param newSelection - The newSelection param * @param [createUndo=true] - The createUndo param */ setSelection(newSelection: Set, createUndo?: boolean, parentChange?: Change): void; /** * @param treeItem - The treeItem value */ private setLeadSelection; /** * The toggleItemSelection method. * * @param treeItem - The treeItem param. * @param replaceSelection - The replaceSelection param. */ toggleItemSelection(treeItem: TreeItem, replaceSelection?: boolean, createUndo?: boolean, parentChange?: Change): void; /** * Clears selection state by removing previous selected items and the Xfo handlers. * * @param createUndo - The createUndo param. * @return {boolean} - The return value. */ clearSelection(createUndo?: boolean, parentChange?: Change): void; /** * Selects the specified items replacing previous selection or concatenating new items to it. * * @param treeItems - The treeItems param. * @param replaceSelection - The replaceSelection param. */ selectItems(treeItems: Set, replaceSelection?: boolean, createUndo?: boolean, parentChange?: Change): void; /** * Deselects the specified items from the selection group. * * @param treeItems - The treeItems param. */ deselectItems(treeItems: Set, createUndo?: boolean, parentChange?: Change): void; /** * The startPickingMode method. * * @param label - The label param. * @param fn - The fn param. * @param filterFn - The filterFn param. * @param count - The count param. */ startPickingMode(fn: (treeItem: TreeItem) => void, filterFn: (treeItem: TreeItem) => TreeItem | null): void; /** * The pickingModeActive method. * * @return {boolean} The return value. */ pickingModeActive(): boolean; /** * The endPickingMode method. */ endPickingMode(): void; /** * The pick method. * @param item - The item param. */ pick(item: TreeItem | Array): void; } export default SelectionManager; export { SelectionManager }; //# sourceMappingURL=SelectionManager.d.ts.map