ISelectableLayer.h
Go to the documentation of this file.
1 #ifndef iview_ISelectableLayer_included
2 #define iview_ISelectableLayer_included
3 
4 
5 // Qt includes
6 #include <qnamespace.h>
7 
8 
9 // ACF includes
10 #include <i2d/CVector2d.h>
11 
12 #include <iview/IViewLayer.h>
13 #include <iview/ISelectable.h>
14 #include <iview/IDraggable.h>
16 
17 
18 namespace iview
19 {
20 
21 
22 class IInteractiveShape;
23 
24 
26  virtual public IViewLayer,
27  virtual public ISelectable,
28  virtual public IDraggable
29 {
30 public:
34  virtual bool ConnectInteractiveShape(IInteractiveShape* shapePtr) = 0;
35 
39  virtual int GetUnselectedShapesCount() const = 0;
40 
44  virtual void DrawFocusedShape(QPainter& drawContext) = 0;
45 
50  virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) = 0;
51 
56  virtual bool OnFocusedMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) = 0;
57 
62  virtual bool OnFocusedMouseMove(istd::CIndex2d position) = 0;
63 
70  virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape** shapePtrPtr = NULL) const = 0;
71 
72  // reimplemented (iview::ITouchable)
73  virtual TouchState IsTouched(istd::CIndex2d position) const;
74 };
75 
76 
77 // inline methods
78 
79 // reimplemented (iview::ITouchable)
80 
82 {
83  return IsTouched(position, NULL);
84 }
85 
86 
87 } // namespace iview
88 
89 
90 #endif // !iview_ISelectableLayer_included
91 
92 
Interface for a logical layer in the console view.
Definition: IViewLayer.h:24
virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)=0
Called, when mouse button was pushed down or up.
virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape **shapePtrPtr=NULL) const =0
Check, if any shape is touched.
virtual bool ConnectInteractiveShape(IInteractiveShape *shapePtr)=0
Connect active shape object.
virtual int GetUnselectedShapesCount() const =0
Get number of unselected shapes.
virtual bool OnFocusedMouseMove(istd::CIndex2d position)=0
Called, when this layer has focus, and mouse was moved.
Index implementation for addressing elements in 2D-space.
Definition: CIndex2d.h:20
Common interface for all display console shapes which can interacts with user.
virtual void DrawFocusedShape(QPainter &drawContext)=0
Draw only focused shape.
Common interface for all, you can drag.
Definition: IDraggable.h:17
#define NULL
Definition: istd.h:64
TouchState
Enumeration for possible shape touch states.
Definition: ITouchable.h:24
virtual bool OnFocusedMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)=0
Called, when this layer has focus, and mouse button was pushed down or up on this object...

© 2007-2017 Witold Gantzke and Kirill Lepskiy