ICF 3.0.5.47
Technical documentation of ICF Libraries
ISelectableLayer.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iview_ISelectableLayer_included
7#define iview_ISelectableLayer_included
8
9
10// Qt includes
11#include <qnamespace.h>
12
13
14// ICF includes
15#include <i2d/CVector2d.h>
16
17#include <iview/IViewLayer.h>
18#include <iview/ISelectable.h>
19#include <iview/IDraggable.h>
21
22
23namespace iview
24{
25
26
27class IInteractiveShape;
28
29
31 virtual public IViewLayer,
32 virtual public ISelectable,
33 virtual public IDraggable
34{
35public:
39 virtual bool ConnectInteractiveShape(IInteractiveShape* shapePtr) = 0;
40
44 virtual int GetUnselectedShapesCount() const = 0;
45
49 virtual void DrawFocusedShape(QPainter& drawContext) = 0;
50
55 virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) = 0;
56
61 virtual bool OnFocusedMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag) = 0;
62
67 virtual bool OnFocusedMouseMove(istd::CIndex2d position) = 0;
68
75 virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape** shapePtrPtr = nullptr) const = 0;
76
77 // reimplemented (iview::ITouchable)
78 virtual TouchState IsTouched(istd::CIndex2d position) const;
79};
80
81
82// inline methods
83
84// reimplemented (iview::ITouchable)
85
87{
88 return IsTouched(position, nullptr);
89}
90
91
92} // namespace iview
93
94
95#endif // !iview_ISelectableLayer_included
96
97
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:25
Common interface for all, you can drag.
Definition IDraggable.h:23
Common interface for all display console shapes which can interacts with user.
virtual bool OnMouseButton(istd::CIndex2d position, Qt::MouseButton buttonType, bool downFlag)=0
Called, when mouse button was pushed down or up.
virtual bool OnFocusedMouseMove(istd::CIndex2d position)=0
Called, when this layer has focus, and mouse was moved.
virtual int GetUnselectedShapesCount() const =0
Get number of unselected shapes.
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.
virtual TouchState IsTouched(istd::CIndex2d position, IInteractiveShape **shapePtrPtr=nullptr) const =0
Check, if any shape is touched.
virtual bool ConnectInteractiveShape(IInteractiveShape *shapePtr)=0
Connect active shape object.
virtual void DrawFocusedShape(QPainter &drawContext)=0
Draw only focused shape.
TouchState
Enumeration for possible shape touch states.
Definition ITouchable.h:30
Interface for a logical layer in the console view.
Definition IViewLayer.h:32
In this library is defined 2D view concept and standard visualisation objects.

© Witold Gantzke and Kirill Lepskiy