Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEProhibitionFrame.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-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// The Widget for remove network-elements
19/****************************************************************************/
20#pragma once
21#include <config.h>
23
24// ===========================================================================
25// class declarations
26// ===========================================================================
27class GNEConnection;
29
30// ===========================================================================
31// class definitions
32// ===========================================================================
38
39public:
40
47
48 // ===========================================================================
49 // class RelativeToConnection
50 // ===========================================================================
51
53
54 public:
56 RelativeToConnection(GNEProhibitionFrame* prohibitionFrameParent);
57
60
62 void updateDescription() const;
63
64 private:
67
70 };
71
72 // ===========================================================================
73 // class Legend
74 // ===========================================================================
75
76 class Legend : public MFXGroupBoxModule {
77
78 public:
80 Legend(GNEProhibitionFrame* prohibitionFrameParent);
81
83 ~Legend();
84
86 const RGBColor& getUndefinedColor() const;
87
89 const RGBColor& getProhibitedColor() const;
90
92 const RGBColor& getProhibitingColor() const;
93
96
98 const RGBColor& getMutualConflictColor() const;
99
100 private:
103
106
109
112
115 };
116
117 // ===========================================================================
118 // class Selection (in the future will be "Modification")
119 // ===========================================================================
120
124
125 public:
127 Selection(GNEProhibitionFrame* prohibitionFrameParent);
128
130 ~Selection();
131
134
136 long onCmdOK(FXObject*, FXSelector, void*);
137
139 long onCmdCancel(FXObject*, FXSelector, void*);
140
142 long onCmdRequireConnection(FXObject*, FXSelector, void*);
143
145
146 protected:
148 FOX_CONSTRUCTOR(Selection)
149
150 private:
153
156
159 };
160
165 GNEProhibitionFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
166
169
174
176 void show();
177
179 void hide();
180
183
184protected:
186 FOX_CONSTRUCTOR(GNEProhibitionFrame)
187
188
189 void buildProhibition(GNEConnection* conn, bool mayDefinitelyPass, bool allowConflict, bool toggle);
190
191private:
194
197
200
203
205 std::set<GNEConnection*> myConcernedConns;
206};
const RGBColor & getProhibitingColor() const
get color for connections with precedence
RGBColor myUndefinedColor
color for non-conflicting pairs of connections
const RGBColor & getProhibitedColor() const
get color for waiting connections
RGBColor myMutualConflictColor
color for mutual conflicts
const RGBColor & getUndefinedColor() const
get color for non-conflicting pairs of connections
RGBColor myProhibitedColor
color for waiting connections
RGBColor myUnregulatedConflictColor
color for unregulated conflicts
const RGBColor & getMutualConflictColor() const
get color for mutual conflicts
const RGBColor & getUnregulatedConflictColor() const
get color for unregulated conflicts
RGBColor myProhibitingColor
color for connections with precedence
FXLabel * myConnDescriptionLabel
the label that shows the currently selected connection
void updateDescription() const
update description
GNEProhibitionFrame * myProhibitionFrameParent
pointer to prohibition frame parent
MFXButtonTooltip * mySaveButton
"Save" button
MFXButtonTooltip * myCancelButton
"Cancel" button
long onCmdOK(FXObject *, FXSelector, void *)
Called when the user presses the OK-Button saves any prohibition modifications.
GNEProhibitionFrame * myProhibitionFrameParent
FOX needs this.
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any prohibition modifications.
long onCmdRequireConnection(FXObject *, FXSelector, void *)
Called when the user presses the OK-Button saves any prohibition modifications.
GNEProhibitionFrame::Selection * mySelectionModul
Selection.
GNEProhibitionFrame::Legend * myLegend
prohibition legend
void handleProhibitionClick(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
handle prohibitions and set the relative coloring
RelativeToConnection * myRelativeToConnection
Relative To Connection.
ConnStatus
the prohibition status of a connection
void hide()
hide prohibition frame
GNEConnection * myCurrentConn
the connection which prohibits
GNEProhibitionFrame::Selection * getSelectionModul() const
get selection module
void show()
show prohibition frame
void buildProhibition(GNEConnection *conn, bool mayDefinitelyPass, bool allowConflict, bool toggle)
FOX needs this.
std::set< GNEConnection * > myConcernedConns
the set of connections which
class used to group all variables related with objects under cursor after a click over view
A single child window which contains a view of the simulation area.
MFXGroupBoxModule (based on FXGroupBox)