AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
Public 成员函数 | 所有成员列表
AnyCAD::API::EventListener类 参考

事件接收器 更多...

#include <APIEventListener.h>

类 AnyCAD::API::EventListener 继承关系图:
AuMainFrame< TMainFrame >

Public 成员函数

virtual void OnDocumentModified (const DocumentChangeArgs &args)
 
virtual void OnSelectionChanged (const SelectionChangeArgs &args)
 
virtual void OnDebugWarning (const String &msg)
 
virtual Path OnGetOpenFileName (const String &caption, const String &filter)
 
virtual Path OnGetSaveFileName (const String &caption, const String &defaultName, const String &filter)
 
virtual int OnGotExistingElement (const String &docId, const ElementId &newId, const ElementIdSet &exitingIds)
 
virtual void OnTraceEditor (const String &commandId, int status)
 
virtual void OnChangeCursor (const String &commandId, const String &cursorHint)
 
virtual void OnMousePositionChanged (const Vector3 &worldPos)
 
virtual int OnExecuteEventLoop (long loopId)
 
virtual void OnExitLoopEvent (long loopId, int code)
 
virtual String OnGetInput (const String &desciption, int valueType, const String &defaultValue, long id)
 
virtual void OnShowCommandContextUI (bool bShow, const View &pView)
 

详细描述

事件接收器

用于接收平台产生的事件。

成员函数说明

virtual void AnyCAD::API::EventListener::OnChangeCursor ( const String commandId,
const String cursorHint 
)
virtual

Notify to change the cursor.

参数
commandIdthe id.
cursorHintwhich cursor to use.

AuMainFrame< TMainFrame > 重载.

virtual void AnyCAD::API::EventListener::OnDebugWarning ( const String msg)
virtual

产生了Debug警告信息。

参数
msgthe message
virtual void AnyCAD::API::EventListener::OnDocumentModified ( const DocumentChangeArgs args)
virtual

文档被修改的时候调用。

参数
argsthe arguments.
virtual int AnyCAD::API::EventListener::OnExecuteEventLoop ( long  loopId)
virtual

Execute the event loop

参数
loopIdthe loop id.
返回
the exit code.

AuMainFrame< TMainFrame > 重载.

virtual void AnyCAD::API::EventListener::OnExitLoopEvent ( long  loopId,
int  code 
)
virtual

Exit the event loop.

参数
loopIdthe loop id.
codethe exit code.

AuMainFrame< TMainFrame > 重载.

virtual String AnyCAD::API::EventListener::OnGetInput ( const String desciption,
int  valueType,
const String defaultValue,
long  id 
)
virtual

Get the input.

参数
desciptionthe description string.
valueTypethe value type.
defaultValuethe default value.
idthe id of the input.
返回
the value string.
virtual Path AnyCAD::API::EventListener::OnGetOpenFileName ( const String caption,
const String filter 
)
virtual

调用打开文件对话框获取需要打开的文件.

参数
captionthe Title
filterthe file filters
返回
file path name

AuMainFrame< TMainFrame > 重载.

virtual Path AnyCAD::API::EventListener::OnGetSaveFileName ( const String caption,
const String defaultName,
const String filter 
)
virtual

调用保存文件对话框保存文件.

参数
captionthe Title
defaultNamethe flleName
filterthe file filters
返回
file path name

AuMainFrame< TMainFrame > 重载.

virtual int AnyCAD::API::EventListener::OnGotExistingElement ( const String docId,
const ElementId newId,
const ElementIdSet exitingIds 
)
virtual

handling existing element action.

返回
the flags defined by EnumHandleExitingElement.
virtual void AnyCAD::API::EventListener::OnMousePositionChanged ( const Vector3 worldPos)
virtual

Notify the mouse position changed.

参数
worldPosthe position in the world space.
virtual void AnyCAD::API::EventListener::OnSelectionChanged ( const SelectionChangeArgs args)
virtual

选择集变化的时候调用。

参数
argsthe arguments
virtual void AnyCAD::API::EventListener::OnShowCommandContextUI ( bool  bShow,
const View pView 
)
virtual

Show the command context ui.

参数
bShowshow the UI.
pViewthe active view.
virtual void AnyCAD::API::EventListener::OnTraceEditor ( const String commandId,
int  status 
)
virtual

Trace the state of the editor

参数
commandIdthe id.
status1: Enter editor. 2: Exist editor

该类的文档由以下文件生成: