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
25
26// ===========================================================================
27// class declaration
28// ===========================================================================
29
30class GNEAdditional;
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
37
38public:
41
42protected:
45
47 void drawListedAdditional(const GUIVisualizationSettings& s, const RGBColor baseCol, const RGBColor textCol,
48 GUITexture texture, const std::string text) const;
49
52
54 int getDrawPositionIndex() const;
55
56private:
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
88
91
94
97
99 double myIconSize = 0;
100
103
105 std::string adjustListedAdditionalText(const std::string& text) const;
106
109
112};
GUITexture
An enumeration of gifs used by the gui applications.
Definition GUITextures.h:31
GNEAdditionalListed(const GNEAdditionalListed &)=delete
Invalidated copy constructor.
GNEAdditionalListed(GNEAdditional *additional)
default constructor
void drawListedAdditional(const GUIVisualizationSettings &s, const RGBColor baseCol, const RGBColor textCol, GUITexture texture, const std::string text) const
draw listed additional
Position getListedPositionInView() const
get listed position in view
const double ySeparation
Y separation.
int myDrawPositionIndex
draw position index
GUIGeometry myLineGeometry
vector with line geometry
const double shapeHeight
shapeHeight
Position myTextPosition
text position
const double iconPadding
icon padding
Position myIconPosition
sign position
GNEAdditional * myAdditional
pointer to additional
const double padding
padding between internal and external rectangle
GUIGeometry myInternalRectangle
internal rectangle
const double lineWidth
line width
int getDrawPositionIndex() const
get draw position index
void updateGeometryListedAdditional()
update geometry of listed additional
double myIconSize
icon size
const double shapeWidth
shape width
std::string adjustListedAdditionalText(const std::string &text) const
adjust listed additional text
const double lineLenght
line offset (must be divisible by 2)
GNEAdditionalListed & operator=(const GNEAdditionalListed &)=delete
Invalidated assignment operator.
Stores the information about how to visualize structures.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37