SUMO - Simulation of Urban MObility
GNEConnectorFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2011-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 modifying lane-to-lane connections
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 #include <iostream>
32 #include <netedit/GNEViewParent.h>
33 #include <netedit/GNEViewNet.h>
34 #include <netedit/GNEUndoList.h>
35 #include <netedit/GNENet.h>
41 
42 #include "GNEInspectorFrame.h"
43 #include "GNEConnectorFrame.h"
44 #include "GNESelectorFrame.h"
45 
46 
47 // ===========================================================================
48 // FOX callback mapping
49 // ===========================================================================
50 FXDEFMAP(GNEConnectorFrame) GNEConnectorFrameMap[] = {
51  FXMAPFUNC(SEL_COMMAND, MID_CANCEL, GNEConnectorFrame::onCmdCancel),
52  FXMAPFUNC(SEL_COMMAND, MID_OK, GNEConnectorFrame::onCmdOK),
59 };
60 
61 // Object implementation
62 FXIMPLEMENT(GNEConnectorFrame, FXVerticalFrame, GNEConnectorFrameMap, ARRAYNUMBER(GNEConnectorFrameMap))
63 
64 // ===========================================================================
65 // static members
66 // ===========================================================================
72 
73 // ===========================================================================
74 // method definitions
75 // ===========================================================================
76 GNEConnectorFrame::GNEConnectorFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet):
77  GNEFrame(horizontalFrameParent, viewNet, "Edit Connections"),
78  myCurrentLane(0) {
79  // Create groupbox for lane information
81 
82  // Create label for lane description and update it
85 
86  // Create GroupBox for Buttons
87  myGroupBoxModifications = new FXGroupBox(myContentFrame, "Modifications", GUIDesignGroupBoxFrame);
88 
89  // Create "Cancel" button
90  myCancelButton = new FXButton(myGroupBoxModifications, "Cancel\t\tDiscard connection modifications (Esc)",
92  // Create "OK" button
93  mySaveButton = new FXButton(myGroupBoxModifications, "OK\t\tSave connection modifications (Enter)",
95 
96  // Create groupbox for operations
97  myGroupBoxOperations = new FXGroupBox(myContentFrame, "Operations", GUIDesignGroupBoxFrame);
98 
99  // Create "Select Dead Ends" button
100  mySelectDeadEndsButton = new FXButton(myGroupBoxOperations, "Select Dead Ends\t\tSelects all lanes that have no outgoing connection (clears previous selection)",
102  // Create "Select Dead Starts" button
103  mySelectDeadStartsButton = new FXButton(myGroupBoxOperations, "Select Dead Starts\t\tSelects all lanes that have no incoming connection (clears previous selection)",
105  // Create "Select Conflicts" button
106  mySelectConflictsButton = new FXButton(myGroupBoxOperations, "Select Conflicts\t\tSelects all lanes with more than one incoming connection from the same edge (clears previous selection)",
108  // Create "Select Edges which may always pass" button
109  mySelectPassingButton = new FXButton(myGroupBoxOperations, "Select Passing\t\tSelects all lanes with a connection that has has the 'pass' attribute set",
111  // Create "Clear Selected" button
112  myClearSelectedButton = new FXButton(myGroupBoxOperations, "Clear Selected\t\tClears all connections of all selected objects",
114  // Create "Reset Selected" button
115  myResetSelectedButton = new FXButton(myGroupBoxOperations, "Reset Selected\nJunctions\t\tRecomputes connections at all selected junctions",
117 
118  // Create groupbox for selection hints
119  myGroupBoxSelection = new FXGroupBox(myContentFrame, "Selection", GUIDesignGroupBoxFrame);
120 
121  // Selection Hint
122  myHoldShiftLabel = new FXLabel(myGroupBoxSelection, "Hold <SHIFT> while clicking\nto create unyielding\nconnections (pass=true).", 0, GUIDesignLabelFrameInformation);
123  myHoldControlLabel = new FXLabel(myGroupBoxSelection, "Hold <CTRL> while clicking\nto create conflicting\nconnections (i.e. at zipper nodes\nor with incompatible permissions)", 0, GUIDesignLabelFrameInformation);
124 
125  // init colors here to avoid static order fiasco (https://isocpp.org/wiki/faq/ctors#static-init-order)
127  potentialTargetColor = RGBColor(0, 64, 0, 255);
131 
132 
133  // create groupbox for legend
134  myGroupBoxLegend = new FXGroupBox(myContentFrame, "Legend", GUIDesignGroupBoxFrame);
135 
136  // create source label
137  mySourceLabel = new FXLabel(myGroupBoxLegend, "Source", 0, GUIDesignLabelLeft);
139 
140  // create target label
141  myTargetLabel = new FXLabel(myGroupBoxLegend, "Target", 0, GUIDesignLabelLeft);
143 
144  // create possible target label
145  myPossibleTargetLabel = new FXLabel(myGroupBoxLegend, "Possible Target", 0, GUIDesignLabelLeft);
147 
148  // create target (pass) label
149  myTargetPassLabel = new FXLabel(myGroupBoxLegend, "Target (pass)", 0, GUIDesignLabelLeft);
151 
152  // create conflict label
153  myConflictLabel = new FXLabel(myGroupBoxLegend, "Conflict", 0, GUIDesignLabelLeft);
155 }
156 
157 
159 
160 
161 void
162 GNEConnectorFrame::handleLaneClick(GNELane* lane, bool mayDefinitelyPass, bool allowConflict, bool toggle) {
163  if (myCurrentLane == 0) {
164  myCurrentLane = lane;
166  initTargets();
167  myNumChanges = 0;
168  myViewNet->getUndoList()->p_begin("modify " + toString(SUMO_TAG_CONNECTION) + "s");
169  } else if (myPotentialTargets.count(lane)
170  || (allowConflict && lane->getParentEdge().getGNEJunctionSource() == myCurrentLane->getParentEdge().getGNEJunctionDestiny())) {
171  const int fromIndex = myCurrentLane->getIndex();
172  GNEEdge& srcEdge = myCurrentLane->getParentEdge();
173  GNEEdge& destEdge = lane->getParentEdge();
174  std::vector<NBEdge::Connection> connections = srcEdge.getNBEdge()->getConnectionsFromLane(fromIndex);
175  bool changed = false;
176  LaneStatus status = getLaneStatus(connections, lane);
177  if (status == CONFLICTED && allowConflict) {
178  status = UNCONNECTED;
179  }
180  switch (status) {
181  case UNCONNECTED:
182  if (toggle) {
183  // create new connection
184  NBEdge::Connection newCon(fromIndex, destEdge.getNBEdge(), lane->getIndex(), mayDefinitelyPass);
185  // if the connection was previously deleted (by clicking the same lane twice), restore all values
187  // fromLane must be the same, only check toLane
188  if (c.toEdge == destEdge.getNBEdge() && c.toLane == lane->getIndex()) {
189  newCon = c;
190  }
191  }
192  NBConnection newNBCon(srcEdge.getNBEdge(), fromIndex, destEdge.getNBEdge(), lane->getIndex(), newCon.tlLinkIndex);
193  myViewNet->getUndoList()->add(new GNEChange_Connection(&srcEdge, newCon, false, true), true);
194  lane->setSpecialColor(mayDefinitelyPass ? &targetPassColor : &targetColor);
196  }
197  break;
198  case CONNECTED:
199  case CONNECTED_PASS: {
200  // remove connection
201  GNEConnection* con = srcEdge.retrieveGNEConnection(fromIndex, destEdge.getNBEdge(), lane->getIndex());
202  myDeletedConnections.push_back(con->getNBEdgeConnection());
205  changed = true;
206  break;
207  }
208  case CONFLICTED:
209  SVCPermissions fromPermissions = srcEdge.getNBEdge()->getPermissions(fromIndex);
210  SVCPermissions toPermissions = destEdge.getNBEdge()->getPermissions(lane->getIndex());
211  if ((fromPermissions & toPermissions) == SVC_PEDESTRIAN) {
212  myViewNet->setStatusBarText("Pedestrian connections are generated automatically");
213  } else if ((fromPermissions & toPermissions) == 0) {
214  myViewNet->setStatusBarText("Incompatible vehicle class permissions");
215  } else {
216  myViewNet->setStatusBarText("Another lane from the same edge already connects to that lane");
217  }
218  break;
219  }
220  if (changed) {
221  myNumChanges += 1;
222  }
223  } else {
224  myViewNet->setStatusBarText("Invalid target for " + toString(SUMO_TAG_CONNECTION));
225  }
227 }
228 
229 
230 long
231 GNEConnectorFrame::onCmdCancel(FXObject*, FXSelector, void*) {
232  if (myCurrentLane != 0) {
234  if (myNumChanges) {
235  myViewNet->setStatusBarText("Changes reverted");
236  }
237  cleanup();
238  myViewNet->update();
239  }
240  return 1;
241 }
242 
243 
244 long
245 GNEConnectorFrame::onCmdOK(FXObject*, FXSelector, void*) {
246  if (myCurrentLane != 0) {
248  if (myNumChanges) {
249  myViewNet->setStatusBarText("Changes accepted");
250  }
251  cleanup();
252  myViewNet->update();
253  }
254  return 1;
255 }
256 
257 
258 long
259 GNEConnectorFrame::onCmdSelectDeadEnds(FXObject*, FXSelector, void*) {
260  std::vector<GNEAttributeCarrier*> deadEnds;
261  // every edge knows its outgoing connections so we can look at each edge in isolation
262  const std::vector<GNEEdge*> edges = myViewNet->getNet()->retrieveEdges();
263  for (auto i : edges) {
264  for (auto j : i->getLanes()) {
265  if (i->getNBEdge()->getConnectionsFromLane(j->getIndex()).size() == 0) {
266  deadEnds.push_back(j);
267  }
268  }
269  }
271  return 1;
272 }
273 
274 
275 long
276 GNEConnectorFrame::onCmdSelectDeadStarts(FXObject*, FXSelector, void*) {
277  std::vector<GNEAttributeCarrier*> deadStarts;
278  // every edge knows only its outgoing connections so we look at whole junctions
279  const std::vector<GNEJunction*> junctions = myViewNet->getNet()->retrieveJunctions();
280  for (auto i : junctions) {
281  // first collect all outgoing lanes
282  for (auto j : i->getNBNode()->getOutgoingEdges()) {
283  GNEEdge* edge = myViewNet->getNet()->retrieveEdge(j->getID());
284  for (auto k : edge->getLanes()) {
285  deadStarts.push_back(k);
286  }
287  }
288  // then remove all approached lanes
289  for (auto j : i->getNBNode()->getIncomingEdges()) {
290  GNEEdge* edge = myViewNet->getNet()->retrieveEdge(j->getID());
291  for (auto k : edge->getNBEdge()->getConnections()) {
292  deadStarts.push_back(myViewNet->getNet()->retrieveEdge(k.toEdge->getID())->getLanes()[k.toLane]);
293  }
294  }
295  }
297  return 1;
298 }
299 
300 
301 long
302 GNEConnectorFrame::onCmdSelectConflicts(FXObject*, FXSelector, void*) {
303  std::vector<GNEAttributeCarrier*> conflicts;
304  // conflicts happen per edge so we can look at each edge in isolation
305  const std::vector<GNEEdge*> edges = myViewNet->getNet()->retrieveEdges();
306  for (auto i : edges) {
307  const EdgeVector destinations = i->getNBEdge()->getConnectedEdges();
308  for (auto j : destinations) {
309  GNEEdge* dest = myViewNet->getNet()->retrieveEdge(j->getID());
310  for (auto k : dest->getLanes()) {
311  const bool isConflicted = count_if(i->getNBEdge()->getConnections().begin(), i->getNBEdge()->getConnections().end(),
312  NBEdge::connections_toedgelane_finder(j, (int)(k)->getIndex(), -1)) > 1;
313  if (isConflicted) {
314  conflicts.push_back(k);
315  }
316  }
317  }
318 
319  }
321  return 1;
322 }
323 
324 
325 long
326 GNEConnectorFrame::onCmdSelectPass(FXObject*, FXSelector, void*) {
327  std::vector<GNEAttributeCarrier*> pass;
328  const std::vector<GNEEdge*> edges = myViewNet->getNet()->retrieveEdges();
329  for (auto i : edges) {
330  for (auto j : i->getNBEdge()->getConnections()) {
331  if (j.mayDefinitelyPass) {
332  pass.push_back(i->getLanes()[j.fromLane]);
333  }
334  }
335  }
337  return 1;
338 }
339 
340 
341 long
343  onCmdCancel(0, 0, 0);
344  myViewNet->getUndoList()->p_begin("clear connections from selected lanes, edges and " + toString(SUMO_TAG_JUNCTION) + "s");
345  // clear junction's connection
346  auto junctions = myViewNet->getNet()->retrieveJunctions(true);
347  for (auto i : junctions) {
348  i->setLogicValid(false, myViewNet->getUndoList()); // clear connections
349  i->setLogicValid(false, myViewNet->getUndoList(), GNEAttributeCarrier::FEATURE_MODIFIED); // prevent re-guessing
350  }
351  // clear edge's connection
352  auto edges = myViewNet->getNet()->retrieveEdges(true);
353  for (auto i : edges) {
354  for (auto j : i->getLanes()) {
356  }
357  }
358  // clear lane's connection
359  auto lanes = myViewNet->getNet()->retrieveLanes(true);
360  for (auto i : lanes) {
361  removeConnections(dynamic_cast<GNELane*>(i));
362  }
364  return 1;
365 }
366 
367 
368 void
370  handleLaneClick(lane, false, false, true); // select as current lane
371  for (auto i : myPotentialTargets) {
372  handleLaneClick(i, false, false, false); // deselect
373  }
374  onCmdOK(0, 0, 0); // save
375 }
376 
377 
378 long
380  onCmdCancel(0, 0, 0);
381  myViewNet->getUndoList()->p_begin("reset connections from selected lanes");
382  auto junctions = myViewNet->getNet()->retrieveJunctions(true);
383  for (auto i : junctions) {
384  i->setLogicValid(false, myViewNet->getUndoList());
385  }
387  return 1;
388 }
389 
390 
391 void
393  if (myCurrentLane == 0) {
394  myLaneDescriptionLabel->setText("No Lane Selected\n");
395  } else {
396  myLaneDescriptionLabel->setText(("Lane id: " + myCurrentLane->getMicrosimID() + "\nNumber of changes: " + toString(myNumChanges)).c_str());
397  }
398 }
399 
400 
401 void
403  // gather potential targets
405 
406  const EdgeVector& outgoing = nbn->getOutgoingEdges();
407  for (EdgeVector::const_iterator it = outgoing.begin(); it != outgoing.end(); it++) {
408  GNEEdge* edge = myViewNet->getNet()->retrieveEdge((*it)->getID());
409  const GNEEdge::LaneVector& lanes = edge->getLanes();
410  for (GNEEdge::LaneVector::const_iterator it_lane = lanes.begin(); it_lane != lanes.end(); it_lane++) {
411  myPotentialTargets.insert(*it_lane);
412  }
413  }
414  // set color for existing connections
415  const int fromIndex = myCurrentLane->getIndex();
417  std::vector<NBEdge::Connection> connections = srcEdge->getConnectionsFromLane(fromIndex);
418  for (std::set<GNELane*>::iterator it = myPotentialTargets.begin(); it != myPotentialTargets.end(); it++) {
419  switch (getLaneStatus(connections, *it)) {
420  case CONNECTED:
421  (*it)->setSpecialColor(&targetColor);
422  break;
423  case CONNECTED_PASS:
424  (*it)->setSpecialColor(&targetPassColor);
425  break;
426  case CONFLICTED:
427  (*it)->setSpecialColor(&conflictColor);
428  break;
429  case UNCONNECTED:
430  (*it)->setSpecialColor(&potentialTargetColor);
431  break;
432  }
433  }
434 }
435 
436 
437 void
439  // clean up
440  for (std::set<GNELane*>::iterator it = myPotentialTargets.begin(); it != myPotentialTargets.end(); it++) {
441  (*it)->setSpecialColor(0);
442  }
443  myPotentialTargets.clear();
444  myNumChanges = 0;
446  myCurrentLane = 0;
447  myDeletedConnections.clear();
449 }
450 
451 
453 GNEConnectorFrame::getLaneStatus(const std::vector<NBEdge::Connection>& connections, GNELane* targetLane) {
455  const int fromIndex = myCurrentLane->getIndex();
456  NBEdge* destEdge = targetLane->getParentEdge().getNBEdge();
457  const int toIndex = targetLane->getIndex();
458  std::vector<NBEdge::Connection>::const_iterator con_it = find_if(
459  connections.begin(), connections.end(),
460  NBEdge::connections_finder(fromIndex, destEdge, toIndex));
461  const bool isConnected = con_it != connections.end();
462  if (isConnected) {
463  if (con_it->mayDefinitelyPass) {
464  return CONNECTED_PASS;
465  } else {
466  return CONNECTED;
467  }
468  } else if (srcEdge->hasConnectionTo(destEdge, toIndex)
469  || (srcEdge->getPermissions(fromIndex) & destEdge->getPermissions(toIndex) & ~SVC_PEDESTRIAN) == 0) {
470  return CONFLICTED;
471  } else {
472  return UNCONNECTED;
473  }
474 }
475 
476 
477 /****************************************************************************/
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
Definition: GNENet.cpp:1107
static const std::string FEATURE_MODIFIED
feature has been manually modified (implies approval)
static RGBColor targetColor
color for the to-lane of a connection
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
Definition: GNENet.cpp:1059
A structure which describes a connection between edges or lanes.
Definition: NBEdge.h:160
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
Definition: GNENet.cpp:915
is a pedestrian
select lanes that have no connection leading to it
Definition: GUIAppEnum.h:567
begin/end of the description of a junction
FXButton * mySelectPassingButton
"Select Edges which may always pass"
void handleIDs(const std::vector< GNEAttributeCarrier *> &ACs, ModificationMode::SetOperation setop=ModificationMode::SET_DEFAULT)
apply list of ids to the current selection according to SetOperation,
long onCmdSelectDeadStarts(FXObject *, FXSelector, void *)
FXLabel * myHoldShiftLabel
Selection Hint.
static const NBConnection InvalidConnection
Definition: NBConnection.h:121
long onCmdSelectPass(FXObject *, FXSelector, void *)
FXLabel * myHoldControlLabel
hold control label
connectio between two lanes
GNEViewParent * getViewParent() const
get the net object
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
The representation of a single edge during network building.
Definition: NBEdge.h:65
std::vector< GNELane * > LaneVector
Definition of the lane&#39;s vector.
Definition: GNEEdge.h:58
FXGroupBox * myGroupBoxSelection
groupbox for selection hints
FXGroupBox * myGroupBoxModifications
GroupBox for Buttons.
std::set< GNELane * > myPotentialTargets
the set of lanes to which the current lane may be connected
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
Definition: GNENet.cpp:564
long onCmdClearSelectedConnections(FXObject *, FXSelector, void *)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:47
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
Definition: GNEUndoList.cpp:78
FXGroupBox * myGroupBoxLegend
group box for legend
FXDEFMAP(GNEConnectorFrame) GNEConnectorFrameMap[]
FXGroupBox * myGroupBoxDescription
Groupbox for description.
FXLabel * myConflictLabel
conflict label
const EdgeVector & getOutgoingEdges() const
Returns this node&#39;s outgoing edges (The edges which start at this node)
Definition: NBNode.h:254
GNEViewNet * myViewNet
View Net for changes.
Definition: GNEFrame.h:232
LaneStatus getLaneStatus(const std::vector< NBEdge::Connection > &connections, GNELane *targetLane)
return the status of toLane
NBEdge::Connection & getNBEdgeConnection() const
get Edge::Connection
std::vector< Connection > getConnectionsFromLane(int lane) const
Returns connections from a given lane.
Definition: NBEdge.cpp:1085
static RGBColor potentialTargetColor
color for potential to-lane targets (currently unconnected)
void handleLaneClick(GNELane *lane, bool mayDefinitelyPass, bool allowConflict, bool toggle)
either sets the current lane or toggles the connection of the current lane to this lane (if they shar...
long onCmdSelectConflicts(FXObject *, FXSelector, void *)
select lanes with connections that have the pass attribute set to &#39;true&#39;
Definition: GUIAppEnum.h:571
GNEUndoList * getUndoList() const
get the undoList object
int getIndex() const
returns the index of the lane
Definition: GNELane.cpp:767
static const RGBColor GREEN
Definition: RGBColor.h:173
int myNumChanges
number of changes
FXGroupBox * myGroupBoxOperations
groupbox for operations
void initTargets()
init targets
GNEConnectorFrame()
FOX needs this.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:49
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:235
GNEEdge & getParentEdge()
Returns underlying parent edge.
Definition: GNELane.cpp:1298
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
Definition: GNEUndoList.cpp:85
void removeConnections(GNELane *lane)
remove connections
bool hasConnectionTo(NBEdge *destEdge, int destLane, int fromLane=-1) const
Retrieves info about a connection to a certain lane of a certain edge.
Definition: NBEdge.cpp:1126
FXButton * myResetSelectedButton
"Reset Selected"
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
Definition: GNEEdge.cpp:453
GNEConnection * retrieveGNEConnection(int fromLane, NBEdge *to, int toLane, bool createIfNoExist=true)
get GNEConnection if exist, and if not create it if create is enabled
Definition: GNEEdge.cpp:1523
static RGBColor sourceColor
color for the from-lane of a connection
FXLabel * myTargetLabel
target label
static const RGBColor MAGENTA
Definition: RGBColor.h:177
FXButton * mySelectDeadStartsButton
"Select Dead Starts" button
static RGBColor targetPassColor
color for the to-lane of a connection with pass attribute
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
FXLabel * myPossibleTargetLabel
possible target label
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:184
GNEJunction * getGNEJunctionSource() const
returns the source-junction
Definition: GNEEdge.cpp:447
FXButton * mySelectConflictsButton
"Select Conflicts" button
void p_abort()
reverts and discards ALL active command groups
Definition: GNEUndoList.cpp:99
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
Definition: NBEdge.cpp:3299
std::vector< NBEdge::Connection > myDeletedConnections
vector of connections deleted in the current editing step
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
long onCmdOK(FXObject *, FXSelector, void *)
select lanes that are connected from concurrent lanes
Definition: GUIAppEnum.h:569
static const RGBColor YELLOW
Definition: RGBColor.h:175
#define GUIDesignButton
Definition: GUIDesigns.h:54
static RGBColor conflictColor
color for a to-lane that cannot be used because another connection conflicts
FXButton * mySaveButton
"OK" button
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
Definition: GNEEdge.cpp:832
static const RGBColor CYAN
Definition: RGBColor.h:176
FXButton * myCancelButton
"Cancel" button
const std::vector< Connection > & getConnections() const
Returns the connections.
Definition: NBEdge.h:865
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
Definition: GNENet.cpp:1046
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:227
FXLabel * mySourceLabel
source label
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition: NBCont.h:34
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any connection modifications.
void setSpecialColor(const RGBColor *Color2)
Definition: GNELane.cpp:1038
FXLabel * myLaneDescriptionLabel
the label that shows the current editing state
Ok-button pressed.
Definition: GUIAppEnum.h:56
Cancel-button pressed.
Definition: GUIAppEnum.h:58
LaneStatus
the status of a target lane
GNENet * getNet() const
get the net object
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:114
Represents a single node (junction) during network building.
Definition: NBNode.h:68
long onCmdSelectDeadEnds(FXObject *, FXSelector, void *)
Called when the user presses the Corresponding-button.
void setStatusBarText(const std::string &text)
set staturBar text
Definition: GNEViewNet.cpp:331
GNELane * myCurrentLane
the lane of which connections are to be modified
~GNEConnectorFrame()
Destructor.
#define GUIDesignLabelLeft
Definition: GUIDesigns.h:145
FXLabel * myTargetPassLabel
target pass label
NBEdge * getNBEdge()
returns the internal NBEdge
Definition: GNEEdge.cpp:586
FXButton * myClearSelectedButton
"Clear Selected"
NBNode * getNBNode() const
Return net build node.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
void cleanup()
clean up when deselecting current lane
Clear set.
Definition: GUIAppEnum.h:352
Reset set.
Definition: GUIAppEnum.h:354
FXButton * mySelectDeadEndsButton
"Select Dead Ends" button
void updateDescription() const
update description
void invalidateTLS(GNEUndoList *undoList, const NBConnection &deletedConnection=NBConnection::InvalidConnection, const NBConnection &addedConnection=NBConnection::InvalidConnection)
long onCmdResetSelectedConnections(FXObject *, FXSelector, void *)