ACF $AcfVersion:0$
CTubePolylineComp.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/CTubePolyline.h>
8
9
10namespace i2d
11{
12
13
17class CTubePolylineComp: public TObject2dCompWrap<CTubePolyline>
18{
19public:
21
22 I_BEGIN_COMPONENT(CTubePolylineComp);
23 I_REGISTER_INTERFACE(CTubePolyline);
24 I_ASSIGN(m_minTubeRangeValueAttrPtr, "DefaultLeftTubeRange", "Default left tube range value", false, -10);
25 I_ASSIGN(m_maxTubeRangeValueAttrPtr, "DefaultRightTubeRange", "Default right tube range value", false, 10);
26 I_ASSIGN(m_defaultAXPtr, "Default_A_X", "Default x coordinate for first line point", false, 40);
27 I_ASSIGN(m_defaultAYPtr, "Default_A_Y", "Default y coordinate for first line point", false, 40);
28 I_ASSIGN(m_defaultBXPtr, "Default_B_X", "Default x coordinate for second line point", false, 120);
29 I_ASSIGN(m_defaultBYPtr, "Default_B_Y", "Default y coordinate for second line point", false, 40);
30 I_END_COMPONENT;
31
32 // reimplemented (i2d::CPolygon)
33 virtual bool InsertNode(const i2d::CVector2d& node) override;
34 virtual bool InsertNode(int index, const i2d::CVector2d& node) override;
35
36protected:
37 // reimplemented (i2d::CPolygon)
38 virtual void SetNodesCount(int count) override;
39
40 // reimplemented (icomp::CComponentBase)
41 virtual void OnComponentCreated() override;
42
43private:
44 I_ATTR(double, m_minTubeRangeValueAttrPtr);
45 I_ATTR(double, m_maxTubeRangeValueAttrPtr);
46 I_ATTR(int, m_defaultAXPtr);
47 I_ATTR(int, m_defaultAYPtr);
48 I_ATTR(int, m_defaultBXPtr);
49 I_ATTR(int, m_defaultBYPtr);
50
51 istd::CRange m_defaultTubeRange;
52};
53
54
55} // namespace i2d
56
57
58
59
Component definition of the tube region based on a polyline.
virtual void SetNodesCount(int count) override
Set new nodes count.
virtual void OnComponentCreated() override
virtual bool InsertNode(int index, const i2d::CVector2d &node) override
Insert a node at specified index.
TObject2dCompWrap< CTubePolyline > BaseClass
virtual bool InsertNode(const i2d::CVector2d &node) override
Insert a node at the end of node table.
Definition of tube region based on polyline.
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
Base class for all components implementing 2D objects.
Contains the 2D objects.
Definition CAffine2d.h:11