Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEAdditionalListed.h
Go to the documentation of this file.
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
/****************************************************************************/
18
// A abstract class for representation of additional listed elements
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include <
netedit/elements/GNEContour.h
>
24
#include <
utils/gui/images/GUITextureSubSys.h
>
25
26
// ===========================================================================
27
// class declaration
28
// ===========================================================================
29
30
class
GNEAdditional
;
31
32
// ===========================================================================
33
// class definitions
34
// ===========================================================================
35
36
class
GNEAdditionalListed
{
37
38
public
:
40
GNEAdditionalListed
(
GNEAdditional
* additional);
41
42
protected
:
44
void
updateGeometryListedAdditional
();
45
47
void
drawListedAdditional
(
const
GUIVisualizationSettings
& s,
const
RGBColor
baseCol,
const
RGBColor
textCol,
48
GUITexture
texture,
const
std::string text)
const
;
49
51
Position
getListedPositionInView
()
const
;
52
54
int
getDrawPositionIndex
()
const
;
55
56
private
:
58
GNEAdditional
*
myAdditional
;
59
62
64
const
double
lineLenght
= 1;
65
67
const
double
lineWidth
= 0.05;
68
70
const
double
shapeWidth
= 6;
71
73
const
double
shapeHeight
= 0.5;
74
76
const
double
ySeparation
= 0.1;
77
79
const
double
padding
= 0.02;
80
82
const
double
iconPadding
= 0.05;
83
85
87
int
myDrawPositionIndex
= 0;
88
90
GUIGeometry
myInternalRectangle
;
91
93
GUIGeometry
myLineGeometry
;
94
96
Position
myIconPosition
;
97
99
double
myIconSize
= 0;
100
102
Position
myTextPosition
;
103
105
std::string
adjustListedAdditionalText
(
const
std::string& text)
const
;
106
108
GNEAdditionalListed
(
const
GNEAdditionalListed
&) =
delete
;
109
111
GNEAdditionalListed
&
operator=
(
const
GNEAdditionalListed
&) =
delete
;
112
};
GNEContour.h
GUITextureSubSys.h
GUITexture
GUITexture
An enumeration of gifs used by the gui applications.
Definition
GUITextures.h:31
GNEAdditional
Definition
GNEAdditional.h:42
GNEAdditionalListed::GNEAdditionalListed
GNEAdditionalListed(const GNEAdditionalListed &)=delete
Invalidated copy constructor.
GNEAdditionalListed::GNEAdditionalListed
GNEAdditionalListed(GNEAdditional *additional)
default constructor
Definition
GNEAdditionalListed.cpp:33
GNEAdditionalListed::drawListedAdditional
void drawListedAdditional(const GUIVisualizationSettings &s, const RGBColor baseCol, const RGBColor textCol, GUITexture texture, const std::string text) const
draw listed additional
Definition
GNEAdditionalListed.cpp:75
GNEAdditionalListed::getListedPositionInView
Position getListedPositionInView() const
get listed position in view
Definition
GNEAdditionalListed.cpp:135
GNEAdditionalListed::ySeparation
const double ySeparation
Y separation.
Definition
GNEAdditionalListed.h:76
GNEAdditionalListed::myDrawPositionIndex
int myDrawPositionIndex
draw position index
Definition
GNEAdditionalListed.h:87
GNEAdditionalListed::myLineGeometry
GUIGeometry myLineGeometry
vector with line geometry
Definition
GNEAdditionalListed.h:93
GNEAdditionalListed::shapeHeight
const double shapeHeight
shapeHeight
Definition
GNEAdditionalListed.h:73
GNEAdditionalListed::myTextPosition
Position myTextPosition
text position
Definition
GNEAdditionalListed.h:102
GNEAdditionalListed::iconPadding
const double iconPadding
icon padding
Definition
GNEAdditionalListed.h:82
GNEAdditionalListed::myIconPosition
Position myIconPosition
sign position
Definition
GNEAdditionalListed.h:96
GNEAdditionalListed::myAdditional
GNEAdditional * myAdditional
pointer to additional
Definition
GNEAdditionalListed.h:58
GNEAdditionalListed::padding
const double padding
padding between internal and external rectangle
Definition
GNEAdditionalListed.h:79
GNEAdditionalListed::myInternalRectangle
GUIGeometry myInternalRectangle
internal rectangle
Definition
GNEAdditionalListed.h:90
GNEAdditionalListed::lineWidth
const double lineWidth
line width
Definition
GNEAdditionalListed.h:67
GNEAdditionalListed::getDrawPositionIndex
int getDrawPositionIndex() const
get draw position index
Definition
GNEAdditionalListed.cpp:141
GNEAdditionalListed::updateGeometryListedAdditional
void updateGeometryListedAdditional()
update geometry of listed additional
Definition
GNEAdditionalListed.cpp:39
GNEAdditionalListed::myIconSize
double myIconSize
icon size
Definition
GNEAdditionalListed.h:99
GNEAdditionalListed::shapeWidth
const double shapeWidth
shape width
Definition
GNEAdditionalListed.h:70
GNEAdditionalListed::adjustListedAdditionalText
std::string adjustListedAdditionalText(const std::string &text) const
adjust listed additional text
Definition
GNEAdditionalListed.cpp:160
GNEAdditionalListed::lineLenght
const double lineLenght
line offset (must be divisible by 2)
Definition
GNEAdditionalListed.h:64
GNEAdditionalListed::operator=
GNEAdditionalListed & operator=(const GNEAdditionalListed &)=delete
Invalidated assignment operator.
GUIGeometry
Definition
GUIGeometry.h:31
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition
GUIVisualizationSettings.h:587
Position
A point in 2D or 3D with translation and scaling methods.
Definition
Position.h:37
RGBColor
Definition
RGBColor.h:38
src
netedit
elements
additional
GNEAdditionalListed.h
Generated on
for Eclipse SUMO - Simulation of Urban MObility by
1.15.0