ISelectable.h
Go to the documentation of this file.
1 #ifndef iview_ISelectable_included
2 #define iview_ISelectable_included
3 
4 
5 // Qt includes
6 #include <QtCore/QSet>
7 
8 // ACF includes
9 #include <istd/CIndex2d.h>
10 
11 #include <iview/ITouchable.h>
12 
13 
14 namespace iview
15 {
16 
17 
18 class IInteractiveShape;
19 
20 
21 class ISelectable: virtual public ITouchable
22 {
23 public:
24  typedef QSet<IInteractiveShape*> SelectedShapes;
25 
30  {
41  };
42 
46  enum EditMode
47  {
48  EM_NONE = 0,
49  EM_MOVE = 1,
50  EM_ADD = 2,
52  };
53 
57  virtual int GetSelectedShapesCount() const = 0;
58 
62  virtual void InsertSelectedShapes(SelectedShapes& result) const = 0;
63 
67  virtual void DeselectAllShapes() = 0;
68 
72  virtual int GetKeysState() const = 0;
73 
77  virtual int GetEditMode() const = 0;
78 
85  virtual void OnShapeFocused(IInteractiveShape* shapePtr) = 0;
86 
92  virtual void OnShapeDefocused(IInteractiveShape* shapePtr) = 0;
93 
102  virtual void OnShapeSelected(IInteractiveShape& shape, bool state = true) = 0;
103 };
104 
105 
106 } // namespace iview
107 
108 
109 #endif // !iview_ISelectable_included
110 
111 
virtual void InsertSelectedShapes(SelectedShapes &result) const =0
Get set of selected shapes.
MousePointerMode
Defines possible states of mouse pointer.
Definition: ISelectable.h:29
virtual int GetKeysState() const =0
Get state of system keys.
virtual int GetSelectedShapesCount() const =0
Get count of selected shapes.
Common interface for all display console shapes which can interacts with user.
virtual void OnShapeDefocused(IInteractiveShape *shapePtr)=0
Called when shape loose focus.
virtual int GetEditMode() const =0
Get actual edit mode.
QSet< IInteractiveShape * > SelectedShapes
Definition: ISelectable.h:24
virtual void DeselectAllShapes()=0
Set all shapes to be deselected.
EditMode
Describes standard edit modes.
Definition: ISelectable.h:46
virtual void OnShapeSelected(IInteractiveShape &shape, bool state=true)=0
It is called after change shape selection state.
This interface describes all untransparent GUI objects, which can be touched.
Definition: ITouchable.h:17
virtual void OnShapeFocused(IInteractiveShape *shapePtr)=0
Called when shape get focus.

© 2007-2017 Witold Gantzke and Kirill Lepskiy