SUMO - Simulation of Urban MObility
GNEAdditionalFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #ifdef _MSC_VER
25 #include <windows_config.h>
26 #else
27 #include <config.h>
28 #endif
29 
30 #ifdef HAVE_VERSION_H
31 #include <version.h>
32 #endif
33 
34 #include <iostream>
38 #include <utils/common/TplCheck.h>
45 
46 #include "GNEAdditionalFrame.h"
47 #include "GNEViewNet.h"
48 #include "GNEViewParent.h"
49 #include "GNENet.h"
50 #include "GNEJunction.h"
51 #include "GNEEdge.h"
52 #include "GNELane.h"
53 #include "GNECrossing.h"
54 #include "GNEUndoList.h"
55 #include "GNEChange_Selection.h"
56 #include "GNEAttributeCarrier.h"
57 #include "GNEChange_Additional.h"
58 #include "GNEAdditional.h"
59 #include "GNEAdditionalHandler.h"
60 
61 #ifdef CHECK_MEMORY_LEAKS
62 #include <foreign/nvwa/debug_new.h>
63 #endif // CHECK_MEMORY_LEAKS
64 
65 
66 // ===========================================================================
67 // FOX callback mapping
68 // ===========================================================================
69 
70 FXDEFMAP(GNEAdditionalFrame) GNEAdditionalMap[] = {
72 };
73 
74 FXDEFMAP(GNEAdditionalFrame::singleAdditionalParameter) GNEsingleAdditionalParameterMap[] = {
77 };
78 
79 FXDEFMAP(GNEAdditionalFrame::singleAdditionalParameterList) GNEsingleAdditionalParameterListMap[] = {
82 };
83 
84 FXDEFMAP(GNEAdditionalFrame::additionalParameters) GNEadditionalParametersMap[] = {
86 };
87 
88 FXDEFMAP(GNEAdditionalFrame::editorParameters) GNEEditorParametersMap[] = {
92 };
93 
94 FXDEFMAP(GNEAdditionalFrame::additionalParentSelector) GNEadditionalParentSelectorMap[] = {
97 };
98 
99 FXDEFMAP(GNEAdditionalFrame::edgeParentsSelector) GNEedgeParentsSelectorMap[] = {
106 };
107 
108 FXDEFMAP(GNEAdditionalFrame::laneParentsSelector) GNElaneParentsSelectorMap[] = {
115 };
116 
117 // Object implementation
118 FXIMPLEMENT(GNEAdditionalFrame, FXVerticalFrame, GNEAdditionalMap, ARRAYNUMBER(GNEAdditionalMap))
119 FXIMPLEMENT(GNEAdditionalFrame::singleAdditionalParameter, FXMatrix, GNEsingleAdditionalParameterMap, ARRAYNUMBER(GNEsingleAdditionalParameterMap))
120 FXIMPLEMENT(GNEAdditionalFrame::singleAdditionalParameterList, FXMatrix, GNEsingleAdditionalParameterListMap, ARRAYNUMBER(GNEsingleAdditionalParameterListMap))
121 FXIMPLEMENT(GNEAdditionalFrame::additionalParameters, FXGroupBox, GNEadditionalParametersMap, ARRAYNUMBER(GNEadditionalParametersMap))
122 FXIMPLEMENT(GNEAdditionalFrame::editorParameters, FXGroupBox, GNEEditorParametersMap, ARRAYNUMBER(GNEEditorParametersMap))
123 FXIMPLEMENT(GNEAdditionalFrame::additionalParentSelector, FXGroupBox, GNEadditionalParentSelectorMap, ARRAYNUMBER(GNEadditionalParentSelectorMap))
124 FXIMPLEMENT(GNEAdditionalFrame::edgeParentsSelector, FXGroupBox, GNEedgeParentsSelectorMap, ARRAYNUMBER(GNEedgeParentsSelectorMap))
125 FXIMPLEMENT(GNEAdditionalFrame::laneParentsSelector, FXGroupBox, GNElaneParentsSelectorMap, ARRAYNUMBER(GNElaneParentsSelectorMap))
126 
127 // ===========================================================================
128 // method definitions
129 // ===========================================================================
130 
131 GNEAdditionalFrame::GNEAdditionalFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet):
132  GNEFrame(horizontalFrameParent, viewNet, "Additionals"),
133  myActualAdditionalType(SUMO_TAG_NOTHING) {
134 
135  // Create groupBox for myAdditionalMatchBox
136  myGroupBoxForMyAdditionalMatchBox = new FXGroupBox(myContentFrame, "Additional element", GUIDesignGroupBoxFrame);
137 
138  // Create FXListBox in myGroupBoxForMyAdditionalMatchBox
139  myAdditionalMatchBox = new FXComboBox(myGroupBoxForMyAdditionalMatchBox, GUIDesignComboBoxNCol, this, MID_GNE_MODE_ADDITIONAL_ITEM, GUIDesignComboBox);
140 
141  // Create additional parameters
142  myadditionalParameters = new GNEAdditionalFrame::additionalParameters(myContentFrame);
143 
144  // Create editor parameter
145  myEditorParameters = new GNEAdditionalFrame::editorParameters(myContentFrame);
146 
147  // Create create list for additional Set
148  myAdditionalParentSelector = new GNEAdditionalFrame::additionalParentSelector(myContentFrame, myViewNet);
149 
151  myedgeParentsSelector = new GNEAdditionalFrame::edgeParentsSelector(myContentFrame, myViewNet);
152 
154  mylaneParentsSelector = new GNEAdditionalFrame::laneParentsSelector(myContentFrame, myViewNet);
155 
156  // Add options to myAdditionalMatchBox
157  const std::vector<SumoXMLTag>& additionalTags = GNEAttributeCarrier::allowedTags(false);
158  for (std::vector<SumoXMLTag>::const_iterator i = additionalTags.begin(); i != additionalTags.end(); i++) {
159  myAdditionalMatchBox->appendItem(toString(*i).c_str());
160  }
161 
162  // Set visible items
163  myAdditionalMatchBox->setNumVisible((int)myAdditionalMatchBox->getNumItems());
164 
165  // If there are additionals
166  if (additionalTags.size() > 0) {
167  // Set myActualAdditionalType and show
168  myActualAdditionalType = additionalTags.front();
169  setParametersOfAdditional(myActualAdditionalType);
170  }
171 }
172 
173 
176 }
177 
178 bool
180  // Declare map to keep values
181  std::map<SumoXMLAttr, std::string> valuesOfElement;
182 
184  valuesOfElement = myadditionalParameters->getAttributesAndValues();
185  } else {
186  WRITE_WARNING("Some attributes of additional '" + toString(myActualAdditionalType) + "' aren't valid.");
187  return false;
188  }
189 
190  // Declare pointer to netElements
191  GNEJunction* pointed_junction = NULL;
192  GNEEdge* pointed_edge = NULL;
193  GNELane* pointed_lane = NULL;
194  GNECrossing* pointed_crossing = NULL;
195 
196  // Check if additional should be placed over a junction
198  pointed_junction = dynamic_cast<GNEJunction*>(netElement);
199  if (pointed_junction != NULL) {
200  // Get attribute junction
201  valuesOfElement[SUMO_ATTR_JUNCTION] = pointed_junction->getID();
202  // Generate id of element based on the junction
203  valuesOfElement[SUMO_ATTR_ID] = generateID(pointed_junction);
204  } else {
205  return false;
206  }
207  }
208  // Check if additional should be placed over a edge
210  // Due a edge is composed of lanes, its neccesary check if clicked element is an lane
211  if (dynamic_cast<GNELane*>(netElement) != NULL) {
212  pointed_edge = &(dynamic_cast<GNELane*>(netElement)->getParentEdge());
213  }
214  if (pointed_edge != NULL) {
215  // Get attribute edge
216  valuesOfElement[SUMO_ATTR_EDGE] = pointed_edge->getID();
217  // Generate id of element based on the edge
218  valuesOfElement[SUMO_ATTR_ID] = generateID(pointed_edge);
219  } else {
220  return false;
221  }
222  }
223  // Check if additional should be placed over a lane
225  pointed_lane = dynamic_cast<GNELane*>(netElement);
226  if (pointed_lane != NULL) {
227  // Get attribute lane
228  valuesOfElement[SUMO_ATTR_LANE] = pointed_lane->getID();
229  // Generate id of element based on the lane
230  valuesOfElement[SUMO_ATTR_ID] = generateID(pointed_lane);
231  } else {
232  return false;
233  }
234  }
235  // Check if additional should be placed over a crossing
237  pointed_crossing = dynamic_cast<GNECrossing*>(netElement);
238  if (pointed_crossing != NULL) {
239  // Get attribute crossing
240  valuesOfElement[SUMO_ATTR_CROSSING] = pointed_crossing->getID();
241  // Generate id of element based on the crossing
242  valuesOfElement[SUMO_ATTR_ID] = generateID(pointed_crossing);
243  } else {
244  return false;
245  }
246  } else {
247  // Generate id of element
248  valuesOfElement[SUMO_ATTR_ID] = generateID(NULL);
249  }
250 
251  // Obtain position attribute
252  if (pointed_edge) {
253  // Obtain position of the mouse over edge
254  SUMOReal positionOfTheMouseOverEdge = pointed_edge->getLanes().at(0)->getShape().nearest_offset_to_point2D(parent->getPositionInformation());
255  // If element has a StartPosition and EndPosition over edge, extract attributes
257  // First check that current length is valid
259  SUMOReal startPos = setStartPosition(positionOfTheMouseOverEdge, myEditorParameters->getLenght());
260  SUMOReal endPos = setEndPosition(pointed_edge->getLanes().at(0)->getLaneShapeLenght(), positionOfTheMouseOverEdge, myEditorParameters->getLenght());
261  // Only set start position if are valid (!= -1)
262  if (startPos != -1) {
263  valuesOfElement[SUMO_ATTR_STARTPOS] = toString(startPos);
264  } else {
265  WRITE_WARNING("Additional '" + toString(myActualAdditionalType) + "' cannot be placed over edge. Attribute '" + toString(SUMO_ATTR_STARTPOS) + "' isn't valid");
266  return false;
267  }
268  // Only set end position if are valid (!= -1)
269  if (endPos != -1) {
270  valuesOfElement[SUMO_ATTR_ENDPOS] = toString(endPos);
271  } else {
272  WRITE_WARNING("Additional '" + toString(myActualAdditionalType) + "' cannot be placed over edge. Attribute '" + toString(SUMO_ATTR_ENDPOS) + "' isn't valid");
273  return false;
274  }
275  } else {
276  return false;
277  }
278  }
279  // Extract position of lane
280  valuesOfElement[SUMO_ATTR_POSITION] = toString(positionOfTheMouseOverEdge);
281  } else if (pointed_lane) {
282  // Obtain position of the mouse over lane
283  SUMOReal positionOfTheMouseOverLane = pointed_lane->getShape().nearest_offset_to_point2D(parent->getPositionInformation());
284  // If element has a StartPosition and EndPosition over lane, extract attributes
286  // First check that current length is valid
288  SUMOReal startPos = setStartPosition(positionOfTheMouseOverLane, myEditorParameters->getLenght());
289  SUMOReal endPos = setEndPosition(pointed_lane->getLaneShapeLenght(), positionOfTheMouseOverLane, myEditorParameters->getLenght());
290  // Only set start position if are valid (!= -1)
291  if (startPos != -1) {
292  valuesOfElement[SUMO_ATTR_STARTPOS] = toString(startPos);
293  } else {
294  WRITE_WARNING("Additonal '" + toString(myActualAdditionalType) + "' cannot be placed over lane. Attribute '" + toString(SUMO_ATTR_STARTPOS) + "' isn't valid");
295  return false;
296  }
297  // Only set end position if are valid (!= -1)
298  if (endPos != -1) {
299  valuesOfElement[SUMO_ATTR_ENDPOS] = toString(endPos);
300  } else {
301  WRITE_WARNING("Additonal '" + toString(myActualAdditionalType) + "' cannot be placed over lane. Attribute '" + toString(SUMO_ATTR_ENDPOS) + "' isn't valid");
302  return false;
303  }
304  } else {
305  return false;
306  }
307  }
308  // Extract position of lane
309  valuesOfElement[SUMO_ATTR_POSITION] = toString(positionOfTheMouseOverLane);
310  } else {
311  // get position in map
312  valuesOfElement[SUMO_ATTR_POSITION] = toString(parent->getPositionInformation());
313  }
314 
315  // If additional own the attribute SUMO_ATTR_FILE but was't defined, will defined as <ID>.txt
317  valuesOfElement[SUMO_ATTR_FILE] = (valuesOfElement[SUMO_ATTR_ID] + ".txt");
318  }
319 
320  // If additional own the attribute SUMO_ATTR_OUTPUT but was't defined, will defined as <ID>.txt
322  valuesOfElement[SUMO_ATTR_OUTPUT] = (valuesOfElement[SUMO_ATTR_ID] + ".txt");
323  }
324 
325  // Save block value
327 
328  // If element belongst to an additional Set, get id of parent from myAdditionalParentSelector
332  } else {
333  WRITE_WARNING("A " + toString(SUMO_TAG_E3DETECTOR) + " must be selected before insertion of " + toString(myActualAdditionalType) + ".");
334  return false;
335  }
336  }
337 
338  // If element own a list of edgeParentsSelector as attribute
341  // Declare a vector of Id's
342  std::vector<std::string> vectorOfIds;
343  // get Selected edges
344  std::vector<GNEEdge*> selectedEdges = myViewNet->getNet()->retrieveEdges(true);
345  // Iterate over selectedEdges and getId
346  for (std::vector<GNEEdge*>::iterator i = selectedEdges.begin(); i != selectedEdges.end(); i++) {
347  vectorOfIds.push_back((*i)->getID());
348  }
349  // Set saved Ids in attribute edges
350  valuesOfElement[SUMO_ATTR_EDGES] = joinToString(vectorOfIds, " ");
351  } else {
353  }
354  // check if attribute has at least an Edge
355  if (valuesOfElement[SUMO_ATTR_EDGES] == "") {
356  WRITE_WARNING("A " + toString(myActualAdditionalType) + " must have at least one edge associated.");
357  return false;
358  }
359  }
360 
361  // If element own a list of laneParentsSelector as attribute
364  // Declare a vector of Id's
365  std::vector<std::string> vectorOfIds;
366  // get Selected lanes
367  std::vector<GNELane*> selectedLanes = myViewNet->getNet()->retrieveLanes(true);
368  // Iterate over selectedLanes and getId
369  for (std::vector<GNELane*>::iterator i = selectedLanes.begin(); i != selectedLanes.end(); i++) {
370  vectorOfIds.push_back((*i)->getID());
371  }
372  // Set saved Ids in attribute lanes
373  valuesOfElement[SUMO_ATTR_LANES] = joinToString(vectorOfIds, " ");
374  } else {
376  }
377  // check if attribute has at least a lane
378  if (valuesOfElement[SUMO_ATTR_LANES] == "") {
379  WRITE_WARNING("A " + toString(myActualAdditionalType) + " must have at least one lane associated.");
380  return false;
381  }
382  }
383 
384  // Create additional
386 }
387 
388 void
390  myViewNet->getUndoList()->p_begin("delete " + additional->getDescription());
391  myViewNet->getUndoList()->add(new GNEChange_Additional(additional, false), true);
393 }
394 
395 
396 long
397 GNEAdditionalFrame::onCmdSelectAdditional(FXObject*, FXSelector, void*) {
398  // set myActualAdditionalType
399  const std::vector<SumoXMLTag>& additionalTags = GNEAttributeCarrier::allowedTags(false);
400  for (std::vector<SumoXMLTag>::const_iterator i = additionalTags.begin(); i != additionalTags.end(); i++) {
401  if (toString(*i) == myAdditionalMatchBox->getText().text()) {
403  }
404  }
405  return 1;
406 }
407 
408 
409 void
411  // Show frame
412  GNEFrame::show();
413  // Update UseSelectedLane CheckBox
415  // Update UseSelectedLane CheckBox
417 }
418 
419 
420 void
422  // Set new actualAdditionalType
423  myActualAdditionalType = actualAdditionalType;
424  // Clear default parameters
426  // Hide lenght field and reference point
429  // Obtain attributes of actual myActualAdditionalType
430  std::vector<std::pair <SumoXMLAttr, std::string> > attrs = GNEAttributeCarrier::allowedAttributes(myActualAdditionalType);
431  // Iterate over attributes of myActualAdditionalType
432  for (std::vector<std::pair <SumoXMLAttr, std::string> >::iterator i = attrs.begin(); i != attrs.end(); i++) {
435  } else if (i->first == SUMO_ATTR_ENDPOS) {
438  }
439  }
440  // if there are parmeters, show and Recalc groupBox
443  } else {
445  }
446  // Show myAdditionalParentSelector if we're adding a Entry/Exit
449  } else {
451  }
452  // Show edgeParentsSelector if we're adding an additional that own the attribute SUMO_ATTR_EDGES
455  } else {
457  }
458  // Show laneParentsSelector if we're adding an additional that own the attribute SUMO_ATTR_LANES
461  } else {
463  }
464 }
465 
466 
467 std::string
470  if (netElement) {
471  // generate ID using netElement
472  while (myViewNet->getNet()->getAdditional(myActualAdditionalType, toString(myActualAdditionalType) + "_" + netElement->getID() + "_" + toString(additionalIndex)) != NULL) {
473  additionalIndex++;
474  }
475  return toString(myActualAdditionalType) + "_" + netElement->getID() + "_" + toString(additionalIndex);
476  } else {
477  // generate ID without netElement
478  while (myViewNet->getNet()->getAdditional(myActualAdditionalType, toString(myActualAdditionalType) + "_" + toString(additionalIndex)) != NULL) {
479  additionalIndex++;
480  }
481  return toString(myActualAdditionalType) + "_" + toString(additionalIndex);
482  }
483 }
484 
485 
486 SUMOReal
487 GNEAdditionalFrame::setStartPosition(SUMOReal positionOfTheMouseOverLane, SUMOReal lenghtOfAdditional) {
490  return positionOfTheMouseOverLane;
492  if (positionOfTheMouseOverLane - lenghtOfAdditional >= 0.01) {
493  return positionOfTheMouseOverLane - lenghtOfAdditional;
495  return 0.01;
496  } else {
497  return -1;
498  }
499  }
501  if (positionOfTheMouseOverLane - lenghtOfAdditional / 2 >= 0.01) {
502  return positionOfTheMouseOverLane - lenghtOfAdditional / 2;
504  return 0;
505  } else {
506  return -1;
507  }
508  }
509  default:
510  return -1;
511  }
512 }
513 
514 
515 SUMOReal
516 GNEAdditionalFrame::setEndPosition(SUMOReal laneLenght, SUMOReal positionOfTheMouseOverLane, SUMOReal lenghtOfAdditional) {
519  if (positionOfTheMouseOverLane + lenghtOfAdditional <= laneLenght - 0.01) {
520  return positionOfTheMouseOverLane + lenghtOfAdditional;
522  return laneLenght - 0.01;
523  } else {
524  return -1;
525  }
526  }
528  return positionOfTheMouseOverLane;
530  if (positionOfTheMouseOverLane + lenghtOfAdditional / 2 <= laneLenght - 0.01) {
531  return positionOfTheMouseOverLane + lenghtOfAdditional / 2;
533  return laneLenght - 0.01;
534  } else {
535  return -1;
536  }
537  }
538  default:
539  return -1;
540  }
541 }
542 
543 // ---------------------------------------------------------------------------
544 // GNEAdditionalFrame::singleAdditionalParameter - methods
545 // ---------------------------------------------------------------------------
546 
548  FXMatrix(parent, 4, GUIDesignMatrixAttributes),
549  myAdditionalTag(SUMO_TAG_NOTHING),
550  myAdditionalAttr(SUMO_ATTR_NOTHING),
551  myCurrentValueValid(true) {
552  // Create visual elements
553  myLabel = new FXLabel(this, "name", 0, GUIDesignLabelAttribute, 0, 0, 60, 0);
557  // Set widht of menuCheck manually
558  myMenuCheck->setWidth(20);
559  // Hide elements
560  hideParameter();
561 }
562 
563 
565 
566 
567 void
569  myAdditionalTag = additionalTag;
570  myAdditionalAttr = additionalAttr;
571  myLabel->setText(toString(myAdditionalAttr).c_str());
572  myLabel->show();
573  myTextField->setText(value.c_str());
574  myTextField->show();
575  show();
576 }
577 
578 
579 void
581  myAdditionalTag = additionalTag;
582  myAdditionalAttr = additionalAttr;
583  myLabel->setText(toString(myAdditionalAttr).c_str());
584  myLabel->show();
585  myTextField->setText(toString(value).c_str());
586  myTextField->show();
587  show();
588 }
589 
590 
591 void
593  myAdditionalTag = additionalTag;
594  myAdditionalAttr = additionalAttr;
595  myLabel->setText(toString(myAdditionalAttr).c_str());
596  myLabel->show();
597  if (isTime) {
598  myTimeSpinDial->setValue((int)value);
599  myTimeSpinDial->show();
600  } else {
601  myTextField->setText(toString(value).c_str());
602  myTextField->show();
603  }
604  show();
605 }
606 
607 
608 void
610  myAdditionalTag = additionalTag;
611  myAdditionalAttr = additionalAttr;
612  myLabel->setText(toString(myAdditionalAttr).c_str());
613  myTextField->setTextColor(FXRGB(0, 0, 0));
614  myLabel->show();
615  if (value) {
616  myMenuCheck->setCheck(true);
617  myMenuCheck->setText("True");
618  } else {
619  myMenuCheck->setCheck(false);
620  myMenuCheck->setText("False");
621  }
622  myMenuCheck->show();
623  myCurrentValueValid = true;
624  show();
625 }
626 
627 
628 void
632  myLabel->hide();
633  myTextField->hide();
634  myMenuCheck->hide();
635  myTimeSpinDial->hide();
636  hide();
637 }
638 
639 
642  return myAdditionalTag;
643 }
644 
645 
648  return myAdditionalAttr;
649 }
650 
651 
652 std::string
655  return (myMenuCheck->getCheck() == 1) ? "true" : "false";
657  return toString(myTimeSpinDial->getValue());
658  } else {
659  return myTextField->getText().text();
660  }
661 }
662 
663 
664 bool
666  return myCurrentValueValid;
667 }
668 
669 
670 long
672  // Check if format of current value of myTextField is correct
674  if (TplCheck::_str2int(myTextField->getText().text())) {
675  myCurrentValueValid = true;
676  // convert string to int
677  int intValue = TplConvert::_str2int(myTextField->getText().text());
678  // Check if int value must be positive
680  myCurrentValueValid = false;
681  }
682  } else {
683  myCurrentValueValid = false;
684  }
686  if (TplCheck::_str2SUMOReal(myTextField->getText().text())) {
687  myCurrentValueValid = true;
688  // convert string to double
689  SUMOReal SUMORealValue = TplConvert::_str2SUMOReal(myTextField->getText().text());
690  // Check if double value must be positive
692  myCurrentValueValid = false;
693  // check if double value is a probability
694  } else if (GNEAttributeCarrier::isProbability(myAdditionalTag, myAdditionalAttr) && ((SUMORealValue < 0) || SUMORealValue > 1)) {
695  myCurrentValueValid = false;
696  }
697  } else {
698  myCurrentValueValid = false;
699  }
700  }
701  // change color of text field depending of myCurrentValueValid
702  if (myCurrentValueValid) {
703  myTextField->setTextColor(FXRGB(0, 0, 0));
704  myTextField->killFocus();
705  } else {
706  // IF value of TextField isn't valid, change their color to Red
707  myTextField->setTextColor(FXRGB(255, 0, 0));
708  }
709  // Update aditional frame
710  update();
711  return 1;
712 }
713 
714 
715 long
717  if (myMenuCheck->getCheck()) {
718  myMenuCheck->setText("True");
719  } else {
720  myMenuCheck->setText("False");
721  }
722  return 1;
723 }
724 
725 // ---------------------------------------------------------------------------
726 // GNEAdditionalFrame::singleAdditionalParameterList - methods
727 // ---------------------------------------------------------------------------
728 
730  FXMatrix(parent, 2, GUIDesignMatrixAttributes),
733  numberOfVisibleTextfields(1),
734  myMaxNumberOfValuesInParameterList(20) {
735  // Create elements
736  for (int i = 0; i < myMaxNumberOfValuesInParameterList; i++) {
737  myLabels.push_back(new FXLabel(this, "name", 0, GUIDesignLabelAttribute, 0, 0, 60, 0));
739  }
740  // Create label Row
741  myLabels.push_back(new FXLabel(this, "Rows", 0, GUIDesignLabelAttribute, 0, 0, 60, 0));
742  FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
743  // Create add button
744  add = new FXButton(buttonsFrame, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_ADDROW, GUIDesignButtonAttribute, 0, 0, 20, 20);
745  // Create delete buttons
746  remove = new FXButton(buttonsFrame, "", GUIIconSubSys::getIcon(ICON_REMOVE), this, MID_GNE_REMOVEROW, GUIDesignButtonAttribute, 0, 0, 20, 20);
747  // Hide all para meters
748  hideParameter();
749 }
750 
751 
753 
754 
755 void
756 GNEAdditionalFrame::singleAdditionalParameterList::showListParameter(SumoXMLTag additionalTag, SumoXMLAttr additionalAttr, std::vector<int> /* value */) {
757  myAdditionalTag = additionalTag;
758  myAdditionalAttr = additionalAttr;
759  std::cout << "FINISH" << std::endl;
760 }
761 
762 
763 void
764 GNEAdditionalFrame::singleAdditionalParameterList::showListParameter(SumoXMLTag additionalTag, SumoXMLAttr additionalAttr, std::vector<SUMOReal> /* value */, bool /*isTime*/) {
765  myAdditionalTag = additionalTag;
766  myAdditionalAttr = additionalAttr;
767  std::cout << "FINISH" << std::endl;
768 }
769 
770 
771 void
772 GNEAdditionalFrame::singleAdditionalParameterList::showListParameter(SumoXMLTag additionalTag, SumoXMLAttr additionalAttr, std::vector<bool> /* value */) {
773  myAdditionalTag = additionalTag;
774  myAdditionalAttr = additionalAttr;
775  std::cout << "FINISH" << std::endl;
776 }
777 
778 
779 void
781  if ((int)value.size() < myMaxNumberOfValuesInParameterList) {
782  myAdditionalTag = tag;
783  myAdditionalAttr = attr;
784  numberOfVisibleTextfields = (int)value.size();
785  if (numberOfVisibleTextfields == 0) {
787  }
788  for (int i = 0; i < myMaxNumberOfValuesInParameterList; i++) {
789  myLabels.at(i)->setText((toString(attr) + ": " + toString(i)).c_str());
790  }
791  for (int i = 0; i < numberOfVisibleTextfields; i++) {
792  myLabels.at(i)->show();
793  myTextFields.at(i)->show();
794  }
795  add->show();
796  remove->show();
797  show();
798  }
799 }
800 
801 
802 void
806  for (int i = 0; i < myMaxNumberOfValuesInParameterList; i++) {
807  myLabels.at(i)->hide();
808  myTextFields.at(i)->hide();
809  myTextFields.at(i)->setText("");
810  }
811  add->hide();
812  remove->hide();
813  hide();
814 }
815 
816 
819  return myAdditionalTag;
820 }
821 
824  return myAdditionalAttr;
825 }
826 
827 
828 std::string
830  // Declare, fill and return a string with the list values
831  std::string value;
832  for (int i = 0; i < numberOfVisibleTextfields; i++) {
833  if (!myTextFields.at(i)->getText().empty()) {
834  value += (myTextFields.at(i)->getText().text() + std::string(" "));
835  }
836  }
837  return value;
838 }
839 
840 
841 bool
844  return true;
845 }
846 
847 
848 long
854  getParent()->recalc();
855  }
856  return 1;
857 }
858 
859 
860 long
862  if (numberOfVisibleTextfields > 1) {
866  myTextFields.at(numberOfVisibleTextfields)->setText("");
867 
868  getParent()->recalc();
869  }
870  return 1;
871 }
872 
873 // ---------------------------------------------------------------------------
874 // GNEAdditionalFrame::editorParameters- methods
875 // ---------------------------------------------------------------------------
876 
878  FXGroupBox(parent, "Default parameters", GUIDesignGroupBoxFrame),
879  myIndexParameter(0),
880  myIndexParameterList(0),
881  maxNumberOfParameters(GNEAttributeCarrier::getHigherNumberOfAttributes()),
882  maxNumberOfListParameters(2) {
883 
884  // Create single parameters
885  for (int i = 0; i < maxNumberOfParameters; i++) {
887  }
888 
889  // Create single list parameters
890  for (int i = 0; i < maxNumberOfListParameters; i++) {
892  }
893 
894  // Create help button
895  helpAdditional = new FXButton(this, "Help", 0, this, MID_HELP, GUIDesignButtonHelp);
896 }
897 
898 
900 }
901 
902 
903 void
905  // Hidde al fields
906  for (int i = 0; i < maxNumberOfParameters; i++) {
907  myVectorOfsingleAdditionalParameter.at(i)->hideParameter();
908  }
909 
910  // Hidde al list fields
911  for (int i = 0; i < maxNumberOfListParameters; i++) {
912  myVectorOfsingleAdditionalParameterList.at(i)->hideParameter();
913  }
914 
915  // Reset indexs
917  myIndexParameter = 0;
918 }
919 
920 
921 void
923  // Set current additional
924  myAdditionalTag = additionalTag;
925  // If parameter is of type list
926  if (GNEAttributeCarrier::isList(myAdditionalTag, additionalAttribute)) {
927  // If parameter can be show
929  // Check type of attribute list
930  if (GNEAttributeCarrier::isInt(myAdditionalTag, additionalAttribute)) {
931  myVectorOfsingleAdditionalParameterList.at(myIndexParameterList)->showListParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue< std::vector<int> >(myAdditionalTag, additionalAttribute));
932  } else if (GNEAttributeCarrier::isFloat(myAdditionalTag, additionalAttribute)) {
933  myVectorOfsingleAdditionalParameterList.at(myIndexParameterList)->showListParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue< std::vector<SUMOReal> >(myAdditionalTag, additionalAttribute));
934  } else if (GNEAttributeCarrier::isTime(myAdditionalTag, additionalAttribute)) {
935  myVectorOfsingleAdditionalParameterList.at(myIndexParameterList)->showListParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue< std::vector<SUMOReal> >(myAdditionalTag, additionalAttribute), true);
936  } else if (GNEAttributeCarrier::isBool(myAdditionalTag, additionalAttribute)) {
937  myVectorOfsingleAdditionalParameterList.at(myIndexParameterList)->showListParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue< std::vector<bool> >(myAdditionalTag, additionalAttribute));
938  } else if (GNEAttributeCarrier::isString(myAdditionalTag, additionalAttribute)) {
939  myVectorOfsingleAdditionalParameterList.at(myIndexParameterList)->showListParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue< std::vector<std::string> >(myAdditionalTag, additionalAttribute));
940  }
941  // Update index
943  } else {
944  WRITE_ERROR("Max number of list attributes reached (" + toString(maxNumberOfListParameters) + ").");
945  }
946  } else {
948  // Check type of attribute list
949  if (GNEAttributeCarrier::isInt(myAdditionalTag, additionalAttribute)) {
950  myVectorOfsingleAdditionalParameter.at(myIndexParameter)->showParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue<int>(myAdditionalTag, additionalAttribute));
951  } else if (GNEAttributeCarrier::isFloat(myAdditionalTag, additionalAttribute)) {
952  myVectorOfsingleAdditionalParameter.at(myIndexParameter)->showParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue<SUMOReal>(myAdditionalTag, additionalAttribute));
953  } else if (GNEAttributeCarrier::isTime(myAdditionalTag, additionalAttribute)) {
954  myVectorOfsingleAdditionalParameter.at(myIndexParameter)->showParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue<SUMOReal>(myAdditionalTag, additionalAttribute), true);
955  } else if (GNEAttributeCarrier::isBool(myAdditionalTag, additionalAttribute)) {
956  myVectorOfsingleAdditionalParameter.at(myIndexParameter)->showParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue<bool>(myAdditionalTag, additionalAttribute));
957  } else if (GNEAttributeCarrier::isString(myAdditionalTag, additionalAttribute)) {
958  myVectorOfsingleAdditionalParameter.at(myIndexParameter)->showParameter(myAdditionalTag, additionalAttribute, GNEAttributeCarrier::getDefaultValue<std::string>(myAdditionalTag, additionalAttribute));
959  } else {
960  WRITE_WARNING("Attribute '" + toString(additionalAttribute) + "' don't have a defined type. Check definition in GNEAttributeCarrier");
961  }
962  // Update index parameter
964  } else {
965  WRITE_ERROR("Max number of attributes reached (" + toString(maxNumberOfParameters) + ").");
966  }
967  }
968 }
969 
970 
971 void
973  recalc();
974  show();
975 }
976 
977 
978 void
980  hide();
981 }
982 
983 
984 std::map<SumoXMLAttr, std::string>
986  std::map<SumoXMLAttr, std::string> values;
987  // get standar Parameters
988  for (int i = 0; i < myIndexParameter; i++) {
989  values[myVectorOfsingleAdditionalParameter.at(i)->getAttr()] = myVectorOfsingleAdditionalParameter.at(i)->getValue();
990  }
991  // get list parameters
992  for (int i = 0; i < myIndexParameterList; i++) {
993  values[myVectorOfsingleAdditionalParameterList.at(i)->getAttr()] = myVectorOfsingleAdditionalParameterList.at(i)->getListValues();
994  }
995  return values;
996 }
997 
998 
999 bool
1001  // iterate over standar parameters
1002  for (int i = 0; i < myIndexParameter; i++) {
1003  // Return false if at least one of the parameter isn't valid
1004  if (myVectorOfsingleAdditionalParameter.at(i)->isCurrentValueValid() == false) {
1005  return false;
1006  }
1007  }
1008  // iterate over list parameters
1009  for (int i = 0; i < myIndexParameterList; i++) {
1010  // Return false if at least one of the list parameter isn't valid
1011  if (myVectorOfsingleAdditionalParameterList.at(i)->isCurrentListValid() == false) {
1012  return false;
1013  }
1014  }
1015  return true;
1016 }
1017 
1018 
1019 int
1022 }
1023 
1024 
1025 long
1027  // Create help dialog
1028  FXDialogBox* helpDialog = new FXDialogBox(this, ("Parameters of " + toString(myAdditionalTag)).c_str(), GUIDesignDialogBox);
1029  // Create FXTable
1030  FXTable* myTable = new FXTable(helpDialog, this, MID_TABLE, TABLE_READONLY);
1031  myTable->setVisibleRows((FXint)(myIndexParameter + myIndexParameterList));
1032  myTable->setVisibleColumns(3);
1033  myTable->setTableSize((FXint)(myIndexParameter + myIndexParameterList), 3);
1034  myTable->setBackColor(FXRGB(255, 255, 255));
1035  myTable->setColumnText(0, "Name");
1036  myTable->setColumnText(1, "Value");
1037  myTable->setColumnText(2, "Definition");
1038  myTable->getRowHeader()->setWidth(0);
1039  FXHeader* header = myTable->getColumnHeader();
1040  header->setItemJustify(0, JUSTIFY_CENTER_X);
1041  header->setItemSize(0, 120);
1042  header->setItemJustify(1, JUSTIFY_CENTER_X);
1043  header->setItemSize(1, 80);
1044  int maxSizeColumnDefinitions = 0;
1045  // Iterate over vector of additional parameters
1046  for (int i = 0; i < myIndexParameter; i++) {
1047  SumoXMLTag tag = myVectorOfsingleAdditionalParameter.at(i)->getTag();
1048  SumoXMLAttr attr = myVectorOfsingleAdditionalParameter.at(i)->getAttr();
1049  // Set name of attribute
1050  myTable->setItem(i, 0, new FXTableItem(toString(attr).c_str()));
1051  // Set type
1052  FXTableItem* type = new FXTableItem("");
1053  if (GNEAttributeCarrier::isInt(tag, attr)) {
1054  type->setText("int");
1055  } else if (GNEAttributeCarrier::isFloat(tag, attr)) {
1056  type->setText("float");
1057  } else if (GNEAttributeCarrier::isTime(tag, attr)) {
1058  type->setText("time");
1059  } else if (GNEAttributeCarrier::isBool(tag, attr)) {
1060  type->setText("bool");
1061  } else if (GNEAttributeCarrier::isString(tag, attr)) {
1062  type->setText("string");
1063  }
1064  type->setJustify(FXTableItem::CENTER_X);
1065  myTable->setItem(i, 1, type);
1066  // Set definition
1067  FXTableItem* definition = new FXTableItem(GNEAttributeCarrier::getDefinition(myAdditionalTag, attr).c_str());
1068  definition->setJustify(FXTableItem::LEFT);
1069  myTable->setItem(i, 2, definition);
1070  if ((int)GNEAttributeCarrier::getDefinition(myAdditionalTag, attr).size() > maxSizeColumnDefinitions) {
1071  maxSizeColumnDefinitions = int(GNEAttributeCarrier::getDefinition(myAdditionalTag, attr).size());
1072  }
1073  }
1074  // Iterate over vector of additional parameters list
1075  for (int i = 0; i < myIndexParameterList; i++) {
1077  SumoXMLAttr attr = myVectorOfsingleAdditionalParameterList.at(i)->getAttr();
1078  // Set name of attribute
1079  myTable->setItem(i, 0, new FXTableItem(toString(attr).c_str()));
1080  // Set type
1081  FXTableItem* type = new FXTableItem("");
1082  if (GNEAttributeCarrier::isInt(tag, attr)) {
1083  type->setText("list of integers");
1084  } else if (GNEAttributeCarrier::isFloat(tag, attr)) {
1085  type->setText("list of floats");
1086  } else if (GNEAttributeCarrier::isTime(tag, attr)) {
1087  type->setText("list of times");
1088  } else if (GNEAttributeCarrier::isBool(tag, attr)) {
1089  type->setText("list of booleans");
1090  } else if (GNEAttributeCarrier::isString(tag, attr)) {
1091  type->setText("list of strings");
1092  }
1093  type->setJustify(FXTableItem::CENTER_X);
1094  myTable->setItem(i, 1, type);
1095  // Set definition
1096  FXTableItem* definition = new FXTableItem(GNEAttributeCarrier::getDefinition(myAdditionalTag, attr).c_str());
1097  definition->setJustify(FXTableItem::LEFT);
1098  myTable->setItem(i, 2, definition);
1099  if ((int)GNEAttributeCarrier::getDefinition(myAdditionalTag, attr).size() > maxSizeColumnDefinitions) {
1100  maxSizeColumnDefinitions = int(GNEAttributeCarrier::getDefinition(myAdditionalTag, attr).size());
1101  }
1102  }
1103  // Set size of column
1104  header->setItemJustify(2, JUSTIFY_CENTER_X);
1105  header->setItemSize(2, maxSizeColumnDefinitions * 6);
1106  // Button Close
1107  new FXButton(helpDialog, "OK\t\tclose", GUIIconSubSys::getIcon(ICON_ACCEPT), helpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonDialog, 0, 0, 0, 0, 4, 4, 3, 3);
1108  helpDialog->create();
1109  helpDialog->show();
1110  return 1;
1111 }
1112 
1113 // ---------------------------------------------------------------------------
1114 // GNEAdditionalFrame::editorParameters- methods
1115 // ---------------------------------------------------------------------------
1116 
1118  FXGroupBox(parent, "editor parameters", GUIDesignGroupBoxFrame),
1119  myActualAdditionalReferencePoint(GNE_ADDITIONALREFERENCEPOINT_LEFT),
1120  myCurrentLengthValid(true) {
1121  // Create FXListBox for the reference points
1123 
1124  // Create Frame for Label and TextField
1125  FXHorizontalFrame* lengthFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
1126 
1127  // Create length label
1128  myLengthLabel = new FXLabel(lengthFrame, "Length:", 0, GUIDesignLabelAttribute);
1129 
1130  // Create length text field
1132 
1133  // Set default value of length
1134  myLengthTextField->setText("10");
1135 
1136  // Create FXMenuCheck for the force option
1137  myCheckForcePosition = new FXMenuCheck(this, "Force position", this, MID_GNE_MODE_ADDITIONAL_FORCEPOSITION, GUIDesignMenuCheck);
1138 
1139  // Create FXMenuCheck for the force option
1140  myCheckBlock = new FXMenuCheck(this, "Block movement", this, MID_GNE_SET_BLOCKING, GUIDesignMenuCheck);
1141 
1142  // Create help button
1143  helpReferencePoint = new FXButton(this, "Help", 0, this, MID_HELP, GUIDesignButtonHelp);
1144 
1145  // Add options to myReferencePointMatchBox
1146  myReferencePointMatchBox->appendItem("reference left");
1147  myReferencePointMatchBox->appendItem("reference right");
1148  myReferencePointMatchBox->appendItem("reference center");
1149 
1150  // Set visible items
1151  myReferencePointMatchBox->setNumVisible((int)myReferencePointMatchBox->getNumItems());
1152 }
1153 
1154 
1156 
1157 
1158 void
1160  myLengthLabel->show();
1161  myLengthTextField->show();
1162 }
1163 
1164 
1165 void
1167  myLengthLabel->hide();
1168  myLengthTextField->hide();
1169 }
1170 
1171 
1172 void
1174  myReferencePointMatchBox->show();
1175  myCheckForcePosition->show();
1176 }
1177 
1178 
1179 void
1181  myReferencePointMatchBox->hide();
1182  myCheckForcePosition->hide();
1183 }
1184 
1185 
1189 }
1190 
1191 
1192 SUMOReal
1194  return GNEAttributeCarrier::parse<SUMOReal>(myLengthTextField->getText().text());
1195 }
1196 
1197 
1198 bool
1200  return myCheckBlock->getCheck() == 1 ? true : false;
1201 }
1202 
1203 
1204 bool
1206  return myCheckForcePosition->getCheck() == 1 ? true : false;
1207 }
1208 
1209 bool
1211  return myCurrentLengthValid;
1212 }
1213 
1214 
1215 long
1217  // change color of text field depending of the input lenght
1218  if (TplCheck::_str2SUMOReal(myLengthTextField->getText().text()) &&
1219  TplConvert::_str2SUMOReal(myLengthTextField->getText().text()) > 0) {
1220  myLengthTextField->setTextColor(FXRGB(0, 0, 0));
1221  myLengthTextField->killFocus();
1222  myCurrentLengthValid = true;
1223  } else {
1224  myLengthTextField->setTextColor(FXRGB(255, 0, 0));
1225  myCurrentLengthValid = false;
1226  }
1227  // Update aditional frame
1228  update();
1229  return 1;
1230 }
1231 
1232 
1233 long
1235  // Cast actual reference point type
1237  return 1;
1238 }
1239 
1240 
1241 long
1243  FXDialogBox* helpDialog = new FXDialogBox(this, "Parameter editor Help", GUIDesignDialogBox);
1244  std::ostringstream help;
1245  help
1246  << "Referece point: Mark the initial position of the additional element.\n"
1247  << "Example: If you want to create a busStop with a lenght of 30 in the point 100 of the lane:\n"
1248  << "- Reference Left will create it with startPos = 70 and endPos = 100.\n"
1249  << "- Reference Right will create it with startPos = 100 and endPos = 130.\n"
1250  << "- Reference Center will create it with startPos = 85 and endPos = 115.\n"
1251  << "\n"
1252  << "Force position: if is enabled, will create the additional adapting size of additional element to lane.\n"
1253  << "Example: If you have a lane with lenght = 100, but you try to create a busStop with size = 50\n"
1254  << "in the position 80 of the lane, a busStop with startPos = 80 and endPos = 100 will be created\n"
1255  << "instead of a busStop with startPos = 80 and endPos = 130.\n"
1256  << "\n"
1257  << "Block movement: if is enabled, the created additional element will be blocked. i.e. cannot be moved with\n"
1258  << "the mouse. This option can be modified with the Inspector.";
1259  new FXLabel(helpDialog, help.str().c_str(), 0, GUIDesignLabelLeft);
1260  // "OK"
1261  new FXButton(helpDialog, "OK\t\tclose", GUIIconSubSys::getIcon(ICON_ACCEPT), helpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonDialog, 0, 0, 0, 0, 4, 4, 3, 3);
1262  helpDialog->create();
1263  helpDialog->show();
1264  return 1;
1265 }
1266 
1267 
1268 std::string
1270  // Obtain Id's of list
1271  std::string vectorOfIds;
1272  for (int i = 0; i < list->getNumItems(); i++) {
1273  if (list->isItemSelected(i)) {
1274  if (vectorOfIds.size() > 0) {
1275  vectorOfIds += " ";
1276  }
1277  vectorOfIds += (list->getItem(i)->getText()).text();
1278  }
1279  }
1280  return vectorOfIds;
1281 }
1282 
1283 
1284 
1285 // ---------------------------------------------------------------------------
1286 // GNEAdditionalFrame::additionalParentSelector - methods
1287 // ---------------------------------------------------------------------------
1288 
1290  FXGroupBox(parent, "Additional Set selector", GUIDesignGroupBoxFrame),
1291  myUniqueSelection(false),
1292  myViewNet(viewNet) {
1293 
1294  // Create label with the type of additionalParentSelector
1295  mySetLabel = new FXLabel(this, "No additional selected", 0, GUIDesignLabelLeftThick);
1296 
1297  // Create list
1298  myList = new FXList(this, this, MID_GNE_SELECTADDITIONALPARENT, GUIDesignList, 0, 0, 0, 100);
1299 
1300  // Create help button
1301  myHelpAdditionalParentSelector = new FXButton(this, "Help", 0, this, MID_HELP, GUIDesignButtonHelp);
1302 
1303  // Hide List
1305 }
1306 
1307 
1309 
1310 
1311 std::string
1313  for (int i = 0; i < myList->getNumItems(); i++) {
1314  if (myList->isItemSelected(i)) {
1315  return myList->getItem(i)->getText().text();
1316  }
1317  }
1318  return "";
1319 }
1320 
1321 
1322 void
1324  myUniqueSelection = uniqueSelection;
1325  mySetLabel->setText(("" + toString(type)).c_str());
1326  myList->clearItems();
1327  // obtain all additionals of class "type"
1328  std::vector<GNEAdditional*> vectorOfAdditionalParents = myViewNet->getNet()->getAdditionals(type);
1329  // fill list with IDs of additionals
1330  for (std::vector<GNEAdditional*>::iterator i = vectorOfAdditionalParents.begin(); i != vectorOfAdditionalParents.end(); i++) {
1331  myList->appendItem((*i)->getID().c_str());
1332  }
1333  show();
1334 }
1335 
1336 
1337 void
1339  hide();
1340 }
1341 
1342 
1343 long
1345  return 1;
1346 }
1347 
1348 
1349 long
1351  return 1;
1352 }
1353 
1354 
1355 // ---------------------------------------------------------------------------
1356 // GNEAdditionalFrame::edgeParentsSelector - methods
1357 // ---------------------------------------------------------------------------
1358 
1360  FXGroupBox(parent, "Edges", GUIDesignGroupBoxFrame),
1361  myViewNet(viewNet) {
1362  // Create menuCheck for selected edges
1363  myUseSelectedEdges = new FXMenuCheck(this, "Use selected Edges", this, MID_GNE_SHOWONLYSELECTEDEDGES, GUIDesignMenuCheck);
1364 
1365  // Create search box
1367 
1368  // Create list
1369  myList = new FXList(this, this, MID_GNE_SELECTEDGE, GUIDesignList, 0, 0, 0, 100);
1370 
1371  // Create horizontal frame
1372  FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
1373 
1374  // Create button for clear selection
1375  myClearEdgesSelection = new FXButton(buttonsFrame, "Clear", 0, this, MID_GNE_CLEAREDGESELECTION, GUIDesignButtonHelp);
1376 
1377  // Create button for invert selection
1378  myInvertEdgesSelection = new FXButton(buttonsFrame, "Invert", 0, this, MID_GNE_INVERTEDGESELECTION, GUIDesignButtonHelp);
1379 
1380  // Create help button
1381  myHelpedgeParentsSelector = new FXButton(this, "Help", 0, this, MID_HELP, GUIDesignButtonHelp);
1382 
1383  // Hide List
1384  hideList();
1385 }
1386 
1387 
1389 
1390 
1391 std::string
1394 }
1395 
1396 
1397 void
1399  // clear list of egdge ids
1400  myList->clearItems();
1401  // get all edges of net
1403  std::vector<GNEEdge*> vectorOfEdges = myViewNet->getNet()->retrieveEdges(false);
1404  // iterate over edges of net
1405  for (std::vector<GNEEdge*>::iterator i = vectorOfEdges.begin(); i != vectorOfEdges.end(); i++) {
1406  // If search criterium is correct, then append ittem
1407  if ((*i)->getID().find(search) != std::string::npos) {
1408  myList->appendItem((*i)->getID().c_str());
1409  }
1410  }
1411  // By default, CheckBox for useSelectedEdges isn't checked
1412  myUseSelectedEdges->setCheck(false);
1413  // Recalc Frame
1414  recalc();
1415  // Update Frame
1416  update();
1417  // Show dialog
1418  show();
1419 }
1420 
1421 
1422 void
1424  FXGroupBox::hide();
1425 }
1426 
1427 
1428 void
1430  // Enable or disable use selected edges
1431  if (myViewNet->getNet()->retrieveEdges(true).size() > 0) {
1432  myUseSelectedEdges->enable();
1433  } else {
1434  myUseSelectedEdges->disable();
1435  }
1436 }
1437 
1438 
1439 bool
1441  if (myUseSelectedEdges->getCheck()) {
1442  return true;
1443  } else {
1444  return false;
1445  }
1446 }
1447 
1448 
1449 long
1451  if (myUseSelectedEdges->getCheck()) {
1452  myEdgesSearch->hide();
1453  myList->hide();
1454  myClearEdgesSelection->hide();
1455  myInvertEdgesSelection->hide();
1456  myHelpedgeParentsSelector->hide();
1457  } else {
1458  myEdgesSearch->show();
1459  myList->show();
1460  myClearEdgesSelection->show();
1461  myInvertEdgesSelection->show();
1462  myHelpedgeParentsSelector->show();
1463  }
1464  // Recalc Frame
1465  recalc();
1466  // Update Frame
1467  update();
1468  return 1;
1469 }
1470 
1471 
1472 long
1474  // Show only Id's of edgeParentsSelector that contains the searched string
1475  showList(myEdgesSearch->getText().text());
1476  return 1;
1477 }
1478 
1479 
1480 long
1482  return 1;
1483 }
1484 
1485 
1486 long
1488  for (int i = 0; i < myList->getNumItems(); i++) {
1489  if (myList->getItem(i)->isSelected()) {
1490  myList->deselectItem(i);
1491  }
1492  }
1493  return 1;
1494 }
1495 
1496 
1497 long
1499  for (int i = 0; i < myList->getNumItems(); i++) {
1500  if (myList->getItem(i)->isSelected()) {
1501  myList->deselectItem(i);
1502  } else {
1503  myList->selectItem(i);
1504  }
1505  }
1506  return 1;
1507 }
1508 
1509 
1510 long
1512  std::cout << "IMPLEMENT" << std::endl;
1513  return 1;
1514 }
1515 
1516 // ---------------------------------------------------------------------------
1517 // GNEAdditionalFrame::laneParentsSelector - methods
1518 // ---------------------------------------------------------------------------
1519 
1521  FXGroupBox(parent, "Lanes", GUIDesignGroupBoxFrame),
1522  myViewNet(viewNet) {
1523  // Create CheckBox for selected lanes
1524  myUseSelectedLanes = new FXMenuCheck(this, "Use selected Lanes", this, MID_GNE_USESELECTEDLANES, GUIDesignMenuCheck);
1525 
1526  // Create search box
1528 
1529  // Create list
1530  myList = new FXList(this, this, MID_GNE_SELECTLANE, GUIDesignList, 0, 0, 0, 100);
1531 
1532  // Create horizontal frame
1533  FXHorizontalFrame* buttonsFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
1534 
1535  // Create button for clear selection
1536  clearLanesSelection = new FXButton(buttonsFrame, "clear", 0, this, MID_GNE_CLEARLANESELECTION, GUIDesignButtonHelp);
1537 
1538  // Create button for invert selection
1539  invertLanesSelection = new FXButton(buttonsFrame, "invert", 0, this, MID_GNE_INVERTLANESELECTION, GUIDesignButtonHelp);
1540 
1541  // Create help button
1542  helpLanes = new FXButton(this, "Help", 0, this, MID_HELP, GUIDesignButtonHelp);
1543 
1544  // Hide List
1545  hideList();
1546 }
1547 
1548 
1550 
1551 
1552 std::string
1555 }
1556 
1557 
1558 void
1560  myList->clearItems();
1561  std::vector<GNELane*> vectorOfLanes = myViewNet->getNet()->retrieveLanes(false);
1562  for (std::vector<GNELane*>::iterator i = vectorOfLanes.begin(); i != vectorOfLanes.end(); i++) {
1563  if ((*i)->getID().find(search) != std::string::npos) {
1564  myList->appendItem((*i)->getID().c_str());
1565  }
1566  }
1567  // By default, CheckBox for useSelectedLanes isn't checked
1568  myUseSelectedLanes->setCheck(false);
1569  // Show list
1570  show();
1571 }
1572 
1573 
1574 void
1576  hide();
1577 }
1578 
1579 
1580 void
1582  // Enable or disable use selected Lanes
1583  if (myViewNet->getNet()->retrieveLanes(true).size() > 0) {
1584  myUseSelectedLanes->enable();
1585  } else {
1586  myUseSelectedLanes->disable();
1587  }
1588 }
1589 
1590 
1591 bool
1593  if (myUseSelectedLanes->getCheck()) {
1594  return true;
1595  } else {
1596  return false;
1597  }
1598 }
1599 
1600 
1601 long
1603  if (myUseSelectedLanes->getCheck()) {
1604  myLanesSearch->hide();
1605  myList->hide();
1606  clearLanesSelection->hide();
1607  invertLanesSelection->hide();
1608  helpLanes->hide();
1609  } else {
1610  myLanesSearch->show();
1611  myList->show();
1612  clearLanesSelection->show();
1613  invertLanesSelection->show();
1614  helpLanes->show();
1615  }
1616  // Recalc Frame
1617  recalc();
1618  // Update Frame
1619  update();
1620  return 1;
1621 }
1622 
1623 
1624 long
1626  // Show only Id's of laneParentsSelector that contains the searched string
1627  showList(myLanesSearch->getText().text());
1628  return 1;
1629 }
1630 
1631 
1632 long
1634  return 1;
1635 }
1636 
1637 
1638 long
1640  for (int i = 0; i < myList->getNumItems(); i++) {
1641  if (myList->getItem(i)->isSelected()) {
1642  myList->deselectItem(i);
1643  }
1644  }
1645  return 1;
1646 }
1647 
1648 
1649 long
1651  for (int i = 0; i < myList->getNumItems(); i++) {
1652  if (myList->getItem(i)->isSelected()) {
1653  myList->deselectItem(i);
1654  } else {
1655  myList->selectItem(i);
1656  }
1657  }
1658  return 1;
1659 }
1660 
1661 
1662 long
1664  return 1;
1665 }
1666 
1667 /****************************************************************************/
long onCmdSelectReferencePoint(FXObject *, FXSelector, void *)
Called when the user enters another reference point.
static bool _str2int(const std::string &data)
check if a String can be parsed into a int check overflows
Definition: TplCheck.h:48
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
Definition: GNENet.cpp:759
bool isCurrentValueValid() const
check if the current value is valid
SumoXMLTag
Numbers representing SUMO-XML - element names.
#define GUIDesignHorizontalFrame
Definition: GUIDesigns.h:186
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:179
FXMenuCheck * myCheckForcePosition
checkBox for the option "force position"
int maxNumberOfListParameters
max number of parameters (Defined in constructor)
SumoXMLTag myAdditionalTag
current XML attribute
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
static SUMOReal _str2SUMOReal(const std::string &sData)
converts a string into the SUMOReal value described by it by calling the char-type converter ...
Definition: TplConvert.h:348
static bool isFloat(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is numerical of type float
#define GUIDesignButtonAttribute
button extended over over column with thick and raise frame
Definition: GUIDesigns.h:69
FXList * myList
List of additional sets.
FXLabel * mySetLabel
Label with the name of additional.
std::string getListValues()
return the value of list
SUMOReal nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
int myMaxNumberOfValuesInParameterList
Number max of values in a parameter of type list.
FXButton * myHelpAdditionalParentSelector
button for help
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
int myIndexParameterList
index for myIndexParameterList
void addAttribute(SumoXMLTag additionalTag, SumoXMLAttr additionalAttribute)
add attribute
#define GUIDesignTextFieldAttributeStr
text field extended over the matrix column with thick frame
Definition: GUIDesigns.h:56
bool isBlockEnabled()
check if block is enabled
FXList * myList
List of laneParentsSelector.
int getNumberOfAddedAttributes() const
get number of added attributes
GNEAdditionalFrame::laneParentsSelector * mylaneParentsSelector
list of laneParentsSelector
FXDEFMAP(GNEAdditionalFrame) GNEAdditionalMap[]
long onCmdUseSelectedEdges(FXObject *, FXSelector, void *)
FXTextField * myTextField
textField to modify the value of int/float/string parameters
void showListParameter(SumoXMLTag additionalTag, SumoXMLAttr additionalAttr, std::vector< int > value)
show name and value of parameters of type int
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
void hideList()
hide laneParentsSelector
FXTextField * myLengthTextField
textField for lenght
void hideListOfAdditionals()
hide additionalParentSelector
bool myUniqueSelection
flag to check if only a single parent is allowed
additionalReferencePoint getActualReferencePoint()
get actual reference point
long onCmdSetBooleanAttribute(FXObject *, FXSelector, void *)
called when user change the value of myMenuCheck
long onCmdSelectLane(FXObject *, FXSelector, void *)
called when user select a lane of the list
static bool buildAdditional(GNEViewNet *viewNet, SumoXMLTag tag, std::map< SumoXMLAttr, std::string > values)
Build additionals.
void remove2Update()
Removes the dialog to be updated.
select lane
Definition: GUIAppEnum.h:591
static bool isPositive(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is only Positive (i.e. cannot take negative values)
std::string getIdsSelected() const
get list of selecte id&#39;s in string format
long onCmdSelectAdditional(FXObject *, FXSelector, void *)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
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:86
std::vector< FXLabel * > myLabels
vector with with the name of every parameter
bool addAdditional(GNENetElement *netElement, GUISUMOAbstractView *parent)
add additional element
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEAdditionalFrame::edgeParentsSelector * myedgeParentsSelector
list of edgeParentsSelector
long onCmdRemoveRow(FXObject *, FXSelector, void *)
add a new row int the list
int myIndexParameter
Index for myVectorOfsingleAdditionalParameter.
void showList(std::string search="")
Show list of edgeParentsSelector.
bool isCurrentLenghtValid() const
check if current lenght is valid
invert selection of edges
Definition: GUIAppEnum.h:585
static const std::vector< std::pair< SumoXMLAttr, std::string > > & allowedAttributes(SumoXMLTag tag)
get all editable attributes for tag and their default values.
#define GUIDesignMatrixAttributes
Matrix design extended over Frame and used for represent attributes and their values.
Definition: GUIDesigns.h:201
void setParametersOfAdditional(SumoXMLTag actualAdditionalType)
set parameters depending of the new additionalType
long onCmdAddRow(FXObject *, FXSelector, void *)
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:200
int numberOfVisibleTextfields
number of visible text fields
std::map< SumoXMLAttr, std::string > getAttributesAndValues() const
get attributes and their values
std::vector< FXTextField * > myTextFields
vector textField to modify the value of parameter
an e3 entry point
clear selection of edges
Definition: GUIAppEnum.h:583
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:995
static bool isString(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is of type string
#define GUIDesignComboBox
Definition: GUIDesigns.h:170
GNEViewNet * myViewNet
the window to inform when the tls is modfied
Definition: GNEFrame.h:92
void showReferencePoint()
show refence point comboBox
show only selected edge in a list
Definition: GUIAppEnum.h:577
static bool isInt(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is numerical or type int
long onCmdSetLength(FXObject *, FXSelector, void *)
use selected lanes
Definition: GUIAppEnum.h:589
search edge
Definition: GUIAppEnum.h:575
SumoXMLTag myAdditionalTag
current additional tag
clear selection of lanes
Definition: GUIAppEnum.h:593
static bool isTime(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is time
bool isUseSelectedEdgesEnable() const
get status of checkBox UseSelectedEdges
long onCmdSelectAdditionalParent(FXObject *, FXSelector, void *)
FXButton * myInvertEdgesSelection
button for invert selection
invert selection of lanes
Definition: GUIAppEnum.h:595
std::string getIdsSelected() const
get list of selecte id&#39;s in string format
FXMenuCheck * myMenuCheck
menuCheck to enable/disable the value of boolean parameters
GNEAdditionalFrame::editorParameters * myEditorParameters
editor parameter
SUMOReal setEndPosition(SUMOReal laneLenght, SUMOReal positionOfTheMouseOverLane, SUMOReal lenghtOfAdditional)
obtain the End position values of StoppingPlaces and E2 detector over the lane
#define GUIDesignList
design for FXLists
Definition: GUIDesigns.h:438
void showParameter(SumoXMLTag additionalTag, SumoXMLAttr additionalAttr, std::string value)
show name and value of attribute of type string
SUMOReal getLenght()
get value of lenght
#define GUIDesignButtonDialog
button with size limited by text, centered over Frame with thick and raise frame
Definition: GUIDesigns.h:72
SumoXMLAttr getAttr() const
return attribute of list
#define GUIDesignTextField
Definition: GUIDesigns.h:41
the edges of a route
long onCmdUseSelectedLanes(FXObject *, FXSelector, void *)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:55
FXButton * invertLanesSelection
button for invert selection
static bool hasAttribute(SumoXMLTag tag, SumoXMLAttr attr)
check if an element with certain tag has a certain attribute
The Table.
Definition: GUIAppEnum.h:291
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:51
GNEAdditionalFrame::additionalParameters * myadditionalParameters
additional default parameters
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:93
bool isCurrentListValid() const
check that current list is valid
an e3 exit point
FXButton * add
Button to increase the number of textFields.
FXButton * myClearEdgesSelection
button for clear selection
std::string getIdSelected() const
get if currently additional Set
static int _str2int(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
Definition: TplConvert.h:160
SumoXMLTag myActualAdditionalType
actual additional type selected in the match Box
remove row
Definition: GUIAppEnum.h:565
virtual std::string getDescription()
how should this attribute carrier be called
void removeAdditional(GNEAdditional *additional)
remove an additional element previously added
block movement of a graphic element
long onCmdSetAttribute(FXObject *, FXSelector, void *)
static T getDefaultValue(SumoXMLTag tag, SumoXMLAttr attr)
return the default value of the attribute of an element
std::vector< GNEAdditional * > getAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING)
get vector with additionals
Definition: GNENet.cpp:1288
invalid attribute
FXMenuCheck * myUseSelectedLanes
CheckBox for selected lanes.
static const std::vector< SumoXMLTag > & allowedTags(bool net)
get all editable for tag (net or additional).
~GNEAdditionalFrame()
Destructor.
select additional parent
Definition: GUIAppEnum.h:573
attribute blocking
Definition: GUIAppEnum.h:555
FXButton * helpReferencePoint
Button for help about the reference point.
#define GUIDesignMenuCheck
Definition: GUIDesigns.h:129
FXComboBox * myAdditionalMatchBox
combo box with the list of additional elements
void updateUseSelectedEdges()
Update use selectedEdges.
#define GUIDesignMenuCheckAttribute
MenuCheck button for attributes extended over the matrix column.
Definition: GUIDesigns.h:132
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING)
Returns the number of additionals of the net.
Definition: GNENet.cpp:1300
#define GUIDesignSpinDialAttribute
spin dial extended over the matrix column with thick frame
Definition: GUIDesigns.h:289
GNEViewNet * myViewNet
viewNet associated to GNEAdditionalFrame
add row
Definition: GUIAppEnum.h:563
bool myCurrentLengthValid
Flag to check if current lenght is valid.
const std::string getID() const
function to support debugging
SUMOReal setStartPosition(SUMOReal positionOfTheMouseOverLane, SUMOReal lenghtOfAdditional)
obtain the Start position values of StoppingPlaces and E2 detector over the lane
FXLabel * myLabel
lael with the name of the parameter
SumoXMLAttr myAdditionalAttr
current XML attribute
GNEAdditionalFrame::additionalParentSelector * myAdditionalParentSelector
list of additional Set
FXLabel * myLengthLabel
Label for lenght.
long onCmdHelp(FXObject *, FXSelector, void *)
FXMenuCheck * myCheckBlock
checkBox for blocking movement
bool myCurrentValueValid
Flag which indicates that the current value is correct.
FXList * myList
List of edgeParentsSelector.
long onCmdSelectEdge(FXObject *, FXSelector, void *)
called when user select a edge of the list
bool isUseSelectedLanesEnable() const
get status of checkBox UseSelectedLanes
additional match box messages
Definition: GUIAppEnum.h:459
void showListOfAdditionals(SumoXMLTag type, bool uniqueSelection)
Show list of additionalParentSelector.
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:206
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:54
static bool isUnique(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is unique (may not be edited for a multi-selection and don&#39;t have a default valu...
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:59
bool isForcePositionEnabled()
check if force position is enabled
GNEViewNet * myViewNet
viewNet associated to GNEAdditionalFrame
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
Definition: GNENet.cpp:1265
std::string generateID(GNENetElement *netElement) const
generate a ID for an additiona element
const PositionVector & getShape() const
returns the shape of the lane
Definition: GNELane.cpp:583
SUMOReal getLaneShapeLenght() const
returns the length of the lane&#39;s shape
Definition: GNELane.cpp:683
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
Definition: GNEEdge.cpp:479
#define GUIDesignButtonHelp
little button for help in frames
Definition: GUIDesigns.h:75
virtual void show()
show Frame
Definition: GNEFrame.cpp:100
static bool isProbability(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is a probability (i.e. oly can values between [0, 1])
#define GUIDesignDialogBox
Definition: GUIDesigns.h:407
SumoXMLTag getTag() const
return tag of list
void show()
show additional frame and update use selected edges/lanes
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
Definition: GNENet.cpp:747
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:62
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:204
void hideReferencePoint()
hide refence point comboBox
select edge
Definition: GUIAppEnum.h:581
static bool isBool(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is of type bool for a certain tag
std::vector< singleAdditionalParameter * > myVectorOfsingleAdditionalParameter
vector with the additional parameters
std::string getValue() const
return value
FXTextField * myLanesSearch
text field for search lane IDs
SumoXMLAttr myAdditionalAttr
current XML attribute
static std::string getDefinition(SumoXMLTag tag, SumoXMLAttr attr)
return definition of a certain SumoXMLAttr
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:989
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:109
void showList(std::string search="")
Show list of laneParentsSelector.
void text()
Definition: gl2psTest.c:260
FXSpinner * myTimeSpinDial
spindial to modify the value of time parameters
FXButton * clearLanesSelection
button for clear selection
#define SUMOReal
Definition: config.h:208
help button
Definition: GUIAppEnum.h:404
static bool _str2SUMOReal(const std::string &data)
check if a String can be parsed into a SUMOReal check overflows
Definition: TplCheck.h:67
std::vector< singleAdditionalParameterList * > myVectorOfsingleAdditionalParameterList
vector with the additional parameters of type list
additionalReferencePoint myActualAdditionalReferencePoint
actual additional reference point selected in the match Box
parent of an additional element
bool isValuesValid() const
check if all values defined by user are valid
FXMenuCheck * myUseSelectedEdges
CheckBox for selected edges.
#define GUIDesignLabelLeft
Definition: GUIDesigns.h:139
Position getPositionInformation() const
Returns the cursor&#39;s x/y position within the network.
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
static std::string getIdsSelected(const FXList *list)
get list of selecte id&#39;s in string format
void hideList()
hide edgeParentsSelector
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame
Definition: GUIDesigns.h:160
FXTextField * myEdgesSearch
text field for search edge IDs
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
int maxNumberOfParameters
max number of parameters (Defined in constructor)
GUISelectedStorage gSelected
A global holder of selected objects.
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
search lane
Definition: GUIAppEnum.h:587
FXButton * myHelpedgeParentsSelector
button for help
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
#define GUIDesignLabelLeftThick
label extended over over frame with thick and with text justify to left
Definition: GUIDesigns.h:151
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:188
GNEViewNet * myViewNet
viewNet associated to GNEAdditionalFrame
long onCmdTypeInSearchBox(FXObject *, FXSelector, void *)
called when user type in search box
static bool isList(SumoXMLTag tag, SumoXMLAttr attr)
whether an attribute is of type bool
FXComboBox * myReferencePointMatchBox
match box with the list of reference points
long onCmdTypeInSearchBox(FXObject *, FXSelector, void *)
called when user type in search box