ACF $AcfVersion:0$
ISelectable.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QSet>
7
8// ACF includes
9#include <istd/CIndex2d.h>
10#include <iview/ITouchable.h>
11
12
13namespace iview
14{
15
16
17class IInteractiveShape;
18
19
20class ISelectable: virtual public ITouchable
21{
22public:
23 typedef QSet<IInteractiveShape*> SelectedShapes;
24
42
47 {
50 EM_ADD = 2,
52 EM_LAST = 100
53 };
54
59 {
60 DM_DEFAULT = 0
61 };
62
66 virtual int GetSelectedShapesCount() const = 0;
67
71 virtual void InsertSelectedShapes(SelectedShapes& result) const = 0;
72
76 virtual void DeselectAllShapes() = 0;
77
81 virtual int GetKeysState() const = 0;
82
86 virtual int GetEditMode() const = 0;
87
91 virtual int GetDisplayMode() const = 0;
92
99 virtual void OnShapeFocused(IInteractiveShape* shapePtr) = 0;
100
106 virtual void OnShapeDefocused(IInteractiveShape* shapePtr) = 0;
107
116 virtual void OnShapeSelected(IInteractiveShape& shape, bool state = true) = 0;
117};
118
119
120} // namespace iview
121
122
Common interface for all display console shapes which can interacts with user.
virtual void OnShapeFocused(IInteractiveShape *shapePtr)=0
Called when shape get focus.
DisplayMode
Describes standard display modes.
Definition ISelectable.h:59
virtual int GetKeysState() const =0
Get state of system keys.
virtual void DeselectAllShapes()=0
Set all shapes to be deselected.
QSet< IInteractiveShape * > SelectedShapes
Definition ISelectable.h:23
virtual int GetSelectedShapesCount() const =0
Get count of selected shapes.
MousePointerMode
Defines possible states of mouse pointer.
Definition ISelectable.h:29
virtual void InsertSelectedShapes(SelectedShapes &result) const =0
Get set of selected shapes.
EditMode
Describes standard edit modes.
Definition ISelectable.h:47
virtual void OnShapeDefocused(IInteractiveShape *shapePtr)=0
Called when shape loose focus.
virtual void OnShapeSelected(IInteractiveShape &shape, bool state=true)=0
It is called after change shape selection state.
virtual int GetEditMode() const =0
Get actual edit mode.
virtual int GetDisplayMode() const =0
Get actual display mode.
This interface describes all untransparent GUI objects, which can be touched.
Definition ITouchable.h:18
In this library is defined 2D view concept and standard visualisation objects.