OpenLexocad  27.1
ServiceInterface.h
Go to the documentation of this file.
1 
8 #ifndef SERVICEINTERFACE_H
9 #define SERVICEINTERFACE_H
10 
11 #include <Core/core_gt.h>
12 #include <Geom/Dir.h>
13 #include <Geom/Pnt.h>
14 #include <Geom/Rect.h>
15 #include <Geom/Trsf.h>
16 
17 #include <set>
18 
19 
20 namespace Core
21 {
47 {
48  enum CGS_Type
49  {
53 
54  } type;
55 
59 
60  double parameter1;
61  double paremeter2;
62  double parameter3;
63 
64 
66  {
68 
69  parameter1 = 0.0;
70  paremeter2 = 0.0;
71  parameter3 = 0.0;
72  }
73 };
74 
75 
76 
82 {
83 public:
84  CSnapperContext() { valid = false; }
85 
86  bool valid;
88 };
89 
90 
95 class LX_CORE_EXPORT ServiceInterface
96 {
97 public:
98  // selector interface
99  virtual void selectByHit(const Geom::Rect& area) = 0;
100  virtual void selectByRect(const Geom::Rect& area) = 0;
101 
102  virtual void selectByHitPlus(const Geom::Rect& area) = 0;
103  virtual void selectByRectPlus(const Geom::Rect& area) = 0;
104 
105  virtual void unselectAll(void) = 0;
106  virtual std::set<Core::DocObject*> getSelectedElements(void) = 0;
107 
108  virtual bool activePoint_Exists(void) = 0;
109  virtual Core::DocObject* activePoint_Element(void) = 0;
110  virtual Geom::Pnt activePoint_Position(void) = 0;
111 
112  virtual bool activeSegment_Exists(void) = 0;
113  virtual Core::DocObject* activeSegment_Element(void) = 0;
114 
115 
116 
117  // snapping interface
118  virtual void enableSnapper(int options, CSnapperContext context = CSnapperContext()) = 0;
119  virtual void disableSnapper(void) = 0;
120  virtual bool isSnap(void) = 0;
121  virtual void hideSnapMark(void) = 0;
122 
123  virtual Geom::Pnt getSnapPoint(void) = 0;
124 
125 
126 
127  // picking interface
128  virtual void enablePicker(int options) = 0;
129  virtual void disablePicker(void) = 0;
130  virtual bool isPick(void) = 0;
131  virtual void unpick(void) = 0;
132  virtual void hidePickedSegmentMark(void) = 0;
133 
134  virtual CommonGeometryDefinition getPickedSegment(void) = 0;
135  virtual Core::DocObject* getPickedElement(void) = 0;
136 
137 
138 
139  // general
140  virtual void showEndlessHelper(const Geom::Pnt& p, const Geom::Dir& d) = 0;
141  virtual void hideEndlessHelper(void) = 0;
142 
143  virtual void addGeneralMark(const Geom::Pnt& p) = 0;
144  virtual void removeGeneralMarks(void) = 0;
145 
146  virtual void getElementsIntersectingArea(std::vector<Core::DocObject*>& elements, const Geom::Rect& area) = 0;
147 };
148 
149 } // namespace Core
150 
151 
152 
153 #endif
Definition: ServiceInterface.h:52
Geom::Pnt refPoint
Definition: ServiceInterface.h:87
double parameter1
Definition: ServiceInterface.h:60
Definition: ServiceInterface.h:51
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:43
enum Core::CommonGeometryDefinition::CGS_Type type
Geom::Pnt p3
Definition: ServiceInterface.h:58
Definition: Rect.h:27
Definition: Dir.h:45
CommonGeometryDefinition()
Definition: ServiceInterface.h:65
double parameter3
Definition: ServiceInterface.h:62
Definition: Base.h:12
Definition: ServiceInterface.h:95
Geom::Pnt p2
Definition: ServiceInterface.h:57
Definition: ServiceInterface.h:50
Definition: ServiceInterface.h:81
Geom::Pnt p1
Definition: ServiceInterface.h:56
CGS_Type
Definition: ServiceInterface.h:48
CSnapperContext()
Definition: ServiceInterface.h:84
bool valid
Definition: ServiceInterface.h:86
double paremeter2
Definition: ServiceInterface.h:61
Definition: ServiceInterface.h:46
Definition: DocObject.h:51