Eclipse SUMO - Simulation of Urban MObility
GNECrossingFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 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 add Crossing elements
16 /****************************************************************************/
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
26 #include <netedit/GNENet.h>
27 #include <netedit/GNEViewNet.h>
31 #include <netedit/GNEUndoList.h>
32 
33 #include "GNECrossingFrame.h"
34 
35 
36 // ===========================================================================
37 // FOX callback mapping
38 // ===========================================================================
39 
40 FXDEFMAP(GNECrossingFrame::EdgesSelector) EdgesSelectorMap[] = {
44 };
45 
46 FXDEFMAP(GNECrossingFrame::CrossingParameters) CrossingParametersMap[] = {
49 };
50 
51 FXDEFMAP(GNECrossingFrame::CreateCrossing) CreateCrossingMap[] = {
53 };
54 
55 // Object implementation
56 FXIMPLEMENT(GNECrossingFrame::EdgesSelector, FXGroupBox, EdgesSelectorMap, ARRAYNUMBER(EdgesSelectorMap))
57 FXIMPLEMENT(GNECrossingFrame::CrossingParameters, FXGroupBox, CrossingParametersMap, ARRAYNUMBER(CrossingParametersMap))
58 FXIMPLEMENT(GNECrossingFrame::CreateCrossing, FXGroupBox, CreateCrossingMap, ARRAYNUMBER(CreateCrossingMap))
59 
60 
61 // ===========================================================================
62 // method definitions
63 // ===========================================================================
64 
65 // ---------------------------------------------------------------------------
66 // GNECrossingFrame::CurrentJunction - methods
67 // ---------------------------------------------------------------------------
68 
70  FXGroupBox(crossingFrameParent->myContentFrame, "Junction", GUIDesignGroupBoxFrame) {
71  // create junction label
72  myCurrentJunctionLabel = new FXLabel(this, "No junction selected", 0, GUIDesignLabelLeft);
73 }
74 
75 
77 
78 
79 void
81  if (junctionID.empty()) {
82  myCurrentJunctionLabel->setText("No junction selected");
83  } else {
84  myCurrentJunctionLabel->setText((std::string("Current Junction: ") + junctionID).c_str());
85  }
86 }
87 
88 // ---------------------------------------------------------------------------
89 // GNECrossingFrame::EdgesSelector - methods
90 // ---------------------------------------------------------------------------
91 
93  FXGroupBox(crossingFrameParent->myContentFrame, ("selection of " + toString(SUMO_TAG_EDGE) + "s").c_str(), GUIDesignGroupBoxFrame),
94  myCrossingFrameParent(crossingFrameParent),
95  myCurrentJunction(nullptr) {
96 
97  // Create button for selected edges
98  myUseSelectedEdges = new FXButton(this, ("Use selected " + toString(SUMO_TAG_EDGE) + "s").c_str(), nullptr, this, MID_GNE_ADDITIONALFRAME_USESELECTED, GUIDesignButton);
99 
100  // Create button for clear selection
101  myClearEdgesSelection = new FXButton(this, ("Clear " + toString(SUMO_TAG_EDGE) + "s").c_str(), nullptr, this, MID_GNE_ADDITIONALFRAME_CLEARSELECTION, GUIDesignButton);
102 
103  // Create button for invert selection
104  myInvertEdgesSelection = new FXButton(this, ("Invert " + toString(SUMO_TAG_EDGE) + "s").c_str(), nullptr, this, MID_GNE_ADDITIONALFRAME_INVERTSELECTION, GUIDesignButton);
105 }
106 
107 
109 
110 
113  return myCurrentJunction;
114 }
115 
116 
117 void
119  // restore color of all lanes of edge candidates
121  // Set current junction
122  myCurrentJunction = currentJunction;
123  // Update view net to show the new colors
125  // check if use selected eges must be enabled
126  myUseSelectedEdges->disable();
127  for (auto i : myCurrentJunction->getGNEEdges()) {
128  if (i->isAttributeCarrierSelected()) {
129  myUseSelectedEdges->enable();
130  }
131  }
132  // Enable rest of elements
133  myClearEdgesSelection->enable();
134  myInvertEdgesSelection->enable();
135 }
136 
137 
138 void
140  // disable current junction
141  myCurrentJunction = nullptr;
142  // disable all elements of the EdgesSelector
143  myUseSelectedEdges->disable();
144  myClearEdgesSelection->disable();
145  myInvertEdgesSelection->disable();
146  // Disable crossing parameters
148 }
149 
150 
151 void
153  if (myCurrentJunction != nullptr) {
154  // restore color of all lanes of edge candidates
155  for (auto i : myCurrentJunction->getGNEEdges()) {
156  for (auto j : i->getLanes()) {
157  j->setSpecialColor(nullptr);
158  }
159  }
160  // Update view net to show the new colors
162  myCurrentJunction = nullptr;
163  }
164 }
165 
166 
167 long
170  return 1;
171 }
172 
173 
174 long
177  return 1;
178 }
179 
180 
181 long
184  return 1;
185 }
186 
187 // ---------------------------------------------------------------------------
188 // GNECrossingFrame::NeteditAttributes- methods
189 // ---------------------------------------------------------------------------
190 
192  FXGroupBox(crossingFrameParent->myContentFrame, "Crossing parameters", GUIDesignGroupBoxFrame),
193  myCrossingFrameParent(crossingFrameParent),
194  myCurrentParametersValid(true) {
195  FXHorizontalFrame* crossingParameter = nullptr;
196  // create label and string textField for edges
197  crossingParameter = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
198  myCrossingEdgesLabel = new FXLabel(crossingParameter, toString(SUMO_ATTR_EDGES).c_str(), nullptr, GUIDesignLabelAttribute);
199  myCrossingEdges = new FXTextField(crossingParameter, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
200  myCrossingEdgesLabel->disable();
201  myCrossingEdges->disable();
202  // create label and checkbox for Priority
203  crossingParameter = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
204  myCrossingPriorityLabel = new FXLabel(crossingParameter, toString(SUMO_ATTR_PRIORITY).c_str(), nullptr, GUIDesignLabelAttribute);
205  myCrossingPriorityCheckButton = new FXCheckButton(crossingParameter, "", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
206  myCrossingPriorityLabel->disable();
208  // create label and textfield for width
209  crossingParameter = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
210  myCrossingWidthLabel = new FXLabel(crossingParameter, toString(SUMO_ATTR_WIDTH).c_str(), nullptr, GUIDesignLabelAttribute);
211  myCrossingWidth = new FXTextField(crossingParameter, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextFieldReal);
212  myCrossingWidthLabel->disable();
213  myCrossingWidth->disable();
214  // Create help button
215  myHelpCrossingAttribute = new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular);
216  myHelpCrossingAttribute->disable();
217 }
218 
219 
221 
222 
223 void
225  // obtain Tag Values
226  const auto& tagProperties = GNEAttributeCarrier::getTagProperties(SUMO_TAG_CROSSING);
227  // Enable all elements of the crossing frames
228  myCrossingEdgesLabel->enable();
229  myCrossingEdges->enable();
230  myCrossingPriorityLabel->enable();
231  if (hasTLS) {
233  } else {
235  }
236  myCrossingWidthLabel->enable();
237  myCrossingWidth->enable();
238  myHelpCrossingAttribute->enable();
239  // set values of parameters
240  onCmdSetAttribute(nullptr, 0, nullptr);
241  myCrossingPriorityCheckButton->setCheck(hasTLS ? true :
242  GNEAttributeCarrier::parse<bool>(tagProperties.getDefaultValue(SUMO_ATTR_PRIORITY)));
243  myCrossingWidth->setText(tagProperties.getDefaultValue(SUMO_ATTR_WIDTH).c_str());
244  myCrossingWidth->setTextColor(FXRGB(0, 0, 0));
245 }
246 
247 
248 void
250  // clear all values of parameters
251  myCrossingEdges->setText("");
252  myCrossingPriorityCheckButton->setCheck(false);
253  myCrossingPriorityCheckButton->setText("false");
254  myCrossingWidth->setText("");
255  // Disable all elements of the crossing frames
256  myCrossingEdgesLabel->disable();
257  myCrossingEdges->disable();
258  myCrossingPriorityLabel->disable();
260  myCrossingWidthLabel->disable();
261  myCrossingWidth->disable();
262  myHelpCrossingAttribute->disable();
264 }
265 
266 
267 bool
269  return myCrossingEdgesLabel->isEnabled();
270 }
271 
272 
273 void
276  if (currentJunction != nullptr) {
277  // Check if edge belongs to junction's edge
278  if (std::find(currentJunction->getGNEEdges().begin(), currentJunction->getGNEEdges().end(), edge) != currentJunction->getGNEEdges().end()) {
279  // Update text field with the new edge
280  std::vector<std::string> crossingEdges = GNEAttributeCarrier::parse<std::vector<std::string> > (myCrossingEdges->getText().text());
281  // Check if new edge must be added or removed
282  std::vector<std::string>::iterator itFinder = std::find(crossingEdges.begin(), crossingEdges.end(), edge->getID());
283  if (itFinder == crossingEdges.end()) {
284  crossingEdges.push_back(edge->getID());
285  } else {
286  crossingEdges.erase(itFinder);
287  }
288  myCrossingEdges->setText(joinToString(crossingEdges, " ").c_str());
289  }
290  // Update colors and attributes
291  onCmdSetAttribute(nullptr, 0, nullptr);
292  }
293 }
294 
295 
296 void
298  myCrossingEdges->setText("");
299  // Update colors and attributes
300  onCmdSetAttribute(nullptr, 0, nullptr);
301 }
302 
303 
304 void
306  std::vector<std::string> crossingEdges;
307  for (auto i : parentJunction->getGNEEdges()) {
308  if (std::find(myCurrentSelectedEdges.begin(), myCurrentSelectedEdges.end(), i) == myCurrentSelectedEdges.end()) {
309  crossingEdges.push_back(i->getID());
310  }
311  }
312  myCrossingEdges->setText(joinToString(crossingEdges, " ").c_str());
313  // Update colors and attributes
314  onCmdSetAttribute(nullptr, 0, nullptr);
315 }
316 
317 
318 void
320  std::vector<std::string> crossingEdges;
321  for (auto i : parentJunction->getGNEEdges()) {
322  if (i->isAttributeCarrierSelected()) {
323  crossingEdges.push_back(i->getID());
324  }
325  }
326  myCrossingEdges->setText(joinToString(crossingEdges, " ").c_str());
327  // Update colors and attributes
328  onCmdSetAttribute(nullptr, 0, nullptr);
329 }
330 
331 
332 std::vector<NBEdge*>
334  std::vector<NBEdge*> NBEdgeVector;
335  // Iterate over myCurrentSelectedEdges
336  for (auto i : myCurrentSelectedEdges) {
337  NBEdgeVector.push_back(i->getNBEdge());
338  }
339  return NBEdgeVector;
340 }
341 
342 
343 bool
345  if (myCrossingPriorityCheckButton->getCheck()) {
346  return true;
347  } else {
348  return false;
349  }
350 }
351 
352 
353 bool
356 }
357 
358 
359 double
361  return GNEAttributeCarrier::parse<double>(myCrossingWidth->getText().text());
362 }
363 
364 
365 long
368  // get string vector with the edges
369  std::vector<std::string> crossingEdges = GNEAttributeCarrier::parse<std::vector<std::string> > (myCrossingEdges->getText().text());
370  // Clear selected edges
371  myCurrentSelectedEdges.clear();
372  // iterate over vector of edge IDs
373  for (auto i : crossingEdges) {
376  // Check that edge exists and belongs to Junction
377  if (edge == nullptr) {
378  myCurrentParametersValid = false;
379  } else if (std::find(currentJunction->getGNEEdges().begin(), currentJunction->getGNEEdges().end(), edge) == currentJunction->getGNEEdges().end()) {
380  myCurrentParametersValid = false;
381  } else {
382  // select or unselected edge
383  auto itFinder = std::find(myCurrentSelectedEdges.begin(), myCurrentSelectedEdges.end(), edge);
384  if (itFinder == myCurrentSelectedEdges.end()) {
385  myCurrentSelectedEdges.push_back(edge);
386  } else {
387  myCurrentSelectedEdges.erase(itFinder);
388  }
389  }
390  }
391 
392  // change color of textfield dependig of myCurrentParametersValid
394  myCrossingEdges->setTextColor(FXRGB(0, 0, 0));
395  myCrossingEdges->killFocus();
396  } else {
397  myCrossingEdges->setTextColor(FXRGB(255, 0, 0));
398  myCurrentParametersValid = false;
399  }
400 
401  // Update colors of edges
403  if (std::find(myCurrentSelectedEdges.begin(), myCurrentSelectedEdges.end(), i) != myCurrentSelectedEdges.end()) {
404  for (auto j : i->getLanes()) {
406  }
407  } else {
408  for (auto j : i->getLanes()) {
409  j->setSpecialColor(&myCrossingFrameParent->getEdgeCandidateColor());
410  }
411  }
412  }
413  // Update view net
415 
416  // Check that at least there are a selected edge
417  if (crossingEdges.empty()) {
418  myCurrentParametersValid = false;
419  }
420 
421  // change label of crossing priority
422  if (myCrossingPriorityCheckButton->getCheck()) {
423  myCrossingPriorityCheckButton->setText("true");
424  } else {
425  myCrossingPriorityCheckButton->setText("false");
426  }
427 
428  // Check width
429  if (GNEAttributeCarrier::canParse<double>(myCrossingWidth->getText().text()) &&
430  GNEAttributeCarrier::parse<double>(myCrossingWidth->getText().text()) > 0) {
431  myCrossingWidth->setTextColor(FXRGB(0, 0, 0));
432  myCrossingWidth->killFocus();
433  } else {
434  myCrossingWidth->setTextColor(FXRGB(255, 0, 0));
435  myCurrentParametersValid = false;
436  }
437 
438  // Enable or disable create crossing button depending of the current parameters
440  return 0;
441 }
442 
443 
444 long
445 GNECrossingFrame::CrossingParameters::onCmdHelp(FXObject*, FXSelector, void*) {
447  return 1;
448 }
449 
450 // ---------------------------------------------------------------------------
451 // GNECrossingFrame::CreateCrossing - methods
452 // ---------------------------------------------------------------------------
453 
455  FXGroupBox(crossingFrameParent->myContentFrame, "Create", GUIDesignGroupBoxFrame),
456  myCrossingFrameParent(crossingFrameParent) {
457  // Create groupbox for create crossings
458  myCreateCrossingButton = new FXButton(this, "Create crossing", 0, this, MID_GNE_CREATE, GUIDesignButton);
459  myCreateCrossingButton->disable();
460 }
461 
462 
464 
465 
466 long
468  // First check that current parameters are valid
470  // iterate over junction's crossing to find duplicated crossings
472  // create new crossing
477  -1, -1,
479  false, true), true);
480  // clear selected edges
482  } else {
483  WRITE_WARNING("There is already another crossing with the same edges in the junction; Duplicated crossing aren't allowed.");
484  }
485  }
486  return 1;
487 }
488 
489 
490 void
492  if (value) {
493  myCreateCrossingButton->enable();
494  } else {
495  myCreateCrossingButton->disable();
496  }
497 }
498 
499 // ---------------------------------------------------------------------------
500 // GNECrossingFrame - methods
501 // ---------------------------------------------------------------------------
502 
503 GNECrossingFrame::GNECrossingFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) :
504  GNEFrame(horizontalFrameParent, viewNet, "Crossings") {
505  // create CurrentJunction modul
507 
508  // Create edge Selector modul
509  myEdgeSelector = new EdgesSelector(this);
510 
511  // Create CrossingParameters modul
513 
514  // create CreateCrossing modul
515  myCreateCrossing = new CreateCrossing(this);
516 
517  // Create groupbox and labels for legends
518  FXGroupBox* groupBoxLegend = new FXGroupBox(myContentFrame, "Legend", GUIDesignGroupBoxFrame);
519  FXLabel* colorCandidateLabel = new FXLabel(groupBoxLegend, "Candidate", 0, GUIDesignLabelLeft);
520  colorCandidateLabel->setBackColor(MFXUtils::getFXColor(getEdgeCandidateColor()));
521  FXLabel* colorSelectedLabel = new FXLabel(groupBoxLegend, "Selected", 0, GUIDesignLabelLeft);
522  colorSelectedLabel->setBackColor(MFXUtils::getFXColor(getEdgeCandidateSelectedColor()));
523 
524  // disable edge selector
526 }
527 
528 
530 }
531 
532 
533 void
535  // restore color of all lanes of edge candidates
537  // hide frame
538  GNEFrame::hide();
539 }
540 
541 
542 void
544  // If current element is a junction
545  if (objectsUnderCursor.getJunctionFront()) {
546  // change label
548  // Enable edge selector and crossing parameters
549  myEdgeSelector->enableEdgeSelector(objectsUnderCursor.getJunctionFront());
551  // clears selected edges
553  } else if (objectsUnderCursor.getEdgeFront()) {
554  // mark edge
555  myCrossingParameters->markEdge(objectsUnderCursor.getEdgeFront());
556  } else {
557  // set default label
559  // restore color of all lanes of edge candidates
561  // Disable edge selector
563  }
564  // always update view after an operation
565  myViewNet->update();
566 }
567 
568 
569 void
572  // simply call onCmdCreateCrossing of CreateCrossing modul
574  }
575 }
576 
577 /****************************************************************************/
static const PositionVector EMPTY
empty Vector
const RGBColor & getEdgeCandidateColor() const
get edge candidate color
Definition: GNEFrame.cpp:264
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
clear selection of elements
Definition: GUIAppEnum.h:773
void invertEdges(GNEJunction *parentJunction)
invert edges
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
Definition: GNENet.cpp:1020
FXLabel * myCrossingPriorityLabel
Label for Priority.
invert selection of eleents
Definition: GUIAppEnum.h:775
bool isCurrentParametersValid() const
check if current parameters are valid
void update() const
Mark the entire GNEViewNet to be repainted later.
Definition: GNEViewNet.cpp:292
GNECrossingFrame * myCrossingFrameParent
pointer to GNECrossingFrame parent
bool isCrossingParametersEnabled() const
check if currently the CrossingParameters is enabled
void markEdge(GNEEdge *edge)
mark or dismark edge
GNECrossingFrame::CurrentJunction * myCurrentJunction
current junction modul
FXLabel * myCurrentJunctionLabel
Label for current Junction.
FXLabel * myCrossingWidthLabel
Label for width.
GNECrossingFrame * myCrossingFrameParent
pointer to GNECrossingFrame parent
FXButton * myCreateCrossingButton
FXButton for create Crossing
const RGBColor & getEdgeCandidateSelectedColor() const
get selected color
Definition: GNEFrame.cpp:270
void updateCurrentJunctionLabel(const std::string &junctionID)
set current junction label
std::vector< NBEdge * > getCrossingEdges() const
get crossing NBedges
FXButton * myHelpCrossingAttribute
button for help
GNEJunction * myCurrentJunction
current Junction
const std::vector< GNEEdge * > & getGNEEdges() const
Returns all GNEEdges vinculated with this Junction.
long onCmdSetAttribute(FXObject *, FXSelector, void *)
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:133
void enableEdgeSelector(GNEJunction *currentJunction)
enable edgeSelector
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:239
void hide()
hide crossing frame
GNEJunction * getCurrentJunction() const
get current junction
GNECrossingFrame::EdgesSelector * myEdgeSelector
edge selector modul
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:120
void enableCrossingParameters(bool hasTLS)
enable crossing parameters and set the default value of parameters
FXTextField * myCrossingEdges
TextField for edges.
bool isTLControlled() const
Returns whether this node is controlled by any tls.
Definition: NBNode.h:317
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:933
bool getCrossingPriority() const
get crossing priority
C++ TraCI client API implementation.
FXButton * myInvertEdgesSelection
button for invert selection
#define GUIDesignTextField
Definition: GUIDesigns.h:34
the edges of a route
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:123
void disableEdgeSelector()
disable edgeSelector
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn&#39;t)
help button
Definition: GUIAppEnum.h:536
long onCmdUseSelectedEdges(FXObject *, FXSelector, void *)
#define GUIDesignCheckButton
checkButton placed in left position
Definition: GUIDesigns.h:131
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
Definition: GUIDesigns.h:289
void setCreateCrossingButton(bool value)
enable or disable button create crossing
long onCmdCreateCrossing(FXObject *, FXSelector, void *)
class used to group all variables related with objects under cursor after a click over view ...
FXButton * myClearEdgesSelection
button for clear selection
FXButton * myUseSelectedEdges
CheckBox for selected edges.
FXTextField * myCrossingWidth
TextField for width.
void createCrossingHotkey()
create crossing (used when user press ENTER key in Crossing mode)
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn&#39;t)
FXLabel * myCrossingEdgesLabel
Label for edges.
const std::string getID() const
function to support debugging
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
~GNECrossingFrame()
Destructor.
GNECrossingFrame::CrossingParameters * myCrossingParameters
crossing parameters modul
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons) ...
Definition: GUIDesigns.h:72
begin/end of the description of an edge
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
void useSelectedEdges(GNEJunction *parentJunction)
use selected eges
GNECrossingFrame::CreateCrossing * myCreateCrossing
create crossing modul
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:58
FXCheckButton * myCrossingPriorityCheckButton
CheckBox for Priority.
#define GUIDesignButton
Definition: GUIDesigns.h:66
bool checkCrossingDuplicated(EdgeVector edges)
return true if there already exist a crossing with the same edges as the input
Definition: NBNode.cpp:2404
void restoreEdgeColors()
restore colors of all edges
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:255
void disableCrossingParameters()
disable crossing parameters and clear parameters
GNECrossingFrame * myCrossingFrameParent
pointer to crossingFrame parent
GNECrossingFrame()
FOX needs this.
crossing between edges for pedestrians
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:927
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to doubles/floats
Definition: GUIDesigns.h:40
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:114
bool myCurrentParametersValid
flag to check if current parameters are valid
attribute edited
Definition: GUIAppEnum.h:619
use selected elements
Definition: GUIAppEnum.h:769
void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const
Open help attributes dialog.
Definition: GNEFrame.cpp:197
#define GUIDesignLabelLeft
Definition: GUIDesigns.h:165
std::vector< GNEEdge * > myCurrentSelectedEdges
current selected edges
create element
Definition: GUIAppEnum.h:621
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame and height of 23
Definition: GUIDesigns.h:186
NBNode * getNBNode() const
Return net build node.
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
void addCrossing(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add Crossing element
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:247
double getCrossingWidth() const
get crossing width
FXDEFMAP(GNECrossingFrame::EdgesSelector) EdgesSelectorMap[]