Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/elements/additional/GNEAdditionalSquared.h
185790 views
1
/****************************************************************************/
2
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4
// This program and the accompanying materials are made available under the
5
// terms of the Eclipse Public License 2.0 which is available at
6
// https://www.eclipse.org/legal/epl-2.0/
7
// This Source Code may also be made available under the following Secondary
8
// Licenses when the conditions for such availability set forth in the Eclipse
9
// Public License 2.0 are satisfied: GNU General Public License, version 2
10
// or later which is available at
11
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
/****************************************************************************/
14
/// @file GNEAdditionalSquared.h
15
/// @author Pablo Alvarez Lopez
16
/// @date Oct 2025
17
///
18
// A abstract class for representation of additional squared elements
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <utils/gui/images/GUITextureSubSys.h>
24
25
// ===========================================================================
26
// class declaration
27
// ===========================================================================
28
29
class GNEAdditional;
30
class GNEMoveElementView;
31
32
// ===========================================================================
33
// class definitions
34
// ===========================================================================
35
36
class GNEAdditionalSquared {
37
38
public:
39
/// @brief default constructor
40
GNEAdditionalSquared(GNEAdditional* additional);
41
42
/// @brief parameter constructor
43
GNEAdditionalSquared(GNEAdditional* additional, const Position pos);
44
45
/// @brief destructor
46
~GNEAdditionalSquared();
47
48
private:
49
/// @brief pointer to additional
50
GNEAdditional* myAdditional;
51
52
protected:
53
/// @brief position over view
54
Position myPosOverView;
55
56
/// @brief move element over view
57
GNEMoveElementView* myMoveElementView = nullptr;
58
59
/// @brief updated squared geometry
60
void updatedSquaredGeometry();
61
62
/// @brief updated squared centering boundary
63
void updatedSquaredCenteringBoundary(const bool updateGrid);
64
65
/// @brief draw squared additional
66
void drawSquaredAdditional(const GUIVisualizationSettings& s, const double size,
67
GUITexture texture, GUITexture selectedTexture) const;
68
69
private:
70
/// @brief Invalidated copy constructor.
71
GNEAdditionalSquared(const GNEAdditionalSquared&) = delete;
72
73
/// @brief Invalidated assignment operator.
74
GNEAdditionalSquared& operator=(const GNEAdditionalSquared&) = delete;
75
};
76
77