Eclipse SUMO - Simulation of Urban MObility
GNESelectorFrame.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 modifying selections of network-elements
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 #include <netedit/GNENet.h>
25 #include <netedit/GNEUndoList.h>
26 #include <netedit/GNEViewNet.h>
38 
39 #include "GNESelectorFrame.h"
40 
41 
42 // ===========================================================================
43 // FOX callback mapping
44 // ===========================================================================
47 };
48 
49 FXDEFMAP(GNESelectorFrame::ModificationMode) ModificationModeMap[] = {
51 };
52 
53 FXDEFMAP(GNESelectorFrame::ElementSet) ElementSetMap[] = {
55 };
56 
57 FXDEFMAP(GNESelectorFrame::MatchAttribute) MatchAttributeMap[] = {
62 };
63 
64 FXDEFMAP(GNESelectorFrame::VisualScaling) VisualScalingMap[] = {
66 };
67 
68 FXDEFMAP(GNESelectorFrame::SelectionOperation) SelectionOperationMap[] = {
73 };
74 
75 // Object implementation
76 FXIMPLEMENT(GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry, FXObject, ObjectTypeEntryMap, ARRAYNUMBER(ObjectTypeEntryMap))
77 FXIMPLEMENT(GNESelectorFrame::ModificationMode, FXGroupBox, ModificationModeMap, ARRAYNUMBER(ModificationModeMap))
78 FXIMPLEMENT(GNESelectorFrame::ElementSet, FXGroupBox, ElementSetMap, ARRAYNUMBER(ElementSetMap))
79 FXIMPLEMENT(GNESelectorFrame::MatchAttribute, FXGroupBox, MatchAttributeMap, ARRAYNUMBER(MatchAttributeMap))
80 FXIMPLEMENT(GNESelectorFrame::VisualScaling, FXGroupBox, VisualScalingMap, ARRAYNUMBER(VisualScalingMap))
81 FXIMPLEMENT(GNESelectorFrame::SelectionOperation, FXGroupBox, SelectionOperationMap, ARRAYNUMBER(SelectionOperationMap))
82 
83 // ===========================================================================
84 // method definitions
85 // ===========================================================================
86 
87 GNESelectorFrame::GNESelectorFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet):
88  GNEFrame(horizontalFrameParent, viewNet, "Selection") {
89  // create selectedItems modul
90  myLockGLObjectTypes = new LockGLObjectTypes(this);
91  // create Modification Mode modul
92  myModificationMode = new ModificationMode(this);
93  // create ElementSet modul
94  myElementSet = new ElementSet(this);
95  // create MatchAttribute modul
96  myMatchAttribute = new MatchAttribute(this);
97  // create VisualScaling modul
98  myVisualScaling = new VisualScaling(this);
99  // create SelectionOperation modul
100  mySelectionOperation = new SelectionOperation(this);
101  // Create groupbox for information about selections
102  FXGroupBox* selectionHintGroupBox = new FXGroupBox(myContentFrame, "Information", GUIDesignGroupBoxFrame);
103  // Create Selection Hint
104  new FXLabel(selectionHintGroupBox, " - Hold <SHIFT> for \n rectangle selection.\n - Press <DEL> to\n delete selected items.", nullptr, GUIDesignLabelFrameInformation);
105 
106 }
107 
108 
110 
111 
112 void
114  // show Type Entries depending of current supermode
116  // refresh element set
118  // Show frame
119  GNEFrame::show();
120 }
121 
122 
123 void
125  // hide frame
126  GNEFrame::hide();
127 }
128 
129 
130 void
132  // only continue if there is element for selecting
133  if (ACsToSelected()) {
134  // for invert selection, first clean current selection and next select elements of set "unselectedElements"
135  myViewNet->getUndoList()->p_begin("invert selection");
136  // invert selection of elements depending of current supermode
138  // iterate over junctions
139  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().junctions) {
140  // check if junction selection is locked
142  if (i.second->isAttributeCarrierSelected()) {
143  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
144  }
145  }
146  // due we iterate over all junctions, only it's neccesary iterate over incoming edges
147  for (const auto& j : i.second->getGNEIncomingEdges()) {
148  // check if edge selection is locked
150  if (j->isAttributeCarrierSelected()) {
151  j->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
152  }
153  }
154  // check if lane selection is locked
156  for (auto k : j->getLanes()) {
157  if (k->isAttributeCarrierSelected()) {
158  k->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
159  }
160  }
161  }
162  // check if connection selection is locked
164  for (const auto& k : j->getGNEConnections()) {
165  if (k->isAttributeCarrierSelected()) {
166  k->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
167  }
168  }
169  }
170  }
171  // check if crossing selection is locked
173  for (const auto& j : i.second->getGNECrossings()) {
174  if (j->isAttributeCarrierSelected()) {
175  j->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
176  }
177  }
178  }
179  }
180  // check if additionals selection is locked
182  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().additionals) {
183  // first check if additional is selectable
185  for (const auto& j : i.second) {
186  if (j.second->isAttributeCarrierSelected()) {
187  j.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
188  }
189  }
190  }
191  }
192  }
193  // select polygons
195  for (const auto& i : myViewNet->getNet()->getPolygons()) {
196  GNEShape* shape = dynamic_cast<GNEShape*>(i.second);
197  if (shape->isAttributeCarrierSelected()) {
199  }
200  }
201  }
202  // select POIs
204  for (const auto& i : myViewNet->getNet()->getPOIs()) {
205  GNEShape* shape = dynamic_cast<GNEShape*>(i.second);
206  if (shape->isAttributeCarrierSelected()) {
208  }
209  }
210  }
211  } else {
212  // select routes
214  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_ROUTE)) {
215  if (i.second->isAttributeCarrierSelected()) {
216  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
217  }
218  }
219  }
220  // select embedded route
223  if (i.second->isAttributeCarrierSelected()) {
224  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
225  }
226  }
227  }
228  // select vehicles
230  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_VEHICLE)) {
231  if (i.second->isAttributeCarrierSelected()) {
232  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
233  }
234  }
235  }
236  // select trips
238  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_TRIP)) {
239  if (i.second->isAttributeCarrierSelected()) {
240  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
241  }
242  }
243  }
244  // select flows
246  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_FLOW)) {
247  if (i.second->isAttributeCarrierSelected()) {
248  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
249  }
250  }
251  }
252  // select route flows
254  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_ROUTEFLOW)) {
255  if (i.second->isAttributeCarrierSelected()) {
256  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
257  }
258  }
259  }
260  // select stops
262  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_STOP_LANE)) {
263  if (i.second->isAttributeCarrierSelected()) {
264  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
265  }
266  }
268  if (i.second->isAttributeCarrierSelected()) {
269  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
270  }
271  }
273  if (i.second->isAttributeCarrierSelected()) {
274  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
275  }
276  }
278  if (i.second->isAttributeCarrierSelected()) {
279  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
280  }
281  }
283  if (i.second->isAttributeCarrierSelected()) {
284  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
285  }
286  }
287  }
288  // select person
290  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_PERSON)) {
291  if (i.second->isAttributeCarrierSelected()) {
292  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
293  }
294  }
295  }
296  // select person flows
299  if (i.second->isAttributeCarrierSelected()) {
300  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
301  }
302  }
303  }
304  // select person trips
307  if (i.second->isAttributeCarrierSelected()) {
308  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
309  }
310  }
312  if (i.second->isAttributeCarrierSelected()) {
313  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
314  }
315  }
316  }
317  // select ride
320  if (i.second->isAttributeCarrierSelected()) {
321  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
322  }
323  }
325  if (i.second->isAttributeCarrierSelected()) {
326  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
327  }
328  }
329  }
330  // select walks
333  if (i.second->isAttributeCarrierSelected()) {
334  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
335  }
336  }
338  if (i.second->isAttributeCarrierSelected()) {
339  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
340  }
341  }
343  if (i.second->isAttributeCarrierSelected()) {
344  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
345  }
346  }
347  }
348  // select person stops
351  if (i.second->isAttributeCarrierSelected()) {
352  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
353  }
354  }
356  if (i.second->isAttributeCarrierSelected()) {
357  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
358  }
359  }
360  }
361  }
362  // finish selection operation
364  // update view
365  myViewNet->update();
366  }
367 }
368 
369 
370 void
371 GNESelectorFrame::handleIDs(const std::vector<GNEAttributeCarrier*>& ACs, ModificationMode::SetOperation setop) {
373  // declare two sets of attribute carriers, one for select and another for unselect
374  std::set<std::pair<std::string, GNEAttributeCarrier*> > ACToSelect;
375  std::set<std::pair<std::string, GNEAttributeCarrier*> > ACToUnselect;
376  // in restrict AND replace mode all current selected attribute carriers will be unselected
377  if ((setOperation == ModificationMode::SET_REPLACE) || (setOperation == ModificationMode::SET_RESTRICT)) {
378  // obtain selected ACs depending of current supermode
379  std::vector<GNEAttributeCarrier*> selectedAC = myViewNet->getNet()->getSelectedAttributeCarriers(false);
380  // add id into ACs to unselect
381  for (auto i : selectedAC) {
382  ACToUnselect.insert(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i));
383  }
384  }
385  // handle ids
386  for (auto i : ACs) {
387  // iterate over AtributeCarriers an place it in ACToSelect or ACToUnselect
388  switch (setOperation) {
390  ACToUnselect.insert(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i));
391  break;
393  if (ACToUnselect.find(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i)) != ACToUnselect.end()) {
394  ACToSelect.insert(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i));
395  }
396  break;
397  default:
398  ACToSelect.insert(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i));
399  break;
400  }
401  }
402  // select junctions and their connections if Auto select junctions is enabled (note: only for "add mode")
404  std::vector<GNEEdge*> edgesToSelect;
405  // iterate over ACToSelect and extract edges
406  for (auto i : ACToSelect) {
407  if (i.second->getTagProperty().getTag() == SUMO_TAG_EDGE) {
408  edgesToSelect.push_back(dynamic_cast<GNEEdge*>(i.second));
409  }
410  }
411  // iterate over extracted edges
412  for (auto i : edgesToSelect) {
413  // select junction source and all their connections and crossings
414  ACToSelect.insert(std::make_pair(i->getGNEJunctionSource()->getID(), i->getGNEJunctionSource()));
415  for (auto j : i->getGNEJunctionSource()->getGNEConnections()) {
416  ACToSelect.insert(std::make_pair(j->getID(), j));
417  }
418  for (auto j : i->getGNEJunctionSource()->getGNECrossings()) {
419  ACToSelect.insert(std::make_pair(j->getID(), j));
420  }
421  // select junction destiny and all their connections crossings
422  ACToSelect.insert(std::make_pair(i->getGNEJunctionDestiny()->getID(), i->getGNEJunctionDestiny()));
423  for (auto j : i->getGNEJunctionDestiny()->getGNEConnections()) {
424  ACToSelect.insert(std::make_pair(j->getID(), j));
425  }
426  for (auto j : i->getGNEJunctionDestiny()->getGNECrossings()) {
427  ACToSelect.insert(std::make_pair(j->getID(), j));
428  }
429  }
430  }
431  // only continue if there is ACs to select or unselect
432  if ((ACToSelect.size() + ACToUnselect.size()) > 0) {
433  // first unselect AC of ACToUnselect and then selects AC of ACToSelect
434  myViewNet->getUndoList()->p_begin("selection using rectangle");
435  for (auto i : ACToUnselect) {
436  if (i.second->getTagProperty().isSelectable()) {
437  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
438  }
439  }
440  for (auto i : ACToSelect) {
441  if (i.second->getTagProperty().isSelectable()) {
442  i.second->setAttribute(GNE_ATTR_SELECTED, "true", myViewNet->getUndoList());
443  }
444  }
445  // finish operation
447  }
448  // update view
449  myViewNet->update();
450 }
451 
452 
455  return myModificationMode;
456 }
457 
458 
461  return myLockGLObjectTypes;
462 }
463 
464 
465 std::vector<GNEAttributeCarrier*>
466 GNESelectorFrame::getMatches(SumoXMLTag ACTag, SumoXMLAttr ACAttr, char compOp, double val, const std::string& expr) {
467  std::vector<GNEAttributeCarrier*> result;
468  std::vector<GNEAttributeCarrier*> allACbyTag = myViewNet->getNet()->retrieveAttributeCarriers(ACTag);
469  const auto& tagValue = GNEAttributeCarrier::getTagProperties(ACTag);
470  for (auto it : allACbyTag) {
471  if (expr == "") {
472  result.push_back(it);
473  } else if (tagValue.hasAttribute(ACAttr) && tagValue.getAttributeProperties(ACAttr).isNumerical()) {
474  double acVal;
475  std::istringstream buf(it->getAttribute(ACAttr));
476  buf >> acVal;
477  switch (compOp) {
478  case '<':
479  if (acVal < val) {
480  result.push_back(it);
481  }
482  break;
483  case '>':
484  if (acVal > val) {
485  result.push_back(it);
486  }
487  break;
488  case '=':
489  if (acVal == val) {
490  result.push_back(it);
491  }
492  break;
493  }
494  } else {
495  // string match
496  std::string acVal = it->getAttributeForSelection(ACAttr);
497  switch (compOp) {
498  case '@':
499  if (acVal.find(expr) != std::string::npos) {
500  result.push_back(it);
501  }
502  break;
503  case '!':
504  if (acVal.find(expr) == std::string::npos) {
505  result.push_back(it);
506  }
507  break;
508  case '=':
509  if (acVal == expr) {
510  result.push_back(it);
511  }
512  break;
513  case '^':
514  if (acVal != expr) {
515  result.push_back(it);
516  }
517  break;
518  }
519  }
520  }
521  return result;
522 }
523 
524 // ---------------------------------------------------------------------------
525 // ModificationMode::LockGLObjectTypes - methods
526 // ---------------------------------------------------------------------------
527 
529  FXGroupBox(selectorFrameParent->myContentFrame, "Locked selected items", GUIDesignGroupBoxFrame),
530  mySelectorFrameParent(selectorFrameParent) {
531  // create a matrix for TypeEntries
532  FXMatrix* matrixLockGLObjectTypes = new FXMatrix(this, 3, GUIDesignMatrixLockGLTypes);
533  // create typeEntries for the different Network elements
534  myTypeEntries[GLO_JUNCTION] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Junctions"));
535  myTypeEntries[GLO_EDGE] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Edges"));
536  myTypeEntries[GLO_LANE] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Lanes"));
537  myTypeEntries[GLO_CONNECTION] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Connections"));
538  myTypeEntries[GLO_ADDITIONAL] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Additionals"));
539  myTypeEntries[GLO_CROSSING] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Crossings"));
540  myTypeEntries[GLO_POLYGON] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "Polygons"));
541  myTypeEntries[GLO_POI] = std::make_pair(Supermode::GNE_SUPERMODE_NETWORK, new ObjectTypeEntry(matrixLockGLObjectTypes, "POIs"));
542  // create typeEntries for the different Demand elements
543  myTypeEntries[GLO_ROUTE] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Routes"));
544  myTypeEntries[GLO_EMBEDDEDROUTE] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Emb.Routes"));
545  myTypeEntries[GLO_VEHICLE] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Vehicles"));
546  myTypeEntries[GLO_ROUTEFLOW] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Flows"));
547  myTypeEntries[GLO_TRIP] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Trips"));
548  myTypeEntries[GLO_FLOW] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Flow"));
549  myTypeEntries[GLO_STOP] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Stops"));
550  myTypeEntries[GLO_PERSON] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Person"));
551  myTypeEntries[GLO_PERSONFLOW] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "PersonFlow"));
552  myTypeEntries[GLO_PERSONTRIP] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "PersonTrip"));
553  myTypeEntries[GLO_RIDE] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Ride"));
554  myTypeEntries[GLO_WALK] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Walk"));
555  myTypeEntries[GLO_PERSONSTOP] = std::make_pair(Supermode::GNE_SUPERMODE_DEMAND, new ObjectTypeEntry(matrixLockGLObjectTypes, "Personstop"));
556 }
557 
558 
560  // remove all type entries
561  for (const auto& i : myTypeEntries) {
562  delete i.second.second;
563  }
564 }
565 
566 
567 void
569  myTypeEntries.at(type).second->counterUp();
570 }
571 
572 
573 void
575  myTypeEntries.at(type).second->counterDown();
576 }
577 
578 
579 bool
581  if ((type >= 100) && (type < 199)) {
582  return myTypeEntries.at(GLO_ADDITIONAL).second->isGLTypeLocked();
583  } else {
584  return myTypeEntries.at(type).second->isGLTypeLocked();
585  }
586 }
587 
588 
589 void
591  for (const auto& i : myTypeEntries) {
592  // showr or hidde type entries depending of current supermode
593  if (i.second.first == mySelectorFrameParent->myViewNet->getEditModes().currentSupermode) {
594  i.second.second->showObjectTypeEntry();
595  } else {
596  i.second.second->hideObjectTypeEntry();
597  }
598  }
599  // recalc frame parent
600  recalc();
601 }
602 
603 
604 GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::ObjectTypeEntry(FXMatrix* matrixParent, const std::string& label) :
605  FXObject(),
606  myCounter(0) {
607  // create elements
608  myLabelCounter = new FXLabel(matrixParent, "0", nullptr, GUIDesignLabelLeft);
609  myLabelTypeName = new FXLabel(matrixParent, (label + " ").c_str(), nullptr, GUIDesignLabelLeft);
610  myCheckBoxLocked = new FXCheckButton(matrixParent, "unlocked", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
611 }
612 
613 
614 void
616  myLabelCounter->show();
617  myLabelTypeName->show();
618  myCheckBoxLocked->show();
619 }
620 
621 
622 void
624  myLabelCounter->hide();
625  myLabelTypeName->hide();
626  myCheckBoxLocked->hide();
627 }
628 
629 
630 void
632  myCounter++;
633  myLabelCounter->setText(toString(myCounter).c_str());
634 }
635 
636 
637 void
639  myCounter--;
640  myLabelCounter->setText(toString(myCounter).c_str());
641 }
642 
643 
644 bool
646  return (myCheckBoxLocked->getCheck() == TRUE);
647 }
648 
649 
650 long
652  if (myCheckBoxLocked->getCheck() == TRUE) {
653  myCheckBoxLocked->setText("locked");
654  } else {
655  myCheckBoxLocked->setText("unlocked");
656  }
657  return 1;
658 }
659 
660 // ---------------------------------------------------------------------------
661 // ModificationMode::ModificationMode - methods
662 // ---------------------------------------------------------------------------
663 
665  FXGroupBox(selectorFrameParent->myContentFrame, "Modification Mode", GUIDesignGroupBoxFrame),
666  myModificationModeType(SET_ADD) {
667  // Create all options buttons
668  myAddRadioButton = new FXRadioButton(this, "add\t\tSelected objects are added to the previous selection",
670  myRemoveRadioButton = new FXRadioButton(this, "remove\t\tSelected objects are removed from the previous selection",
672  myKeepRadioButton = new FXRadioButton(this, "keep\t\tRestrict previous selection by the current selection",
674  myReplaceRadioButton = new FXRadioButton(this, "replace\t\tReplace previous selection by the current selection",
676  myAddRadioButton->setCheck(true);
677 }
678 
679 
681 
682 
685  return myModificationModeType;
686 }
687 
688 
689 long
691  if (obj == myAddRadioButton) {
692  myModificationModeType = SET_ADD;
693  myAddRadioButton->setCheck(true);
694  myRemoveRadioButton->setCheck(false);
695  myKeepRadioButton->setCheck(false);
696  myReplaceRadioButton->setCheck(false);
697  return 1;
698  } else if (obj == myRemoveRadioButton) {
699  myModificationModeType = SET_SUB;
700  myAddRadioButton->setCheck(false);
701  myRemoveRadioButton->setCheck(true);
702  myKeepRadioButton->setCheck(false);
703  myReplaceRadioButton->setCheck(false);
704  return 1;
705  } else if (obj == myKeepRadioButton) {
706  myModificationModeType = SET_RESTRICT;
707  myAddRadioButton->setCheck(false);
708  myRemoveRadioButton->setCheck(false);
709  myKeepRadioButton->setCheck(true);
710  myReplaceRadioButton->setCheck(false);
711  return 1;
712  } else if (obj == myReplaceRadioButton) {
713  myModificationModeType = SET_REPLACE;
714  myAddRadioButton->setCheck(false);
715  myRemoveRadioButton->setCheck(false);
716  myKeepRadioButton->setCheck(false);
717  myReplaceRadioButton->setCheck(true);
718  return 1;
719  } else {
720  return 0;
721  }
722 }
723 
724 // ---------------------------------------------------------------------------
725 // ModificationMode::ElementSet - methods
726 // ---------------------------------------------------------------------------
727 
729  FXGroupBox(selectorFrameParent->myContentFrame, "Element Set", GUIDesignGroupBoxFrame),
730  mySelectorFrameParent(selectorFrameParent),
731  myCurrentElementSet(ELEMENTSET_NETELEMENT) {
732  // Create MatchTagBox for tags and fill it
734 }
735 
736 
738 
739 
742  return myCurrentElementSet;
743 }
744 
745 
746 void
748  // first clear item
749  mySetComboBox->clearItems();
750  // now fill elements depending of supermode
751  if (mySelectorFrameParent->myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) {
752  mySetComboBox->appendItem("Net Element");
753  mySetComboBox->appendItem("Additional");
754  mySetComboBox->appendItem("Shape");
755  } else {
756  mySetComboBox->appendItem("Demand Element");
757  }
758  mySetComboBox->setNumVisible(mySetComboBox->getNumItems());
759  // update rest of elements
760  onCmdSelectElementSet(0, 0, 0);
761 }
762 
763 
764 long
766  // check depending of current supermode
767  if (mySelectorFrameParent->myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) {
768  if (mySetComboBox->getText() == "Net Element") {
769  myCurrentElementSet = ELEMENTSET_NETELEMENT;
770  mySetComboBox->setTextColor(FXRGB(0, 0, 0));
771  // enable match attribute
772  mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
773  } else if (mySetComboBox->getText() == "Additional") {
774  myCurrentElementSet = ELEMENTSET_ADDITIONAL;
775  mySetComboBox->setTextColor(FXRGB(0, 0, 0));
776  // enable match attribute
777  mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
778  } else if (mySetComboBox->getText() == "Shape") {
779  myCurrentElementSet = ELEMENTSET_SHAPE;
780  mySetComboBox->setTextColor(FXRGB(0, 0, 0));
781  // enable match attribute
782  mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
783  } else {
784  myCurrentElementSet = ELEMENTSET_INVALID;
785  mySetComboBox->setTextColor(FXRGB(255, 0, 0));
786  // disable match attribute
787  mySelectorFrameParent->myMatchAttribute->disableMatchAttribute();
788  }
789  } else {
790  if (mySetComboBox->getText() == "Demand Element") {
791  myCurrentElementSet = ELEMENTSET_DEMANDELEMENT;
792  mySetComboBox->setTextColor(FXRGB(0, 0, 0));
793  // enable match attribute
794  mySelectorFrameParent->myMatchAttribute->enableMatchAttribute();
795  } else {
796  myCurrentElementSet = ELEMENTSET_INVALID;
797  mySetComboBox->setTextColor(FXRGB(255, 0, 0));
798  // disable match attribute
799  mySelectorFrameParent->myMatchAttribute->disableMatchAttribute();
800  }
801  }
802  return 1;
803 }
804 
805 // ---------------------------------------------------------------------------
806 // ModificationMode::MatchAttribute - methods
807 // ---------------------------------------------------------------------------
808 
810  FXGroupBox(selectorFrameParent->myContentFrame, "Match Attribute", GUIDesignGroupBoxFrame),
811  mySelectorFrameParent(selectorFrameParent),
812  myCurrentTag(SUMO_TAG_EDGE),
813  myCurrentAttribute(SUMO_ATTR_ID) {
814  // Create MatchTagBox for tags
816  // Create listBox for Attributes
818  // Create TextField for Match string
820  // Create help button
821  new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular);
822  // Fill list of sub-items (first element will be "edge")
824  // Set speed of edge as default attribute
825  myMatchAttrComboBox->setText("speed");
827  // Set default value for Match string
828  myMatchString->setText(">10.0");
829 }
830 
831 
833 
834 
835 void
837  // enable comboboxes and text field
838  myMatchTagComboBox->enable();
839  myMatchAttrComboBox->enable();
840  myMatchString->enable();
841  // Clear items of myMatchTagComboBox
842  myMatchTagComboBox->clearItems();
843  // Set items depending of current item set
844  std::vector<SumoXMLTag> listOfTags;
845  if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_NETELEMENT) {
846  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_NETELEMENT, true);
847  } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_ADDITIONAL) {
848  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL | GNEAttributeCarrier::TagType::TAGTYPE_TAZ, true);
849  } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_SHAPE) {
850  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_SHAPE, true);
851  } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_DEMANDELEMENT) {
852  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_DEMANDELEMENT | GNEAttributeCarrier::TagType::TAGTYPE_STOP, true);
853  } else {
854  throw ProcessError("Invalid element set");
855  }
856  // fill combo box
857  for (auto i : listOfTags) {
858  myMatchTagComboBox->appendItem(toString(i).c_str());
859  }
860  // set first item as current item
861  myMatchTagComboBox->setCurrentItem(0);
862  myMatchTagComboBox->setNumVisible(myMatchTagComboBox->getNumItems());
863  // Fill attributes with the current element type
864  onCmdSelMBTag(nullptr, 0, nullptr);
865 }
866 
867 
868 void
870  // disable comboboxes and text field
871  myMatchTagComboBox->disable();
872  myMatchAttrComboBox->disable();
873  myMatchString->disable();
874  // change colors to black (even if there are invalid values)
875  myMatchTagComboBox->setTextColor(FXRGB(0, 0, 0));
876  myMatchAttrComboBox->setTextColor(FXRGB(0, 0, 0));
877  myMatchString->setTextColor(FXRGB(0, 0, 0));
878 }
879 
880 
881 long
882 GNESelectorFrame::MatchAttribute::onCmdSelMBTag(FXObject*, FXSelector, void*) {
883  // First check what type of elementes is being selected
884  myCurrentTag = SUMO_TAG_NOTHING;
885  // find current element tag
886  std::vector<SumoXMLTag> listOfTags;
887  if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_NETELEMENT) {
888  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_NETELEMENT, true);
889  } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_ADDITIONAL) {
890  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_ADDITIONAL | GNEAttributeCarrier::TagType::TAGTYPE_TAZ, true);
891  } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_SHAPE) {
892  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_SHAPE, true);
893  } else if (mySelectorFrameParent->myElementSet->getElementSet() == ElementSet::ELEMENTSET_DEMANDELEMENT) {
894  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TagType::TAGTYPE_DEMANDELEMENT | GNEAttributeCarrier::TagType::TAGTYPE_STOP, true);
895  } else {
896  throw ProcessError("Unkown set");
897  }
898  // fill myMatchTagComboBox
899  for (auto i : listOfTags) {
900  if (toString(i) == myMatchTagComboBox->getText().text()) {
901  myCurrentTag = i;
902  }
903  }
904  // check that typed-by-user value is correct
905  if (myCurrentTag != SUMO_TAG_NOTHING) {
906  // obtain tag property (only for improve code legibility)
907  const auto& tagValue = GNEAttributeCarrier::getTagProperties(myCurrentTag);
908  // set color and enable items
909  myMatchTagComboBox->setTextColor(FXRGB(0, 0, 0));
910  myMatchAttrComboBox->enable();
911  myMatchString->enable();
912  myMatchAttrComboBox->clearItems();
913  // fill attribute combo box
914  for (auto it : tagValue) {
915  myMatchAttrComboBox->appendItem(it.getAttrStr().c_str());
916  }
917  // Add extra attribute "generic"
918  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_GENERIC).c_str());
919  // check if item can block movement
920  if (tagValue.canBlockMovement()) {
921  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_BLOCK_MOVEMENT).c_str());
922  }
923  // check if item can block shape
924  if (tagValue.canBlockShape()) {
925  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_BLOCK_SHAPE).c_str());
926  }
927  // check if item can close shape
928  if (tagValue.canCloseShape()) {
929  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_CLOSE_SHAPE).c_str());
930  }
931  // check if item can have parent
932  if (tagValue.hasParent()) {
933  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_PARENT).c_str());
934  }
935  // @ToDo: Here can be placed a button to set the default value
936  myMatchAttrComboBox->setNumVisible(myMatchAttrComboBox->getNumItems());
937  onCmdSelMBAttribute(nullptr, 0, nullptr);
938  } else {
939  // change color to red and disable items
940  myMatchTagComboBox->setTextColor(FXRGB(255, 0, 0));
941  myMatchAttrComboBox->disable();
942  myMatchString->disable();
943  }
944  update();
945  return 1;
946 }
947 
948 
949 long
951  // first obtain a copy of item attributes vinculated with current tag
952  auto tagPropertiesCopy = GNEAttributeCarrier::getTagProperties(myCurrentTag);
953  // obtain tag property (only for improve code legibility)
954  const auto& tagValue = GNEAttributeCarrier::getTagProperties(myCurrentTag);
955  // add an extra AttributeValues to allow select ACs using as criterium "generic parameters"
958  GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_STRING,
959  "Generic Parameters");
960  tagPropertiesCopy.addAttribute(extraAttrProperty);
961  // add extra attribute if item can block movement
962  if (tagValue.canBlockMovement()) {
963  // add an extra AttributeValues to allow select ACs using as criterium "block movement"
965  GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL | GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_DEFAULTVALUESTATIC,
966  "Block movement",
967  "false");
968  tagPropertiesCopy.addAttribute(extraAttrProperty);
969  }
970  // add extra attribute if item can block shape
971  if (tagValue.canBlockShape()) {
972  // add an extra AttributeValues to allow select ACs using as criterium "block shape"
974  GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL | GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_DEFAULTVALUESTATIC,
975  "Block shape",
976  "false");
977  tagPropertiesCopy.addAttribute(extraAttrProperty);
978  }
979  // add extra attribute if item can close shape
980  if (tagValue.canCloseShape()) {
981  // add an extra AttributeValues to allow select ACs using as criterium "close shape"
983  GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL | GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_DEFAULTVALUESTATIC,
984  "Close shape",
985  "true");
986  tagPropertiesCopy.addAttribute(extraAttrProperty);
987  }
988  // add extra attribute if item can have parent
989  if (tagValue.hasParent()) {
990  // add an extra AttributeValues to allow select ACs using as criterium "parent"
992  GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_STRING,
993  "Parent element");
994  tagPropertiesCopy.addAttribute(extraAttrProperty);
995  }
996  // set current selected attribute
997  myCurrentAttribute = SUMO_ATTR_NOTHING;
998  for (const auto& i : tagPropertiesCopy) {
999  if (i.getAttrStr() == myMatchAttrComboBox->getText().text()) {
1000  myCurrentAttribute = i.getAttr();
1001  }
1002  }
1003  // check if selected attribute is valid
1004  if (myCurrentAttribute != SUMO_ATTR_NOTHING) {
1005  myMatchAttrComboBox->setTextColor(FXRGB(0, 0, 0));
1006  myMatchString->enable();
1007  } else {
1008  myMatchAttrComboBox->setTextColor(FXRGB(255, 0, 0));
1009  myMatchString->disable();
1010  }
1011  return 1;
1012 }
1013 
1014 
1015 long
1017  // obtain expresion
1018  std::string expr(myMatchString->getText().text());
1019  const auto& tagValue = GNEAttributeCarrier::getTagProperties(myCurrentTag);
1020  bool valid = true;
1021  if (expr == "") {
1022  // the empty expression matches all objects
1023  mySelectorFrameParent->handleIDs(mySelectorFrameParent->getMatches(myCurrentTag, myCurrentAttribute, '@', 0, expr));
1024  } else if (tagValue.hasAttribute(myCurrentAttribute) && tagValue.getAttributeProperties(myCurrentAttribute).isNumerical()) {
1025  // The expression must have the form
1026  // <val matches if attr < val
1027  // >val matches if attr > val
1028  // =val matches if attr = val
1029  // val matches if attr = val
1030  char compOp = expr[0];
1031  if (compOp == '<' || compOp == '>' || compOp == '=') {
1032  expr = expr.substr(1);
1033  } else {
1034  compOp = '=';
1035  }
1036  // check if value can be parsed to double
1037  if (GNEAttributeCarrier::canParse<double>(expr.c_str())) {
1038  mySelectorFrameParent->handleIDs(mySelectorFrameParent->getMatches(myCurrentTag, myCurrentAttribute, compOp, GNEAttributeCarrier::parse<double>(expr.c_str()), expr));
1039  } else {
1040  valid = false;
1041  }
1042  } else {
1043  // The expression must have the form
1044  // =str: matches if <str> is an exact match
1045  // !str: matches if <str> is not a substring
1046  // ^str: matches if <str> is not an exact match
1047  // str: matches if <str> is a substring (sends compOp '@')
1048  // Alternatively, if the expression is empty it matches all objects
1049  char compOp = expr[0];
1050  if (compOp == '=' || compOp == '!' || compOp == '^') {
1051  expr = expr.substr(1);
1052  } else {
1053  compOp = '@';
1054  }
1055  mySelectorFrameParent->handleIDs(mySelectorFrameParent->getMatches(myCurrentTag, myCurrentAttribute, compOp, 0, expr));
1056  }
1057  if (valid) {
1058  myMatchString->setTextColor(FXRGB(0, 0, 0));
1059  myMatchString->killFocus();
1060  } else {
1061  myMatchString->setTextColor(FXRGB(255, 0, 0));
1062  }
1063  return 1;
1064 }
1065 
1066 
1067 long
1068 GNESelectorFrame::MatchAttribute::onCmdHelp(FXObject*, FXSelector, void*) {
1069  // Create dialog box
1070  FXDialogBox* additionalNeteditAttributesHelpDialog = new FXDialogBox(this, "Netedit Parameters Help", GUIDesignDialogBox);
1071  additionalNeteditAttributesHelpDialog->setIcon(GUIIconSubSys::getIcon(ICON_MODEADDITIONAL));
1072  // set help text
1073  std::ostringstream help;
1074  help
1075  << "- The 'Match Attribute' controls allow to specify a set of objects which are then applied to the current selection\n"
1076  << " according to the current 'Modification Mode'.\n"
1077  << " 1. Select an object type from the first input box\n"
1078  << " 2. Select an attribute from the second input box\n"
1079  << " 3. Enter a 'match expression' in the third input box and press <return>\n"
1080  << "\n"
1081  << "- The empty expression matches all objects\n"
1082  << "- For numerical attributes the match expression must consist of a comparison operator ('<', '>', '=') and a number.\n"
1083  << "- An object matches if the comparison between its attribute and the given number by the given operator evaluates to 'true'\n"
1084  << "\n"
1085  << "- For string attributes the match expression must consist of a comparison operator ('', '=', '!', '^') and a string.\n"
1086  << " '' (no operator) matches if string is a substring of that object'ts attribute.\n"
1087  << " '=' matches if string is an exact match.\n"
1088  << " '!' matches if string is not a substring.\n"
1089  << " '^' matches if string is not an exact match.\n"
1090  << "\n"
1091  << "- Examples:\n"
1092  << " junction; id; 'foo' -> match all junctions that have 'foo' in their id\n"
1093  << " junction; type; '=priority' -> match all junctions of type 'priority', but not of type 'priority_stop'\n"
1094  << " edge; speed; '>10' -> match all edges with a speed above 10\n";
1095  // Create label with the help text
1096  new FXLabel(additionalNeteditAttributesHelpDialog, help.str().c_str(), nullptr, GUIDesignLabelFrameInformation);
1097  // Create horizontal separator
1098  new FXHorizontalSeparator(additionalNeteditAttributesHelpDialog, GUIDesignHorizontalSeparator);
1099  // Create frame for OK Button
1100  FXHorizontalFrame* myHorizontalFrameOKButton = new FXHorizontalFrame(additionalNeteditAttributesHelpDialog, GUIDesignAuxiliarHorizontalFrame);
1101  // Create Button Close (And two more horizontal frames to center it)
1102  new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame);
1103  new FXButton(myHorizontalFrameOKButton, "OK\t\tclose", GUIIconSubSys::getIcon(ICON_ACCEPT), additionalNeteditAttributesHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK);
1104  new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame);
1105  // Write Warning in console if we're in testing mode
1106  WRITE_DEBUG("Opening help dialog of selector frame");
1107  // create Dialog
1108  additionalNeteditAttributesHelpDialog->create();
1109  // show in the given position
1110  additionalNeteditAttributesHelpDialog->show(PLACEMENT_CURSOR);
1111  // refresh APP
1112  getApp()->refresh();
1113  // open as modal dialog (will block all windows until stop() or stopModal() is called)
1114  getApp()->runModalFor(additionalNeteditAttributesHelpDialog);
1115  // Write Warning in console if we're in testing mode
1116  WRITE_DEBUG("Close help dialog of selector frame");
1117  return 1;
1118 }
1119 
1120 // ---------------------------------------------------------------------------
1121 // ModificationMode::VisualScaling - methods
1122 // ---------------------------------------------------------------------------
1123 
1125  FXGroupBox(selectorFrameParent->myContentFrame, "Visual Scaling", GUIDesignGroupBoxFrame),
1126  mySelectorFrameParent(selectorFrameParent) {
1127  // Create spin button and configure it
1128  mySelectionScaling = new FXRealSpinner(this, 7, this, MID_GNE_SELECTORFRAME_SELECTSCALE, GUIDesignSpinDial);
1129  //mySelectionScaling->setNumberFormat(1);
1130  //mySelectionScaling->setIncrements(0.1, .5, 1);
1131  mySelectionScaling->setIncrement(0.5);
1132  mySelectionScaling->setRange(1, 100000);
1133  mySelectionScaling->setValue(1);
1134  mySelectionScaling->setHelpText("Enlarge selected objects");
1135 }
1136 
1137 
1139 
1140 
1141 long
1143  // set scale in viewnet
1144  mySelectorFrameParent->myViewNet->setSelectionScaling(mySelectionScaling->getValue());
1145  mySelectorFrameParent->myViewNet->update();
1146  return 1;
1147 }
1148 
1149 // ---------------------------------------------------------------------------
1150 // ModificationMode::SelectionOperation - methods
1151 // ---------------------------------------------------------------------------
1152 
1154  FXGroupBox(selectorFrameParent->myContentFrame, "Operations for selections", GUIDesignGroupBoxFrame),
1155  mySelectorFrameParent(selectorFrameParent) {
1156  // Create "Clear List" Button
1157  new FXButton(this, "Clear\t\t", nullptr, this, MID_CHOOSEN_CLEAR, GUIDesignButton);
1158  // Create "Invert" Button
1159  new FXButton(this, "Invert\t\t", nullptr, this, MID_CHOOSEN_INVERT, GUIDesignButton);
1160  // Create "Save" Button
1161  new FXButton(this, "Save\t\tSave ids of currently selected objects to a file.", nullptr, this, MID_CHOOSEN_SAVE, GUIDesignButton);
1162  // Create "Load" Button
1163  new FXButton(this, "Load\t\tLoad ids from a file according to the current modfication mode.", nullptr, this, MID_CHOOSEN_LOAD, GUIDesignButton);
1164 }
1165 
1166 
1168 
1169 
1170 long
1172  // get the new file name
1173  FXFileDialog opendialog(this, "Open List of Selected Items");
1174  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY));
1175  opendialog.setSelectMode(SELECTFILE_EXISTING);
1176  opendialog.setPatternList("Selection files (*.txt)\nAll files (*)");
1177  if (gCurrentFolder.length() != 0) {
1178  opendialog.setDirectory(gCurrentFolder);
1179  }
1180  if (opendialog.execute()) {
1181  std::vector<GNEAttributeCarrier*> loadedACs;
1182  gCurrentFolder = opendialog.getDirectory();
1183  std::string file = opendialog.getFilename().text();
1184  std::ostringstream msg;
1185  std::ifstream strm(file.c_str());
1186  // check if file can be opened
1187  if (!strm.good()) {
1188  WRITE_ERROR("Could not open '" + file + "'.");
1189  return 0;
1190  }
1191  while (strm.good()) {
1192  std::string line;
1193  strm >> line;
1194  // check if line isn't empty
1195  if (line.length() != 0) {
1196  // obtain GLObject
1198  // check if GUIGlObject exist and their their GL type isn't blocked
1199  if ((object != nullptr) && !mySelectorFrameParent->myLockGLObjectTypes->IsObjectTypeLocked(object->getType())) {
1200  // obtain GNEAttributeCarrier
1201  GNEAttributeCarrier* AC = mySelectorFrameParent->myViewNet->getNet()->retrieveAttributeCarrier(object->getGlID(), false);
1202  // check if AC exist and if is selectable
1203  if (AC && AC->getTagProperty().isSelectable())
1204  // now check if we're in the correct supermode to load this element
1205  if (((mySelectorFrameParent->myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) && !AC->getTagProperty().isDemandElement()) ||
1206  ((mySelectorFrameParent->myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_DEMAND) && AC->getTagProperty().isDemandElement())) {
1207  loadedACs.push_back(AC);
1208  }
1209  }
1210  }
1211  }
1212  // change selected attribute in loaded ACs allowing undo/redo
1213  if (loadedACs.size() > 0) {
1214  mySelectorFrameParent->myViewNet->getUndoList()->p_begin("load selection");
1215  mySelectorFrameParent->handleIDs(loadedACs);
1216  mySelectorFrameParent->myViewNet->getUndoList()->p_end();
1217  }
1218  }
1219  mySelectorFrameParent->myViewNet->update();
1220  return 1;
1221 }
1222 
1223 
1224 long
1226  FXString file = MFXUtils::getFilename2Write(
1227  this, "Save List of selected Items", ".txt", GUIIconSubSys::getIcon(ICON_EMPTY), gCurrentFolder);
1228  if (file == "") {
1229  return 1;
1230  }
1231  try {
1232  OutputDevice& dev = OutputDevice::getDevice(file.text());
1233  for (auto i : mySelectorFrameParent->myViewNet->getNet()->getSelectedAttributeCarriers(false)) {
1234  GUIGlObject* object = dynamic_cast<GUIGlObject*>(i);
1235  if (object) {
1236  dev << GUIGlObject::TypeNames.getString(object->getType()) << ":" << i->getID() << "\n";
1237  }
1238  }
1239  dev.close();
1240  } catch (IOError& e) {
1241  // write warning if netedit is running in testing mode
1242  WRITE_DEBUG("Opening FXMessageBox 'error storing selection'");
1243  // open message box error
1244  FXMessageBox::error(this, MBOX_OK, "Storing Selection failed", "%s", e.what());
1245  // write warning if netedit is running in testing mode
1246  WRITE_DEBUG("Closed FXMessageBox 'error storing selection' with 'OK'");
1247  }
1248  return 1;
1249 }
1250 
1251 
1252 long
1254  // clear current selection
1255  mySelectorFrameParent->clearCurrentSelection();
1256  return 1;
1257 }
1258 
1259 
1260 long
1262  // only continue if there is element for selecting
1263  if (mySelectorFrameParent->ACsToSelected()) {
1264  // obtan locks (only for improve code legibly)
1265  LockGLObjectTypes* locks = mySelectorFrameParent->getLockGLObjectTypes();
1266  // for invert selection, first clean current selection and next select elements of set "unselectedElements"
1267  mySelectorFrameParent->myViewNet->getUndoList()->p_begin("invert selection");
1268  // invert selection of elements depending of current supermode
1269  if (mySelectorFrameParent->myViewNet->getEditModes().currentSupermode == GNE_SUPERMODE_NETWORK) {
1270  // iterate over junctions
1271  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().junctions) {
1272  // check if junction selection is locked
1273  if (!locks->IsObjectTypeLocked(GLO_JUNCTION)) {
1274  if (i.second->isAttributeCarrierSelected()) {
1275  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1276  } else {
1277  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1278  }
1279  }
1280  // due we iterate over all junctions, only it's neccesary iterate over incoming edges
1281  for (const auto& j : i.second->getGNEIncomingEdges()) {
1282  // only select edges if "select edges" flag is enabled. In other case, select only lanes
1283  if (mySelectorFrameParent->myViewNet->getNetworkViewOptions().selectEdges()) {
1284  // check if edge selection is locked
1285  if (!locks->IsObjectTypeLocked(GLO_EDGE)) {
1286  if (j->isAttributeCarrierSelected()) {
1287  j->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1288  } else {
1289  j->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1290  }
1291  }
1292  } else {
1293  // check if lane selection is locked
1294  if (!locks->IsObjectTypeLocked(GLO_LANE)) {
1295  for (auto k : j->getLanes()) {
1296  if (k->isAttributeCarrierSelected()) {
1297  k->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1298  } else {
1299  k->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1300  }
1301  }
1302  }
1303  }
1304  // check if connection selection is locked
1305  if (!locks->IsObjectTypeLocked(GLO_CONNECTION)) {
1306  for (const auto& k : j->getGNEConnections()) {
1307  if (k->isAttributeCarrierSelected()) {
1308  k->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1309  } else {
1310  k->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1311  }
1312  }
1313  }
1314  }
1315  // check if crossing selection is locked
1316  if (!locks->IsObjectTypeLocked(GLO_CROSSING)) {
1317  for (const auto& j : i.second->getGNECrossings()) {
1318  if (j->isAttributeCarrierSelected()) {
1319  j->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1320  } else {
1321  j->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1322  }
1323  }
1324  }
1325  }
1326  // check if additionals selection is locked
1327  if (!locks->IsObjectTypeLocked(GLO_ADDITIONAL)) {
1328  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().additionals) {
1329  // first check if additional is selectable
1331  for (const auto& j : i.second) {
1332  if (j.second->isAttributeCarrierSelected()) {
1333  j.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1334  } else {
1335  j.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1336  }
1337  }
1338  }
1339  }
1340  }
1341  // select polygons
1342  if (!locks->IsObjectTypeLocked(GLO_POLYGON)) {
1343  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getPolygons()) {
1344  GNEShape* shape = dynamic_cast<GNEShape*>(i.second);
1345  if (shape->isAttributeCarrierSelected()) {
1346  shape->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1347  } else {
1348  shape->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1349  }
1350  }
1351  }
1352  // select POIs
1353  if (!locks->IsObjectTypeLocked(GLO_POI)) {
1354  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getPOIs()) {
1355  GNEShape* shape = dynamic_cast<GNEShape*>(i.second);
1356  if (shape->isAttributeCarrierSelected()) {
1357  shape->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1358  } else {
1359  shape->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1360  }
1361  }
1362  }
1363  } else {
1364  // select routes
1365  if (!locks->IsObjectTypeLocked(GLO_ROUTE)) {
1366  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_ROUTE)) {
1367  if (i.second->isAttributeCarrierSelected()) {
1368  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1369  } else {
1370  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1371  }
1372  }
1373  }
1374  // select embedded routes
1375  if (!locks->IsObjectTypeLocked(GLO_EMBEDDEDROUTE)) {
1376  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_EMBEDDEDROUTE)) {
1377  if (i.second->isAttributeCarrierSelected()) {
1378  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1379  } else {
1380  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1381  }
1382  }
1383  }
1384  // select vehicles
1385  if (!locks->IsObjectTypeLocked(GLO_VEHICLE)) {
1386  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_VEHICLE)) {
1387  if (i.second->isAttributeCarrierSelected()) {
1388  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1389  } else {
1390  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1391  }
1392  }
1393  }
1394  // select trips
1395  if (!locks->IsObjectTypeLocked(GLO_TRIP)) {
1396  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_TRIP)) {
1397  if (i.second->isAttributeCarrierSelected()) {
1398  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1399  } else {
1400  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1401  }
1402  }
1403  }
1404  // select flows
1405  if (!locks->IsObjectTypeLocked(GLO_FLOW)) {
1406  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_FLOW)) {
1407  if (i.second->isAttributeCarrierSelected()) {
1408  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1409  } else {
1410  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1411  }
1412  }
1413  }
1414  // select route flows
1415  if (!locks->IsObjectTypeLocked(GLO_ROUTEFLOW)) {
1416  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_ROUTEFLOW)) {
1417  if (i.second->isAttributeCarrierSelected()) {
1418  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1419  } else {
1420  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1421  }
1422  }
1423  }
1424  // select stops
1425  if (!locks->IsObjectTypeLocked(GLO_STOP)) {
1426  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_STOP_LANE)) {
1427  if (i.second->isAttributeCarrierSelected()) {
1428  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1429  } else {
1430  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1431  }
1432  }
1433  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_STOP_BUSSTOP)) {
1434  if (i.second->isAttributeCarrierSelected()) {
1435  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1436  } else {
1437  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1438  }
1439  }
1440  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_STOP_CONTAINERSTOP)) {
1441  if (i.second->isAttributeCarrierSelected()) {
1442  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1443  } else {
1444  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1445  }
1446  }
1447  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_STOP_CHARGINGSTATION)) {
1448  if (i.second->isAttributeCarrierSelected()) {
1449  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1450  } else {
1451  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1452  }
1453  }
1454  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_STOP_PARKINGAREA)) {
1455  if (i.second->isAttributeCarrierSelected()) {
1456  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1457  } else {
1458  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1459  }
1460  }
1461  }
1462  // select person
1463  if (!locks->IsObjectTypeLocked(GLO_PERSON)) {
1464  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_PERSON)) {
1465  if (i.second->isAttributeCarrierSelected()) {
1466  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1467  } else {
1468  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1469  }
1470  }
1471  }
1472  // select person flow
1473  if (!locks->IsObjectTypeLocked(GLO_PERSONFLOW)) {
1474  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_PERSONFLOW)) {
1475  if (i.second->isAttributeCarrierSelected()) {
1476  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1477  } else {
1478  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1479  }
1480  }
1481  }
1482  // select person trip
1483  if (!locks->IsObjectTypeLocked(GLO_PERSONTRIP)) {
1484  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_PERSONTRIP_FROMTO)) {
1485  if (i.second->isAttributeCarrierSelected()) {
1486  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1487  } else {
1488  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1489  }
1490  }
1491  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_PERSONTRIP_BUSSTOP)) {
1492  if (i.second->isAttributeCarrierSelected()) {
1493  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1494  } else {
1495  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1496  }
1497  }
1498  }
1499  // select ride
1500  if (!locks->IsObjectTypeLocked(GLO_RIDE)) {
1501  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_RIDE_FROMTO)) {
1502  if (i.second->isAttributeCarrierSelected()) {
1503  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1504  } else {
1505  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1506  }
1507  }
1508  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_RIDE_BUSSTOP)) {
1509  if (i.second->isAttributeCarrierSelected()) {
1510  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1511  } else {
1512  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1513  }
1514  }
1515  }
1516  // select walks
1517  if (!locks->IsObjectTypeLocked(GLO_WALK)) {
1518  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_WALK_FROMTO)) {
1519  if (i.second->isAttributeCarrierSelected()) {
1520  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1521  } else {
1522  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1523  }
1524  }
1525  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_WALK_BUSSTOP)) {
1526  if (i.second->isAttributeCarrierSelected()) {
1527  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1528  } else {
1529  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1530  }
1531  }
1532  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_WALK_ROUTE)) {
1533  if (i.second->isAttributeCarrierSelected()) {
1534  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1535  } else {
1536  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1537  }
1538  }
1539  }
1540  // select person stops
1541  if (!locks->IsObjectTypeLocked(GLO_PERSONSTOP)) {
1542  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_PERSONSTOP_LANE)) {
1543  if (i.second->isAttributeCarrierSelected()) {
1544  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1545  } else {
1546  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1547  }
1548  }
1549 
1550  for (const auto& i : mySelectorFrameParent->myViewNet->getNet()->getAttributeCarriers().demandElements.at(SUMO_TAG_PERSONSTOP_BUSSTOP)) {
1551  if (i.second->isAttributeCarrierSelected()) {
1552  i.second->setAttribute(GNE_ATTR_SELECTED, "false", mySelectorFrameParent->myViewNet->getUndoList());
1553  } else {
1554  i.second->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->myViewNet->getUndoList());
1555  }
1556  }
1557  }
1558  }
1559  // finish selection operation
1560  mySelectorFrameParent->myViewNet->getUndoList()->p_end();
1561  // update view
1562  mySelectorFrameParent->myViewNet->update();
1563  }
1564  return 1;
1565 }
1566 
1567 
1568 bool
1571  // check if exist junction and edges
1573  return true;
1574  }
1576  return true;
1577  }
1578  // check if additionals selection is locked
1580  for (const auto& i : myViewNet->getNet()->getAttributeCarriers().additionals) {
1581  // first check if additional is selectable
1582  if (GNEAttributeCarrier::getTagProperties(i.first).isSelectable() && (myViewNet->getNet()->getAttributeCarriers().additionals.at(i.first).size() > 0)) {
1583  return true;
1584  }
1585  }
1586  }
1587  // select polygons
1589  return true;
1590  }
1591  // select POIs
1593  return true;
1594  }
1595  } else {
1596  // select routes
1598  return true;
1599  }
1600  // select embedded routes
1602  return true;
1603  }
1604  // select vehicles
1606  return true;
1607  }
1608  // select trips
1610  return true;
1611  }
1612  // select flows
1614  return true;
1615  }
1616  // select route flows
1618  return true;
1619  }
1620  // select stops
1626  return true;
1627  }
1628  }
1629  // select person
1631  return true;
1632  }
1633  // select person flows
1635  return true;
1636  }
1637  // select persontrips
1641  return true;
1642  }
1643  }
1644  // select ride
1648  return true;
1649  }
1650  }
1651  // select walks
1656  return true;
1657  }
1658  }
1659  // select person stops
1663  return true;
1664  }
1665  }
1666  }
1667  // nothing to select
1668  return false;
1669 }
1670 
1671 /****************************************************************************/
GUIGlObject::getType
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.cpp:181
GNESelectorFrame::ModificationMode::myAddRadioButton
FXRadioButton * myAddRadioButton
add radio button
Definition: GNESelectorFrame.h:159
GNESelectorFrame::~GNESelectorFrame
~GNESelectorFrame()
Destructor.
Definition: GNESelectorFrame.cpp:109
SUMO_TAG_WALK_FROMTO
Definition: SUMOXMLDefinitions.h:308
FXDEFMAP
FXDEFMAP(GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry) ObjectTypeEntryMap[]
GNESelectorFrame::ModificationMode::getModificationMode
SetOperation getModificationMode() const
get current modification mode
Definition: GNESelectorFrame.cpp:684
GNESelectorFrame::ModificationMode::SET_DEFAULT
Definition: GNESelectorFrame.h:134
GLO_CONNECTION
a connection
Definition: GUIGlObjectTypes.h:55
GUIDesignAuxiliarHorizontalFrame
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:289
GNENet::getAttributeCarriers
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
Definition: GNENet.cpp:1014
ICON_ACCEPT
Definition: GUIIcons.h:380
GUIDesignSpinDial
#define GUIDesignSpinDial
Definition: GUIDesigns.h:357
GNESelectorFrame::handleIDs
void handleIDs(const std::vector< GNEAttributeCarrier * > &ACs, ModificationMode::SetOperation setop=ModificationMode::SET_DEFAULT)
apply list of ids to the current selection according to SetOperation,
Definition: GNESelectorFrame.cpp:371
SUMO_TAG_STOP_PARKINGAREA
stop placed over a parking area (used in netedit)
Definition: SUMOXMLDefinitions.h:189
GUIDesignTextFieldNCol
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:58
GNEAdditional.h
MID_CHOOSEN_INVERT
Deselect selected items.
Definition: GUIAppEnum.h:507
GNESelectorFrame::getModificationModeModul
ModificationMode * getModificationModeModul() const
get modification mode modul
Definition: GNESelectorFrame.cpp:454
GNENet::AttributeCarriers::junctions
std::map< std::string, GNEJunction * > junctions
map with the name and pointer to junctions of net
Definition: GNENet.h:96
SUMO_TAG_STOP_LANE
stop placed over a lane (used in netedit)
Definition: SUMOXMLDefinitions.h:181
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
GNESelectorFrame::show
void show()
show Frame
Definition: GNESelectorFrame.cpp:113
StringBijection::getString
const std::string & getString(const T key) const
Definition: StringBijection.h:107
GNEUndoList::p_end
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
Definition: GNEUndoList.cpp:80
GNESelectorFrame::ModificationMode::SET_RESTRICT
Definition: GNESelectorFrame.h:132
GLO_PERSONTRIP
a person trip
Definition: GUIGlObjectTypes.h:128
ICON_EMPTY
Definition: GUIIcons.h:42
GNESelectorFrame::ModificationMode::myRemoveRadioButton
FXRadioButton * myRemoveRadioButton
remove radio button
Definition: GNESelectorFrame.h:162
GNESelectorFrame::VisualScaling::~VisualScaling
~VisualScaling()
destructor
Definition: GNESelectorFrame.cpp:1138
SUMO_TAG_WALK_ROUTE
Definition: SUMOXMLDefinitions.h:310
GLO_PERSONSTOP
a person stop
Definition: GUIGlObjectTypes.h:136
GNESelectorFrame::ModificationMode
Definition: GNESelectorFrame.h:123
GNESelectorFrame::ModificationMode::SET_REPLACE
Definition: GNESelectorFrame.h:133
MID_CHOOSEN_CLEAR
Clear set.
Definition: GUIAppEnum.h:501
GNESelectorFrame::ModificationMode::myKeepRadioButton
FXRadioButton * myKeepRadioButton
keep button
Definition: GNESelectorFrame.h:165
GUIGlObject::TypeNames
static StringBijection< GUIGlObjectType > TypeNames
associates object types with strings
Definition: GUIGlObject.h:69
GNESelectorFrame::ElementSet::getElementSet
ElementSetType getElementSet() const
get current selected element set
Definition: GNESelectorFrame.cpp:741
GNESelectorFrame::LockGLObjectTypes::~LockGLObjectTypes
~LockGLObjectTypes()
destructor
Definition: GNESelectorFrame.cpp:559
SUMO_TAG_PERSON
Definition: SUMOXMLDefinitions.h:296
GNESelectorFrame::ElementSet::ELEMENTSET_NETELEMENT
Definition: GNESelectorFrame.h:185
GNENet::getSelectedAttributeCarriers
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
Definition: GNENet.cpp:2073
ICON_MODEADDITIONAL
Definition: GUIIcons.h:214
GUIDesignButtonOK
#define GUIDesignButtonOK
Definition: GUIDesigns.h:114
GNESelectorFrame::SelectionOperation::~SelectionOperation
~SelectionOperation()
destructor
Definition: GNESelectorFrame.cpp:1167
GUIDesignComboBoxNCol
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:233
GNEFrame
Definition: GNEFrame.h:35
GNESelectorFrame::MatchAttribute::disableMatchAttribute
void disableMatchAttribute()
disable match attributes
Definition: GNESelectorFrame.cpp:869
GNEViewNet
Definition: GNEViewNet.h:43
GLO_FLOW
a flow
Definition: GUIGlObjectTypes.h:146
SUMO_ATTR_SPEED
Definition: SUMOXMLDefinitions.h:385
GLO_PERSON
Definition: GUIGlObjectTypes.h:160
GNESelectorFrame::hide
void hide()
hide Frame
Definition: GNESelectorFrame.cpp:124
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
SUMO_TAG_NOTHING
invalid tag
Definition: SUMOXMLDefinitions.h:44
GLO_VEHICLE
Definition: GUIGlObjectTypes.h:142
GUIDesigns.h
GNESelectorFrame::myElementSet
ElementSet * myElementSet
modul for select element set
Definition: GNESelectorFrame.h:422
GLO_CROSSING
a tl-logic
Definition: GUIGlObjectTypes.h:53
GUIDesignTextField
#define GUIDesignTextField
Definition: GUIDesigns.h:34
GNESelectorFrame::ElementSet::ELEMENTSET_ADDITIONAL
Definition: GNESelectorFrame.h:186
MID_GNE_SET_ATTRIBUTE
attribute edited
Definition: GUIAppEnum.h:619
GNEViewNet::update
void update() const
Mark the entire GNEViewNet to be repainted later.
Definition: GNEViewNet.cpp:292
GNENet::AttributeCarriers::additionals
std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > additionals
map with the name and pointer to additional elements of net
Definition: GNENet.h:102
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:602
GNESelectorFrame::MatchAttribute::enableMatchAttribute
void enableMatchAttribute()
enable match attributes
Definition: GNESelectorFrame.cpp:836
GNESelectorFrame::SelectionOperation::onCmdInvert
long onCmdInvert(FXObject *, FXSelector, void *)
Called when the user presses the Invert-button.
Definition: GNESelectorFrame.cpp:1261
OutputDevice::close
void close()
Closes the device and removes it from the dictionary.
Definition: OutputDevice.cpp:208
GLO_RIDE
Definition: GUIGlObjectTypes.h:124
GLO_PERSONFLOW
a person flow
Definition: GUIGlObjectTypes.h:162
GNEFrame::myContentFrame
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:123
MID_CHOOSEN_ELEMENTS
set subset of elements
Definition: GUIAppEnum.h:495
GNESelectorFrame::ModificationMode::SET_SUB
Definition: GNESelectorFrame.h:131
MID_CHOOSEN_LOAD
Load set.
Definition: GUIAppEnum.h:497
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:42
GNESelectorFrame::MatchAttribute::myMatchTagComboBox
FXComboBox * myMatchTagComboBox
tag of the match box
Definition: GNESelectorFrame.h:284
MFXUtils::getFilename2Write
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString &currentFolder)
Returns the file name to write.
Definition: MFXUtils.cpp:84
GUIDesignButton
#define GUIDesignButton
Definition: GUIDesigns.h:66
GNESelectorFrame::VisualScaling::VisualScaling
VisualScaling()
FOX needs this.
Definition: GNESelectorFrame.h:324
GNESelectorFrame::ModificationMode::ModificationMode
ModificationMode()
FOX needs this.
Definition: GNESelectorFrame.h:155
GNESelectorFrame::MatchAttribute::myMatchAttrComboBox
FXComboBox * myMatchAttrComboBox
attributes of the match box
Definition: GNESelectorFrame.h:287
GUIGlObjectStorage.h
GNESelectorFrame
Definition: GNESelectorFrame.h:33
GLO_POLYGON
a polygon
Definition: GUIGlObjectTypes.h:105
GUIAppEnum.h
GNEJunction.h
GUIDesignLabelFrameInformation
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:210
GUIGlObjectType
GUIGlObjectType
Definition: GUIGlObjectTypes.h:40
GUIDesignButtonRectangular
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons)
Definition: GUIDesigns.h:72
MID_HELP
help button
Definition: GUIAppEnum.h:536
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:927
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::myLabelCounter
FXLabel * myLabelCounter
label counter
Definition: GNESelectorFrame.h:81
GNENet::AttributeCarriers::edges
std::map< std::string, GNEEdge * > edges
map with the name and pointer to edges of net
Definition: GNENet.h:99
GNESelectorFrame::ElementSet::~ElementSet
~ElementSet()
destructor
Definition: GNESelectorFrame.cpp:737
GNERoute.h
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::hideObjectTypeEntry
void hideObjectTypeEntry()
hide ObjectTypeEntry
Definition: GNESelectorFrame.cpp:623
GNESelectorFrame::ElementSet::ElementSet
ElementSet()
FOX needs this.
Definition: GNESelectorFrame.h:216
GNESelectorFrame::VisualScaling::onCmdScaleSelection
long onCmdScaleSelection(FXObject *, FXSelector, void *)
Called when the user changes visual scaling.
Definition: GNESelectorFrame.cpp:1142
GNESelectorFrame::VisualScaling
Definition: GNESelectorFrame.h:303
SUMO_TAG_ROUTEFLOW
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:152
GNESelectorFrame::LockGLObjectTypes
Definition: GNESelectorFrame.h:41
NamedObjectCont::size
int size() const
Returns the number of stored items within the container.
Definition: NamedObjectCont.h:117
SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
Definition: SUMOXMLDefinitions.h:150
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1171
SUMO_TAG_STOP_CHARGINGSTATION
stop placed over a charging station (used in netedit)
Definition: SUMOXMLDefinitions.h:187
GNEShape
Definition: GNEShape.h:35
GNEAttributeCarrier::AttributeProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:99
GNEAttributeCarrier::allowedTagsByCategory
static std::vector< SumoXMLTag > allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables)
get tags of all editable element types using TagProperty Type (TAGTYPE_NETELEMENT,...
Definition: GNEAttributeCarrier.cpp:1231
SUMO_TAG_PERSONSTOP_LANE
Definition: SUMOXMLDefinitions.h:314
GNESelectorFrame::MatchAttribute::onCmdSelMBString
long onCmdSelMBString(FXObject *, FXSelector, void *)
Called when the user enters a new selection expression.
Definition: GNESelectorFrame.cpp:1016
GNESelectorFrame::LockGLObjectTypes::LockGLObjectTypes
LockGLObjectTypes(GNESelectorFrame *selectorFrameParent)
constructor
Definition: GNESelectorFrame.cpp:528
GNESelectorFrame::LockGLObjectTypes::showTypeEntries
void showTypeEntries()
show type Entries (depending if we're in Network or demand supermode)
Definition: GNESelectorFrame.cpp:590
GUIDesignMatrixLockGLTypes
#define GUIDesignMatrixLockGLTypes
Matrix for pack GLTypes (used in GNESelectorFrame)
Definition: GUIDesigns.h:270
GUIDesignHorizontalSeparator
#define GUIDesignHorizontalSeparator
Definition: GUIDesigns.h:337
GNEAttributeCarrier::TagProperties::isDemandElement
bool isDemandElement() const
return true if tag correspond to a demand element
Definition: GNEAttributeCarrier.cpp:713
SUMO_ATTR_NOTHING
invalid attribute
Definition: SUMOXMLDefinitions.h:375
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::ObjectTypeEntry
ObjectTypeEntry()
FOX needs this.
Definition: GNESelectorFrame.h:77
GNEViewNet.h
GNESelectorFrame::ElementSet::ElementSetType
ElementSetType
FOX-declaration.
Definition: GNESelectorFrame.h:184
GNEViewNet::autoSelectNodes
bool autoSelectNodes()
whether to autoselect nodes or to lanes
Definition: GNEViewNet.cpp:488
GUIGlObject::getGlID
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.cpp:150
update
GNESelectorFrame::MatchAttribute::myMatchString
FXTextField * myMatchString
string of the match
Definition: GNESelectorFrame.h:296
GLO_WALK
a walk
Definition: GUIGlObjectTypes.h:126
SUMO_TAG_EDGE
begin/end of the description of an edge
Definition: SUMOXMLDefinitions.h:48
GUIDesignLabelLeft
#define GUIDesignLabelLeft
Definition: GUIDesigns.h:165
GNE_ATTR_CLOSE_SHAPE
Close shape of a polygon (Used by GNEPolys)
Definition: SUMOXMLDefinitions.h:982
GNE_SUPERMODE_NETWORK
Network mode (Edges, junctions, etc..)
Definition: GNEViewNetHelper.h:47
ProcessError
Definition: UtilExceptions.h:40
GNEViewNetHelper::EditModes::currentSupermode
Supermode currentSupermode
the current supermode
Definition: GNEViewNetHelper.h:309
GLO_ROUTE
Definition: GUIGlObjectTypes.h:116
GUIDesignCheckButton
#define GUIDesignCheckButton
checkButton placed in left position
Definition: GUIDesigns.h:131
GLO_TRIP
a trip
Definition: GUIGlObjectTypes.h:144
GLO_EDGE
an edge
Definition: GUIGlObjectTypes.h:47
GNESelectorFrame::SelectionOperation
Definition: GNESelectorFrame.h:338
GNEEdge.h
MID_GNE_SELECTORFRAME_PROCESSSTRING
process string
Definition: GUIAppEnum.h:689
GNE_ATTR_BLOCK_SHAPE
block shape of a graphic element (Used mainly in GNEShapes)
Definition: SUMOXMLDefinitions.h:980
GNEFrame::myViewNet
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:120
GNEViewNet::getUndoList
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:933
GNESelectorFrame::ElementSet::ELEMENTSET_DEMANDELEMENT
Definition: GNESelectorFrame.h:188
GLO_POI
a poi
Definition: GUIGlObjectTypes.h:107
GUIDesignGroupBoxFrame
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:255
GLO_LANE
a lane
Definition: GUIGlObjectTypes.h:49
GNESelectorFrame::MatchAttribute::myCurrentAttribute
SumoXMLAttr myCurrentAttribute
current SumoXMLTag Attribute
Definition: GNESelectorFrame.h:293
MID_GNE_SELECTORFRAME_SELECTSCALE
changes the visual scaling of selected items
Definition: GUIAppEnum.h:691
SUMO_TAG_PERSONTRIP_BUSSTOP
Definition: SUMOXMLDefinitions.h:306
GNESelectorFrame::getMatches
std::vector< GNEAttributeCarrier * > getMatches(SumoXMLTag ACTag, SumoXMLAttr ACAttr, char compOp, double val, const std::string &expr)
return ACs of the given type with matching attrs
Definition: GNESelectorFrame.cpp:466
GUIGlObjectStorage::getObjectBlocking
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
Definition: GUIGlObjectStorage.cpp:63
GNESelectorFrame::ModificationMode::SET_ADD
Definition: GNESelectorFrame.h:130
GNESelectorFrame::ElementSet::refreshElementSet
void refreshElementSet()
refresh element set
Definition: GNESelectorFrame.cpp:747
GUIGlObject
Definition: GUIGlObject.h:66
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::myCheckBoxLocked
FXCheckButton * myCheckBoxLocked
check box to check if GLObject type is blocked
Definition: GNESelectorFrame.h:87
MID_GNE_SELECTORFRAME_SELECTATTRIBUTE
select attribute in selector frame
Definition: GUIAppEnum.h:687
GNECrossing.h
gCurrentFolder
FXString gCurrentFolder
The folder used as last.
Definition: GUIIOGlobals.cpp:33
GNENet::AttributeCarriers::demandElements
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
Definition: GNENet.h:105
SUMO_TAG_VEHICLE
description of a vehicle
Definition: SUMOXMLDefinitions.h:120
GNESelectorFrame::SelectionOperation::onCmdClear
long onCmdClear(FXObject *, FXSelector, void *)
Called when the user presses the Clear-button.
Definition: GNESelectorFrame.cpp:1253
GNESelectorFrame::SelectionOperation::SelectionOperation
SelectionOperation()
FOX needs this.
Definition: GNESelectorFrame.h:378
GNELane.h
GNESelectorFrame::ModificationMode::~ModificationMode
~ModificationMode()
destructor
Definition: GNESelectorFrame.cpp:680
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::myLabelTypeName
FXLabel * myLabelTypeName
label type nane
Definition: GNESelectorFrame.h:84
GNESelectorFrame::SelectionOperation::onCmdSave
long onCmdSave(FXObject *, FXSelector, void *)
Called when the user presses the Save-button.
Definition: GNESelectorFrame.cpp:1225
GNESelectorFrame::MatchAttribute::onCmdSelMBTag
long onCmdSelMBTag(FXObject *, FXSelector, void *)
Called when the user selectes a tag in the match box.
Definition: GNESelectorFrame.cpp:882
GNESelectorFrame::myModificationMode
ModificationMode * myModificationMode
modul for change modification mode
Definition: GNESelectorFrame.h:419
ShapeContainer::getPOIs
const POIs & getPOIs() const
Returns all pois.
Definition: ShapeContainer.h:155
MID_CHOOSEN_SAVE
Save set.
Definition: GUIAppEnum.h:499
GNENet::retrieveAttributeCarriers
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag type=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
Definition: GNENet.cpp:1308
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry
class for object types entries
Definition: GNESelectorFrame.h:45
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
GNE_ATTR_GENERIC
generic attribute
Definition: SUMOXMLDefinitions.h:986
GNEAttributeCarrier::TagProperties::isSelectable
bool isSelectable() const
return true if tag correspond to a selectable element
Definition: GNEAttributeCarrier.cpp:796
GNESelectorFrame.h
SUMO_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop (used in netedit)
Definition: SUMOXMLDefinitions.h:185
OutputDevice::getDevice
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
Definition: OutputDevice.cpp:55
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::showObjectTypeEntry
void showObjectTypeEntry()
show ObjectTypeEntry
Definition: GNESelectorFrame.cpp:615
GNESelectorFrame::LockGLObjectTypes::myTypeEntries
std::map< GUIGlObjectType, std::pair< Supermode, ObjectTypeEntry * > > myTypeEntries
check boxes for type-based selection locking and selected object counts
Definition: GNESelectorFrame.h:116
GNESelectorFrame::MatchAttribute
Definition: GNESelectorFrame.h:233
GNE_SUPERMODE_DEMAND
Demanding mode (Routes, Vehicles etc..)
Definition: GNEViewNetHelper.h:49
GUIDesignRadioButton
#define GUIDesignRadioButton
Definition: GUIDesigns.h:155
GNESelectorFrame::ElementSet
Definition: GNESelectorFrame.h:178
MID_GNE_SELECTORFRAME_SELECTTAG
select tag in selector frame
Definition: GUIAppEnum.h:685
GNE_ATTR_BLOCK_MOVEMENT
block movement of a graphic element
Definition: SUMOXMLDefinitions.h:978
GNEShape::setAttribute
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
GUIDesignComboBox
#define GUIDesignComboBox
Definition: GUIDesigns.h:221
GUIGlObjectStorage::gIDStorage
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
Definition: GUIGlObjectStorage.h:141
SUMO_TAG_PERSONTRIP_FROMTO
Definition: SUMOXMLDefinitions.h:305
GNESelectorFrame::myLockGLObjectTypes
LockGLObjectTypes * myLockGLObjectTypes
modul for lock selected items
Definition: GNESelectorFrame.h:416
SUMO_TAG_RIDE_BUSSTOP
Definition: SUMOXMLDefinitions.h:312
IOError
Definition: UtilExceptions.h:147
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::counterDown
void counterDown()
down count
Definition: GNESelectorFrame.cpp:638
GNESelectorFrame::clearCurrentSelection
void clearCurrentSelection() const
clear current selection with possibility of undo/redo
Definition: GNESelectorFrame.cpp:131
GNESelectorFrame::MatchAttribute::onCmdSelMBAttribute
long onCmdSelMBAttribute(FXObject *, FXSelector, void *)
Called when the user selectes a tag in the match box.
Definition: GNESelectorFrame.cpp:950
GNESelectorFrame::ElementSet::ELEMENTSET_SHAPE
Definition: GNESelectorFrame.h:187
SUMO_TAG_WALK_BUSSTOP
Definition: SUMOXMLDefinitions.h:309
GNESelectorFrame::ModificationMode::myReplaceRadioButton
FXRadioButton * myReplaceRadioButton
replace radio button
Definition: GNESelectorFrame.h:168
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::isGLTypeLocked
bool isGLTypeLocked() const
check if current GLType is blocked
Definition: GNESelectorFrame.cpp:645
SUMO_TAG_ROUTE
begin/end of the description of a route
Definition: SUMOXMLDefinitions.h:126
config.h
GNEAttributeCarrier::getTagProperties
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
Definition: GNEAttributeCarrier.cpp:1196
SUMO_TAG_PERSONFLOW
Definition: SUMOXMLDefinitions.h:300
GLO_ADDITIONAL
reserved GLO type to pack all additionals
Definition: GUIGlObjectTypes.h:60
GLO_JUNCTION
a junction
Definition: GUIGlObjectTypes.h:51
GNE_ATTR_SELECTED
element is selected
Definition: SUMOXMLDefinitions.h:968
GNEViewNet::getEditModes
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
Definition: GNEViewNet.cpp:399
SUMO_TAG_STOP_BUSSTOP
stop placed over a busStop (used in netedit)
Definition: SUMOXMLDefinitions.h:183
GNESelectorFrame::LockGLObjectTypes::IsObjectTypeLocked
bool IsObjectTypeLocked(const GUIGlObjectType type) const
check if an object is locked
Definition: GNESelectorFrame.cpp:580
GNESelectorFrame::ElementSet::onCmdSelectElementSet
long onCmdSelectElementSet(FXObject *, FXSelector, void *)
Called when the user change the set of element to search (netElement, Additional or shape)
Definition: GNESelectorFrame.cpp:765
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::onCmdSetCheckBox
long onCmdSetCheckBox(FXObject *, FXSelector, void *)
Definition: GNESelectorFrame.cpp:651
GNEPOI.h
GNESelectorFrame::LockGLObjectTypes::removeLockedObject
void removeLockedObject(const GUIGlObjectType type)
set object unselected
Definition: GNESelectorFrame.cpp:574
ShapeContainer::getPolygons
const Polygons & getPolygons() const
Returns all polygons.
Definition: ShapeContainer.h:150
SUMO_TAG_PERSONSTOP_BUSSTOP
Definition: SUMOXMLDefinitions.h:313
GNESelectorFrame::VisualScaling::mySelectionScaling
FXRealSpinner * mySelectionScaling
Spinner for selection scaling.
Definition: GNESelectorFrame.h:331
GNESelectorFrame::MatchAttribute::MatchAttribute
MatchAttribute()
FOX needs this.
Definition: GNESelectorFrame.h:277
GNESelectorFrame::MatchAttribute::onCmdHelp
long onCmdHelp(FXObject *, FXSelector, void *)
Called when the user clicks the help button.
Definition: GNESelectorFrame.cpp:1068
GNEUndoList::p_begin
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:73
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:373
GNESelectorFrame::ElementSet::mySetComboBox
FXComboBox * mySetComboBox
Combo Box with the element sets.
Definition: GNESelectorFrame.h:223
SUMO_TAG_EMBEDDEDROUTE
begin/end of the description of a embedded route (used in NETEDIT)
Definition: SUMOXMLDefinitions.h:128
GNESelectorFrame::ACsToSelected
bool ACsToSelected() const
check if there is ACs to select/unselect
Definition: GNESelectorFrame.cpp:1569
GNEFrame::show
virtual void show()
show Frame
Definition: GNEFrame.cpp:108
GLO_ROUTEFLOW
a routeFlow
Definition: GUIGlObjectTypes.h:148
WRITE_ERROR
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:245
WRITE_DEBUG
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:246
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:54
GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::counterUp
void counterUp()
up count
Definition: GNESelectorFrame.cpp:631
SUMO_TAG_RIDE_FROMTO
Definition: SUMOXMLDefinitions.h:311
GNESelectorFrame::ModificationMode::onCmdSelectModificationMode
long onCmdSelectModificationMode(FXObject *, FXSelector, void *)
Definition: GNESelectorFrame.cpp:690
GNEFrame::hide
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117
GNENet.h
SUMO_TAG_TRIP
a single trip definition (used by router)
Definition: SUMOXMLDefinitions.h:146
GLO_STOP
Definition: GUIGlObjectTypes.h:134
GNEShape::isAttributeCarrierSelected
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
Definition: GNEShape.cpp:139
GLO_EMBEDDEDROUTE
a embedded route
Definition: GUIGlObjectTypes.h:118
GNESelectorFrame::getLockGLObjectTypes
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
Definition: GNESelectorFrame.cpp:460
GNESelectorFrame::ModificationMode::SetOperation
SetOperation
FOX-declaration.
Definition: GNESelectorFrame.h:129
GNEUndoList.h
MID_CHOOSEN_OPERATION
set type of selection
Definition: GUIAppEnum.h:493
GNESelectorFrame::MatchAttribute::~MatchAttribute
~MatchAttribute()
destructor
Definition: GNESelectorFrame.cpp:832
GUIDesignDialogBox
#define GUIDesignDialogBox
Definition: GUIDesigns.h:449
GNE_ATTR_PARENT
parent of an additional element
Definition: SUMOXMLDefinitions.h:984
GNEConnection.h
GNESelectorFrame::LockGLObjectTypes::addedLockedObject
void addedLockedObject(const GUIGlObjectType type)
set object selected
Definition: GNESelectorFrame.cpp:568
GNESelectorFrame::SelectionOperation::onCmdLoad
long onCmdLoad(FXObject *, FXSelector, void *)
Called when the user presses the Load-button.
Definition: GNESelectorFrame.cpp:1171