@turbox3d/command-manager
Version:
Large-scale productivity application command management library
41 lines (40 loc) • 1.24 kB
TypeScript
import { ViewEntity, SceneEvent, EventType } from '@turbox3d/event-manager';
import { Command } from './Command';
import { create } from './create';
import { compose } from './compose';
import { manager } from './manager';
import { SceneTool } from './type';
import { install } from './install';
export declare abstract class CommandManager {
/**
* 构建一个 Command 基类
*
* 范型类型为激活时的函数参数
*/
static create: typeof create;
/**
* 构建一个组合了其他 Command 的结构(本质依然是一个 Command)
*/
static compose: typeof compose;
/**
* 构建一个 CommandManager 基类
*/
static manager: typeof manager;
/**
* 安装声明一系列指令集
*/
static install: typeof install;
/**
* 当前激活的 Command
*/
protected activeCommand?: Command;
installed(): void;
toggleCommand(command?: Command): void;
clearCommand(): void;
/**
* 判断当前激活的 Command 是否为入参 command
* @param command
*/
isCommandActive(command: Command): boolean;
distributeEvent(eventType: EventType, ev: ViewEntity, event: SceneEvent, tools: SceneTool): void;
}