ICF 3.1.1.10
Technical documentation of ICF Libraries
ISelectable.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_ISelectable_included
7#define iview_ISelectable_included
8
9
10// Qt includes
11#include <QtCore/QSet>
12
13// ICF includes
14#include <istd/CIndex2d.h>
15
16#include <iview/ITouchable.h>
17
18
19namespace iview
20{
21
22
23class IInteractiveShape;
24
25
26class ISelectable: virtual public ITouchable
27{
28public:
29 typedef QSet<IInteractiveShape*> SelectedShapes;
30
47
52 {
55 EM_ADD = 2,
56 EM_REMOVE = 3
57 };
58
62 virtual int GetSelectedShapesCount() const = 0;
63
67 virtual void InsertSelectedShapes(SelectedShapes& result) const = 0;
68
72 virtual void DeselectAllShapes() = 0;
73
77 virtual int GetKeysState() const = 0;
78
82 virtual int GetEditMode() const = 0;
83
90 virtual void OnShapeFocused(IInteractiveShape* shapePtr) = 0;
91
97 virtual void OnShapeDefocused(IInteractiveShape* shapePtr) = 0;
98
107 virtual void OnShapeSelected(IInteractiveShape& shape, bool state = true) = 0;
108};
109
110
111} // namespace iview
112
113
114#endif // !iview_ISelectable_included
115
116
Common interface for all display console shapes which can interacts with user.
virtual void OnShapeFocused(IInteractiveShape *shapePtr)=0
Called when shape get focus.
virtual int GetKeysState() const =0
Get state of system keys.
virtual void DeselectAllShapes()=0
Set all shapes to be deselected.
virtual int GetSelectedShapesCount() const =0
Get count of selected shapes.
MousePointerMode
Defines possible states of mouse pointer.
Definition ISelectable.h:35
virtual void InsertSelectedShapes(SelectedShapes &result) const =0
Get set of selected shapes.
EditMode
Describes standard edit modes.
Definition ISelectable.h:52
virtual void OnShapeDefocused(IInteractiveShape *shapePtr)=0
Called when shape loose focus.
QSet< IInteractiveShape * > SelectedShapes
Definition ISelectable.h:29
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.
This interface describes all untransparent GUI objects, which can be touched.
Definition ITouchable.h:23
In this library is defined 2D view concept and standard visualisation objects.

© Witold Gantzke and Kirill Lepskiy