SUMO - Simulation of Urban MObility
GNEProhibitionFrame.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // The Widget for remove network-elements
16 /****************************************************************************/
17 #ifndef GNEProhibitionFrame_h
18 #define GNEProhibitionFrame_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include "GNEFrame.h"
26 
27 // ===========================================================================
28 // class declarations
29 // ===========================================================================
30 class GNEConnection;
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
40 class GNEProhibitionFrame : public GNEFrame {
41 
43  FXDECLARE(GNEProhibitionFrame)
44 
45 public:
46 
51  GNEProhibitionFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
52 
55 
57  void handleConnectionClick(GNEConnection* conn, bool mayDefinitelyPass, bool allowConflict, bool toggle);
58 
60  void show();
61 
63  void hide();
64 
68  long onCmdOK(FXObject*, FXSelector, void*);
69 
71  long onCmdCancel(FXObject*, FXSelector, void*);
72 
73 protected:
76 
77 private:
78 
80  enum ConnStatus {
84  };
85 
87  FXGroupBox* myGroupBoxDescription;
88 
91 
93  FXGroupBox* myGroupBoxLegend;
94 
96  FXLabel* mySelectedLabel;
97 
99  FXLabel* myUndefinedLabel;
100 
103 
106 
108  FXButton* myCancelButton;
109 
111  //FXButton* mySaveButton;
112 
115 
117  std::set<GNEConnection*> myConcernedConns;
118 
121 
124 
127 
130 
133 
136 
137 private:
139  void updateDescription() const;
140 };
141 
142 
143 #endif
144 
145 /****************************************************************************/
146 
void show()
show prohibition frame
FXGroupBox * myGroupBoxDescription
Groupbox for description.
static RGBColor undefinedColor
color for non-conflicting pairs of connections
static RGBColor mutualConflictColor
color for mutual conflicts
static RGBColor unregulatedConflictColor
color for unregulated conflicts
void updateDescription() const
update description
std::set< GNEConnection * > myConcernedConns
the set of connections which
FXLabel * myProhibitingLabel
"prohibiting" label
FXGroupBox * myGroupBoxLegend
group box for legend
static RGBColor prohibitingColor
color for connections with precedence
void handleConnectionClick(GNEConnection *conn, bool mayDefinitelyPass, bool allowConflict, bool toggle)
handle prohibitions and set teh relative colouring
GNEConnection * myCurrentConn
"OK" button
FXLabel * myConnDescriptionLabel
the label that shows the currently selected connection
GNEProhibitionFrame()
FOX needs this.
FXButton * myCancelButton
"Cancel" button
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any prohibition modifications.
FXLabel * mySelectedLabel
selected connection label
ConnStatus
the prohibition status of a connection
FXLabel * myUndefinedLabel
"undefined" yielding label
long onCmdOK(FXObject *, FXSelector, void *)
~GNEProhibitionFrame()
Destructor.
static RGBColor selectedColor
color for selected connection whose prohibition shall be shown
static RGBColor prohibitedColor
color for waiting connections
FXLabel * myProhibitedLabel
"prohibited" label
void hide()
hide prohibition frame