AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
APIView.h
浏览该文件的文档.
1 //Public API. Powered by AnyCAD.
2 
3 #ifndef _APIView_H_
4 #define _APIView_H_
5 
6 #include "APIObjectDef.h"
7 
8 namespace AnyCAD{ namespace API
9 {
10  class DocViewEditor;
11  class Document;
12  class Command;
13  class InputEvent;
14  class ViewEditorManager;
15  class Editor;
16  class ContextMenu;
25  {
27  public:
32  void SetDocument (const Document& pDoc) ;
37  Document GetDocument () const;
42  void SetViewId (const ElementId& viewId) ;
47  ElementId GetViewId () const;
54  bool ExecuteCommand (const String& commandName, const String& parameters) ;
60  void LoadPlaceEditor (const ElementId& typeId, const String& createMethod) ;
66  DocViewEditor CreateEditor (const String& commandId) ;
72  long ActiveEditor (const Editor& pEditor) ;
78  long ActiveEditorByName (const String& commandName) ;
83  void SetDefaultEditorId (const String& commandId) ;
88  String GetDefaultEditorId () const;
93  ViewEditorManager GetEditorMgr () const;
97  virtual void Destroy () ;
103  virtual void OnSize (int nWidth, int nHeight) ;
107  virtual void Redraw () ;
111  virtual void RequestDraw (int nRedrawHint) ;
115  virtual void ReloadDocument () ;
120  virtual int OnLButtonDown (const InputEvent& evt) ;
125  virtual int OnLButtonUp (const InputEvent& evt) ;
130  virtual int OnMouseMove (const InputEvent& evt) ;
135  virtual int OnRButtonDown (const InputEvent& evt) ;
140  virtual int OnRButtonUp (const InputEvent& evt) ;
145  virtual int OnMButtonDown (const InputEvent& evt) ;
150  virtual int OnMButtonUp (const InputEvent& evt) ;
155  virtual int OnMouseWheel (const InputEvent& evt) ;
160  virtual int OnKeyDown (const InputEvent& evt) ;
165  virtual int OnChar (const InputEvent& evt) ;
170  virtual int OnKeyUp (const InputEvent& evt) ;
175  virtual int OnTimer (int nTimerId) ;
180  virtual bool OnContextMenu (const ContextMenu& menuContext) ;
187  static bool SetEditorMgr (const View& pView, const ViewEditorManager& pEditMgr) ;
188  };//View;
189 }}//API
190 
191 #endif //_APIView_H_
#define AnyPlatformAPI_API
Definition: AnyPlatformAPI.h:8
鼠标和键盘输入信息
Definition: APIInputEvent.h:17
std::string String
Definition: APIString.h:10
Present the view.
Definition: APIView.h:24
编辑器基类
Definition: APIEditor.h:21
The id.
Definition: APIElementId.h:16
The view editor base class.
Definition: APIDocViewEditor.h:22
文档类。
Definition: APIDocument.h:25
#define DECLARE_APIOBJECT(className)
Definition: APIObjectDef.h:10
The editor manager.
Definition: APIViewEditorManager.h:23
上下文菜单
Definition: APIContextMenu.h:17