CRectangleComp.h
Go to the documentation of this file.
1 #ifndef i2d_CRectangleComp_included
2 #define i2d_CRectangleComp_included
3 
4 
5 // ACF includes
7 #include <i2d/CRectangle.h>
8 
9 
10 namespace i2d
11 {
12 
13 
18 class CRectangleComp: public TObject2dCompWrap<CRectangle>
19 {
20 public:
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 
33 protected:
34  // reimplemented (icomp::CComponentBase)
35  virtual void OnComponentCreated();
36 
37 private:
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 #endif // !i2d_CRectangleComp_included
49 
50 
virtual void OnComponentCreated()
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
Implementation of a rectangle as a component.
Definition of rectangle area orthogonal to axis of coordination system.
Definition: CRectangle.h:26
Common interface for describing the 2D-objects.
Definition: IObject2d.h:22
TObject2dCompWrap< CRectangle > BaseClass
Base class for all components implementing 2D objects.

© 2007-2017 Witold Gantzke and Kirill Lepskiy