|
AnyCAD Rapid API 2025
Help you to create a better world!
|
Public 成员函数 | |
| Command | Find (String name) |
| void | AddListener (CommandListener listener) |
| void | RemoveListener (CommandListener listener) |
| boolean | Execute (String command, ParameterDict parameters, Viewer viewer, Document document, boolean clearEditor) |
| boolean | Execute (String command, ParameterDict parameters, Viewer viewer, Document document) |
| String | Query (String command, ParameterDict parameters, Viewer viewer, Document document) |
| void | OnMessage (Viewer viewer, EnumCommandType type, String msg, String content) |
| void | OnMessage (Viewer viewer, EnumCommandType type, String msg) |
| boolean | InternalAdd (Command command) |
静态 Public 成员函数 | |
| static CommandManager | Instance () |
| static CommandManager | GetInstance () |
<> 命令管理器.
| void CommandManager.AddListener | ( | CommandListener | listener | ) |
添加命令监听器
| listener | 监听器 |
| boolean CommandManager.Execute | ( | String | command, |
| ParameterDict | parameters, | ||
| Viewer | viewer, | ||
| Document | document ) |
执行命令
| command | 命令名称 |
| parameters | 参数 |
| viewer | 当前视图 |
| document | 当前文档 |
| boolean CommandManager.Execute | ( | String | command, |
| ParameterDict | parameters, | ||
| Viewer | viewer, | ||
| Document | document, | ||
| boolean | clearEditor ) |
执行命令
| command | 命令名称 |
| parameters | 参数 |
| viewer | 当前视图 |
| document | 当前文档 |
| clearEditor | 是否清空当前的编辑器 |
| Command CommandManager.Find | ( | String | name | ) |
根据名称查找命令
| name |
| boolean CommandManager.InternalAdd | ( | Command | command | ) |
内部方法,禁止外部调用。
| command | Command对象 |
| void CommandManager.OnMessage | ( | Viewer | viewer, |
| EnumCommandType | type, | ||
| String | msg ) |
给命令监听器发送消息
| viewer | 视图 |
| type | 类型 |
| msg | 消息 |
| void CommandManager.OnMessage | ( | Viewer | viewer, |
| EnumCommandType | type, | ||
| String | msg, | ||
| String | content ) |
给命令监听器发送消息
| viewer | 视图 |
| type | 类型 |
| msg | 消息 |
| content | 内容 |
| String CommandManager.Query | ( | String | command, |
| ParameterDict | parameters, | ||
| Viewer | viewer, | ||
| Document | document ) |
执行查询
| command | 命令名称 |
| parameters | 参数 |
| viewer | 视图 |
| document | 文档 |
| void CommandManager.RemoveListener | ( | CommandListener | listener | ) |
移除监听器
| listener | 监听器 |