Eclipse SUMO - Simulation of Urban MObility
GNEPathLegend.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 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 "GNEPathLegend.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(), " edge candidate", 0, GUIDesignLabelLeft);
40 legendLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));
41 // last edge selected
42 legendLabel = new FXLabel(getCollapsableFrame(), " last edge selected", 0, GUIDesignLabelLeft);
43 legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.target));
44 // edge selected
45 legendLabel = new FXLabel(getCollapsableFrame(), " edge selected", 0, GUIDesignLabelLeft);
46 legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.source));
47 // edge conflict (vClass)
48 legendLabel = new FXLabel(getCollapsableFrame(), " edge conflict (vClass)", 0, GUIDesignLabelLeft);
50 // edge disconnected
51 legendLabel = new FXLabel(getCollapsableFrame(), " edge disconnected", 0, GUIDesignLabelLeft);
53}
54
55
57
58
59void
61 show();
62}
63
64void
66 hide();
67}
68
69/****************************************************************************/
#define GUIDesignLabelLeft
Definition: GUIDesigns.h:217
#define TL(string)
Definition: MsgHandler.h:282
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:150
GNEM_PathLegend(GNEFrame *frameParent)
constructor
void showPathLegendModule()
show Legend modul
void hidePathLegendModule()
hide Legend modul
~GNEM_PathLegend()
destructor
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