Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEPathLegendModule.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 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// Frame for path legends
19/****************************************************************************/
20#include <config.h>
21
22#include <netedit/GNEViewNet.h>
25
26#include "GNEPathLegendModule.h"
27
28
29// ===========================================================================
30// method definitions
31// ===========================================================================
32
34 MFXGroupBoxModule(frameParent, TL("Information")) {
35 // declare label
36 FXLabel* legendLabel = nullptr;
37 // edge candidate
38 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge candidate"), 0, GUIDesignLabel(JUSTIFY_LEFT));
40 legendLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));
41 // last edge selected
42 legendLabel = new FXLabel(getCollapsableFrame(), TL(" last edge selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
43 legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.target));
44 // edge selected
45 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
46 legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.source));
47 // edge conflict (vClass)
48 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge conflict (vClass)"), 0, GUIDesignLabel(JUSTIFY_LEFT));
50 // edge disconnected
51 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge disconnected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
53}
54
55
57
58
59void
63
64void
68
69/****************************************************************************/
#define GUIDesignLabel(justify)
Definition GUIDesigns.h:243
#define TL(string)
Definition MsgHandler.h:315
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:150
void hidePathLegendModule()
hide Legend modul
void showPathLegendModule()
show Legend modul
GNEPathLegendModule(GNEFrame *frameParent)
constructor
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition MFXUtils.cpp:112
static const RGBColor WHITE
Definition RGBColor.h:192
static const RGBColor special
color for selected special candidate element (Usually selected using shift+click)
static const RGBColor conflict
color for selected conflict candidate element (Usually selected using ctrl+click)
static const RGBColor target
color for selected candidate target
static const RGBColor possible
color for possible candidate element
static const RGBColor source
color for selected candidate source