ACF $AcfVersion:0$
CRectangleComp.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// ACF includes
7#include <i2d/CRectangle.h>
8
9
10namespace i2d
11{
12
13
18class CRectangleComp: public TObject2dCompWrap<CRectangle>
19{
20public:
22
23 I_BEGIN_COMPONENT(CRectangleComp);
24 I_REGISTER_INTERFACE(CRectangle);
25 I_REGISTER_INTERFACE(IObject2d);
26 I_REGISTER_INTERFACE(iser::ISerializable);
27 I_ASSIGN(m_leftAttrPtr, "X", "X-Position of the rectangle", true, 0);
28 I_ASSIGN(m_topAttrPtr, "Y", "Y-Position of the rectangle", true, 0);
29 I_ASSIGN(m_widthAttrPtr, "Width", "Width of the rectangle", true, 0);
30 I_ASSIGN(m_heightAttrPtr, "Height", "Height of the rectangle", true, 0);
31 I_END_COMPONENT;
32
33protected:
34 // reimplemented (icomp::CComponentBase)
35 virtual void OnComponentCreated() override;
36
37private:
38 I_ATTR(double, m_leftAttrPtr);
39 I_ATTR(double, m_topAttrPtr);
40 I_ATTR(double, m_widthAttrPtr);
41 I_ATTR(double, m_heightAttrPtr);
42};
43
44
45} // namespace i2d
46
47
48
49
Implementation of a rectangle as a component.
virtual void OnComponentCreated() override
TObject2dCompWrap< CRectangle > BaseClass
Definition of rectangle area orthogonal to axis of coordination system.
Definition CRectangle.h:27
Common interface for describing the 2D-objects.
Definition IObject2d.h:26
Base class for all components implementing 2D objects.
Common class for all classes which objects can be archived or restored from archive.
Contains the 2D objects.
Definition CAffine2d.h:11