BIMHome v1.0.0
BIMHome接口文档说明
ISelection.h
浏览该文件的文档.
1/************************************************************************
2* @file ISelection.h
3*
4* @brief 选择器接口类
5*
6* @details 选择器接口类
7*
8* @author sunpeng
9*
10* @version 1.0
11*
12* @date 2014-9-20
13*
14* @license 北京华科软科技有限公司
15*
16*************************************************************************/
17
18#ifndef BIMHOMEGUI_GUI_ISELECTION_H
19#define BIMHOMEGUI_GUI_ISELECTION_H
20
21#include <BHGlobal.h>
22
23namespace App {
24 class IDocument;
25 class IDocumentObject;
26}
27
28namespace Gui
29{
30 class ISelectionFilterGate;
31
40 enum class ResolveMode
41 {
42 NoResolve,
46 };
47
61 {
63 {
64 DocName = "";
65 FeatId = -1;
66 SubName = "";
67 TypeName = "";
68 pDoc = nullptr;
69 pObject = nullptr;
70 pResolvedObject = nullptr;
71 x = 0.0;
72 y = 0.0;
73 z = 0.0;
74 }
75
76 const char* DocName;
77 int FeatId;
78 const char* SubName;
79 const char* TypeName;
83 float x, y, z;
84 };
85
86 class GuiExport ISelection
87 {
88 public:
89
95 static ISelection& get();
96
103
108 virtual void rmvSelectionGate(void) = 0;
109
116 virtual void clearSelection(const char* pDocName = nullptr, bool clearPreSelect = true) = 0;
117
118
127 virtual std::vector<SelectedObj> getFromSelection(const char* pDocName = nullptr, ResolveMode resolve = ResolveMode::OldStyleElement, bool single = false) const = 0;
128
141 virtual bool addToSelection(const char* pDocName, int ObjectId = -1, const char* pSubName = nullptr, float x = 0, float y = 0, float z = 0, bool clearPreSelect = true) = 0;
142
143 };
144
145}
146
147
148#endif // GUI_ISELECTION_H
文档接口类
Definition IDocument.h:43
Definition IDocumentObject.h:35
virtual void addSelectionGate(ISelectionFilterGate *gate)
向某个选择系统中添加一个新的选择过滤器(SelectionGate)
virtual std::vector< SelectedObj > getFromSelection(const char *pDocName=nullptr, ResolveMode resolve=ResolveMode::OldStyleElement, bool single=false) const =0
从选择系统中获取选择的对象
virtual bool addToSelection(const char *pDocName, int ObjectId=-1, const char *pSubName=nullptr, float x=0, float y=0, float z=0, bool clearPreSelect=true)=0
将对象添加到选择系统中
virtual void rmvSelectionGate(void)=0
删除活动的选择过滤器(SelectionGate)
static ISelection & get()
返回一个ISelection类型的实例
virtual void clearSelection(const char *pDocName=nullptr, bool clearPreSelect=true)=0
清除选择系统中的选择项
Definition ISelectionFilterGate.h:32
Definition ISelection.h:87
Definition BaseFigureFactory.h:28
ResolveMode
枚举类型,定义了解析模式
Definition ISelection.h:41
Definition GuiDocObserverDelegate.h:33
App::IDocumentObject * pResolvedObject
Definition ISelection.h:82
const char * DocName
Definition ISelection.h:76
App::IDocument * pDoc
Definition ISelection.h:80
const char * SubName
Definition ISelection.h:78
App::IDocumentObject * pObject
Definition ISelection.h:81
const char * TypeName
Definition ISelection.h:79
float y
Definition ISelection.h:83
float x
Definition ISelection.h:83
int FeatId
Definition ISelection.h:77
float z
Definition ISelection.h:83
SelectedObj()
Definition ISelection.h:62
用于存储选择对象的信息
Definition ISelection.h:61