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 
59  void handleProhibitionClick(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor);
60 
62  void show();
63 
65  void hide();
66 
70  long onCmdOK(FXObject*, FXSelector, void*);
71 
73  long onCmdCancel(FXObject*, FXSelector, void*);
74 
75 protected:
78 
79 private:
81  enum ConnStatus {
85  };
86 
88  void buildProhibition(GNEConnection* conn, bool mayDefinitelyPass, bool allowConflict, bool toggle);
89 
91  FXGroupBox* myGroupBoxDescription;
92 
95 
97  FXGroupBox* myGroupBoxLegend;
98 
100  FXLabel* mySelectedLabel;
101 
104 
107 
110 
112  FXButton* myCancelButton;
113 
115  //FXButton* mySaveButton;
116 
119 
121  std::set<GNEConnection*> myConcernedConns;
122 
125 
128 
131 
134 
137 
140 
142  void updateDescription() const;
143 };
144 
145 
146 #endif
147 
148 /****************************************************************************/
149 
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
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.
void handleProhibitionClick(const GNEViewNet::ObjectsUnderCursor &objectsUnderCursor)
handle prohibitions and set the relative colouring
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
void buildProhibition(GNEConnection *conn, bool mayDefinitelyPass, bool allowConflict, bool toggle)
build prohibition