ICF 3.1.1.10
Technical documentation of ICF Libraries
IShapeView.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_IShapeView_included
7#define iview_IShapeView_included
8
9
10// Qt includes
11#include <QtCore/QVector>
12
13// ICF includes
14#include <i2d/CRect.h>
15#include <i2d/CAffine2d.h>
16
17#include <iview/IDisplay.h>
18#include <iview/ISelectable.h>
20
21
22namespace iview
23{
24
25
30 virtual public IDisplay,
31 virtual public ISelectable
32{
33public:
35
39 virtual void SetFitArea(const i2d::CRectangle& area) = 0;
40
45 virtual void SetTransform(const i2d::CAffine2d& transform) = 0;
46
50 virtual void Update() = 0;
51
55 virtual void SetEditMode(int mode) = 0;
56
61 virtual bool IsViewDraggable() const = 0;
62
66 virtual bool IsMultiselectable() const = 0;
67
71 virtual void UpdateMousePointer() = 0;
72
81 virtual int InsertLayer(IViewLayer* layerPtr, int index = -1, int layerType = IViewLayer::LT_NONE) = 0;
82
87 virtual int GetLayerIndex(const IViewLayer& layer) const = 0;
88
93 virtual int GetLayerIndex(int layerType) const = 0;
94
98 virtual void RemoveLayer(int index) = 0;
99
103 virtual int GetLayersCount() const = 0;
104
108 virtual IViewLayer& GetLayer(int index) const = 0;
109
115 virtual bool ConnectShape(IShape* shapePtr) = 0;
116
121
125 virtual void OnLayerShapeFocused(IInteractiveShape* shapePtr, ISelectableLayer* layerPtr) = 0;
126
130 virtual void OnLayerShapeDefocused(IInteractiveShape* shapePtr, ISelectableLayer* layerPtr) = 0;
131
135 virtual void OnLayerInvalidated(const IViewLayer& layer, const i2d::CRect& prevArea, const i2d::CRect& newArea) = 0;
136};
137
138
139} // namespace iview
140
141
142#endif // !iview_IShapeView_included
143
144
This class defines an affine 2D-transformation.
Definition CAffine2d.h:22
Simple rectangle with integer bounds.
Definition CRect.h:26
Definition of rectangle area orthogonal to axis of coordination system.
Definition CRectangle.h:31
Common interface for all display console shapes which can interacts with user.
Common interface for all display console shapes.
Definition IShape.h:37
Common interface for all objects informed about shapes state changes.
Common interface for a general shape view implementations.
Definition IShapeView.h:32
virtual ISelectableLayer * GetFocusedLayerPtr() const =0
Get focused layer.
virtual void OnLayerShapeDefocused(IInteractiveShape *shapePtr, ISelectableLayer *layerPtr)=0
Called when shape in layer loose focus.
virtual void SetTransform(const i2d::CAffine2d &transform)=0
Set a screen transformation.
virtual int GetLayerIndex(int layerType) const =0
Get index of layer by type.
IShapeObserver BaseClass
Definition IShapeView.h:34
virtual bool ConnectShape(IShape *shapePtr)=0
Connect shape object to view.
virtual void SetEditMode(int mode)=0
Changes the edit mode.
virtual void UpdateMousePointer()=0
Update mouse pointer.
virtual IViewLayer & GetLayer(int index) const =0
Get layer with the given index.
virtual void SetFitArea(const i2d::CRectangle &area)=0
Set area used for fitting of the view contents.
virtual bool IsViewDraggable() const =0
Check if is draggable mode.
virtual int GetLayerIndex(const IViewLayer &layer) const =0
Get index of layer.
virtual void OnLayerShapeFocused(IInteractiveShape *shapePtr, ISelectableLayer *layerPtr)=0
Called when shape in layer get focus.
virtual void OnLayerInvalidated(const IViewLayer &layer, const i2d::CRect &prevArea, const i2d::CRect &newArea)=0
Inform that layer was invalidated.
virtual int InsertLayer(IViewLayer *layerPtr, int index=-1, int layerType=IViewLayer::LT_NONE)=0
Insert layer to view.
virtual void RemoveLayer(int index)=0
Remove layer from view.
virtual int GetLayersCount() const =0
Get count of layer in this view.
virtual void Update()=0
Updates all invalidates shapes.
virtual bool IsMultiselectable() const =0
Check, if it is possible to select more than one shape.
Interface for a logical layer in the console view.
Definition IViewLayer.h:32
@ LT_NONE
Layer type is not set.
Definition IViewLayer.h:39
In this library is defined 2D view concept and standard visualisation objects.

© Witold Gantzke and Kirill Lepskiy