60 FXIMPLEMENT(
GNEProhibitionFrame, FXVerticalFrame, GNEProhibitionFrameMap, ARRAYNUMBER(GNEProhibitionFrameMap))
77 GNEFrame(horizontalFrameParent, viewNet,
"Prohibits"), myCurrentConn(0) {
114 myCancelButton =
new FXButton(
this,
"Cancel\t\tDiscard prohibition modifications (Esc)",
137 for (
auto conn : allConns) {
143 bool foes = node->
foes(currentConnFrom, currentConnTo, otherConnFrom, otherConnTo);
144 bool forbids = node->
forbids(currentConnFrom, currentConnTo, otherConnFrom, otherConnTo,
true);
145 bool forbidden = node->
forbids(otherConnFrom, otherConnTo, currentConnFrom, currentConnTo,
true);
152 if (forbids && forbidden) {
154 }
else if (forbids) {
156 }
else if (forbidden) {
192 conn->setSpecialColor(0);
196 myConcernedConns.clear();
std::vector< GNEConnection * > getGNEConnections() const
Returns all GNEConnections vinculated with this junction.
void show()
show prohibition frame
bool foes(const NBEdge *const from1, const NBEdge *const to1, const NBEdge *const from2, const NBEdge *const to2) const
Returns the information whether the given flows cross.
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
static const RGBColor WHITE
FXDEFMAP(GNEProhibitionFrame) GNEProhibitionFrameMap[]
The representation of a single edge during network building.
FXGroupBox * myGroupBoxDescription
Groupbox for description.
static const RGBColor ORANGE
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 setSpecialColor(const RGBColor *Color2)
GNEEdge * getEdgeTo() const
get the name of the edge the vehicles may reach when leaving "from"
GNELane * getLaneFrom() const
get lane of the incoming lane
GNEViewNet * myViewNet
View Net for changes.
void updateDescription() const
update description
std::set< GNEConnection * > myConcernedConns
the set of connections which
FXLabel * myProhibitingLabel
"prohibiting" label
static const RGBColor GREY
FXGroupBox * myGroupBoxLegend
group box for legend
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
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
GNELane * getLaneTo() const
get lane of the outgoing lane
GNEEdge * getEdgeFrom() const
get the name of the edge the vehicles leave
GNEConnection * myCurrentConn
"OK" button
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
FXLabel * myConnDescriptionLabel
the label that shows the currently selected connection
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
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
FXLabel * myUndefinedLabel
"undefined" yielding label
long onCmdOK(FXObject *, FXSelector, void *)
static const RGBColor RED
named colors
~GNEProhibitionFrame()
Destructor.
virtual void show()
show Frame
static const RGBColor CYAN
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
bool forbids(const NBEdge *const possProhibitorFrom, const NBEdge *const possProhibitorTo, const NBEdge *const possProhibitedFrom, const NBEdge *const possProhibitedTo, bool regardNonSignalisedLowerPriority) const
Returns the information whether "prohibited" flow must let "prohibitor" flow pass.
static const RGBColor selectedConnectionColor
color of selected connection
virtual void hide()
hide Frame
static RGBColor selectedColor
color for selected connection whose prohibition shall be shown
static RGBColor prohibitedColor
color for waiting connections
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Represents a single node (junction) during network building.
NBEdge * getNBEdge()
returns the internal NBEdge
NBNode * getNBNode() const
Return net build node.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXLabel * myProhibitedLabel
"prohibited" label
void hide()
hide prohibition frame