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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // The Widget for modifying selections of network-elements
16 // (some elements adapted from GUIDialog_GLChosenEditor)
17 /****************************************************************************/
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
29 #include <netedit/GNENet.h>
38 #include <netedit/GNEUndoList.h>
40 
41 #include "GNESelectorFrame.h"
42 
43 
44 // ===========================================================================
45 // FOX callback mapping
46 // ===========================================================================
49 };
50 
51 FXDEFMAP(GNESelectorFrame::ModificationMode) ModificationModeMap[] = {
53 };
54 
55 FXDEFMAP(GNESelectorFrame::ElementSet) ElementSetMap[] = {
57 };
58 
59 FXDEFMAP(GNESelectorFrame::MatchAttribute) MatchAttributeMap[] = {
64 };
65 
66 FXDEFMAP(GNESelectorFrame::VisualScaling) VisualScalingMap[] = {
68 };
69 
70 FXDEFMAP(GNESelectorFrame::SelectionOperation) SelectionOperationMap[] = {
75 };
76 
77 // Object implementation
78 FXIMPLEMENT(GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry, FXObject, ObjectTypeEntryMap, ARRAYNUMBER(ObjectTypeEntryMap))
79 FXIMPLEMENT(GNESelectorFrame::ModificationMode, FXGroupBox, ModificationModeMap, ARRAYNUMBER(ModificationModeMap))
80 FXIMPLEMENT(GNESelectorFrame::ElementSet, FXGroupBox, ElementSetMap, ARRAYNUMBER(ElementSetMap))
81 FXIMPLEMENT(GNESelectorFrame::MatchAttribute, FXGroupBox, MatchAttributeMap, ARRAYNUMBER(MatchAttributeMap))
82 FXIMPLEMENT(GNESelectorFrame::VisualScaling, FXGroupBox, VisualScalingMap, ARRAYNUMBER(VisualScalingMap))
83 FXIMPLEMENT(GNESelectorFrame::SelectionOperation, FXGroupBox, SelectionOperationMap, ARRAYNUMBER(SelectionOperationMap))
84 
85 // ===========================================================================
86 // method definitions
87 // ===========================================================================
88 
89 GNESelectorFrame::GNESelectorFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet):
90  GNEFrame(horizontalFrameParent, viewNet, "Selection") {
91  // create selectedItems modul
92  myLockGLObjectTypes = new LockGLObjectTypes(this);
93  // create Modification Mode modul
94  myModificationMode = new ModificationMode(this);
95  // create ElementSet modul
96  myElementSet = new ElementSet(this);
97  // create MatchAttribute modul
98  myMatchAttribute = new MatchAttribute(this);
99  // create VisualScaling modul
100  myVisualScaling = new VisualScaling(this);
101  // create SelectionOperation modul
102  mySelectionOperation = new SelectionOperation(this);
103  // Create groupbox for information about selections
104  FXGroupBox* selectionHintGroupBox = new FXGroupBox(myContentFrame, "Information", GUIDesignGroupBoxFrame);
105  // Create Selection Hint
106  new FXLabel(selectionHintGroupBox, " - Hold <SHIFT> for \n rectangle selection.\n - Press <DEL> to\n delete selected items.", nullptr, GUIDesignLabelFrameInformation);
107 }
108 
109 
111 
112 
113 void
115  // Show frame
116  GNEFrame::show();
117 }
118 
119 
120 void
122  // hide frame
123  GNEFrame::hide();
124 }
125 
126 
129  return myLockGLObjectTypes;
130 }
131 
132 
133 void
135  // for clear selection, simply change all GNE_ATTR_SELECTED attribute of current selected elements
136  myViewNet->getUndoList()->p_begin("clear selection");
137  std::vector<GNEAttributeCarrier*> selectedAC = myViewNet->getNet()->getSelectedAttributeCarriers();
138  // change attribute GNE_ATTR_SELECTED of all selected items to false
139  for (auto i : selectedAC) {
140  i->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
141  }
142  // finish clear selection
144  // update view
145  myViewNet->update();
146 }
147 
148 
149 void
150 GNESelectorFrame::handleIDs(const std::vector<GNEAttributeCarrier*>& ACs, ModificationMode::SetOperation setop) {
152  // declare two sets of attribute carriers, one for select and another for unselect
153  std::set<std::pair<std::string, GNEAttributeCarrier*> > ACToSelect;
154  std::set<std::pair<std::string, GNEAttributeCarrier*> > ACToUnselect;
155  // in restrict AND replace mode all current selected attribute carriers will be unselected
156  if ((setOperation == ModificationMode::SET_REPLACE) || (setOperation == ModificationMode::SET_RESTRICT)) {
157  for (auto i : myViewNet->getNet()->getSelectedAttributeCarriers()) {
158  ACToUnselect.insert(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i));
159  }
160  }
161  // handle ids
162  for (auto i : ACs) {
163  // iterate over AtributeCarriers an place it in ACToSelect or ACToUnselect
164  switch (setOperation) {
166  ACToUnselect.insert(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i));
167  break;
169  if (ACToUnselect.find(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i)) != ACToUnselect.end()) {
170  ACToSelect.insert(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i));
171  }
172  break;
173  default:
174  ACToSelect.insert(std::pair<std::string, GNEAttributeCarrier*>(i->getID(), i));
175  break;
176  }
177  }
178  // select junctions and their connections if Auto select junctions is enabled (note: only for "add mode")
180  std::vector<GNEEdge*> edgesToSelect;
181  // iterate over ACToSelect and extract edges
182  for (auto i : ACToSelect) {
183  if (i.second->getTagProperty().getTag() == SUMO_TAG_EDGE) {
184  edgesToSelect.push_back(dynamic_cast<GNEEdge*>(i.second));
185  }
186  }
187  // iterate over extracted edges
188  for (auto i : edgesToSelect) {
189  // select junction source and all their connections and crossings
190  ACToSelect.insert(std::make_pair(i->getGNEJunctionSource()->getID(), i->getGNEJunctionSource()));
191  for (auto j : i->getGNEJunctionSource()->getGNEConnections()) {
192  ACToSelect.insert(std::make_pair(j->getID(), j));
193  }
194  for (auto j : i->getGNEJunctionSource()->getGNECrossings()) {
195  ACToSelect.insert(std::make_pair(j->getID(), j));
196  }
197  // select junction destiny and all their connections crossings
198  ACToSelect.insert(std::make_pair(i->getGNEJunctionDestiny()->getID(), i->getGNEJunctionDestiny()));
199  for (auto j : i->getGNEJunctionDestiny()->getGNEConnections()) {
200  ACToSelect.insert(std::make_pair(j->getID(), j));
201  }
202  for (auto j : i->getGNEJunctionDestiny()->getGNECrossings()) {
203  ACToSelect.insert(std::make_pair(j->getID(), j));
204  }
205  }
206  }
207  // only continue if there is ACs to select or unselect
208  if ((ACToSelect.size() + ACToUnselect.size()) > 0) {
209  // first unselect AC of ACToUnselect and then selects AC of ACToSelect
210  myViewNet->getUndoList()->p_begin("selection using rectangle");
211  for (auto i : ACToUnselect) {
212  if (i.second->getTagProperty().isSelectable()) {
213  i.second->setAttribute(GNE_ATTR_SELECTED, "false", myViewNet->getUndoList());
214  }
215  }
216  for (auto i : ACToSelect) {
217  if (i.second->getTagProperty().isSelectable()) {
218  i.second->setAttribute(GNE_ATTR_SELECTED, "true", myViewNet->getUndoList());
219  }
220  }
221  // finish operation
223  }
224  // update view
225  myViewNet->update();
226 }
227 
228 
231  return myModificationMode;
232 }
233 
234 
235 std::vector<GNEAttributeCarrier*>
236 GNESelectorFrame::getMatches(SumoXMLTag ACTag, SumoXMLAttr ACAttr, char compOp, double val, const std::string& expr) {
237  std::vector<GNEAttributeCarrier*> result;
238  std::vector<GNEAttributeCarrier*> allACbyTag = myViewNet->getNet()->retrieveAttributeCarriers(ACTag);
239  const auto& tagValue = GNEAttributeCarrier::getTagProperties(ACTag);
240  for (auto it : allACbyTag) {
241  if (expr == "") {
242  result.push_back(it);
243  } else if (tagValue.hasAttribute(ACAttr) && tagValue.getAttributeProperties(ACAttr).isNumerical()) {
244  double acVal;
245  std::istringstream buf(it->getAttribute(ACAttr));
246  buf >> acVal;
247  switch (compOp) {
248  case '<':
249  if (acVal < val) {
250  result.push_back(it);
251  }
252  break;
253  case '>':
254  if (acVal > val) {
255  result.push_back(it);
256  }
257  break;
258  case '=':
259  if (acVal == val) {
260  result.push_back(it);
261  }
262  break;
263  }
264  } else {
265  // string match
266  std::string acVal = it->getAttributeForSelection(ACAttr);
267  switch (compOp) {
268  case '@':
269  if (acVal.find(expr) != std::string::npos) {
270  result.push_back(it);
271  }
272  break;
273  case '!':
274  if (acVal.find(expr) == std::string::npos) {
275  result.push_back(it);
276  }
277  break;
278  case '=':
279  if (acVal == expr) {
280  result.push_back(it);
281  }
282  break;
283  case '^':
284  if (acVal != expr) {
285  result.push_back(it);
286  }
287  break;
288  }
289  }
290  }
291  return result;
292 }
293 
294 // ---------------------------------------------------------------------------
295 // ModificationMode::LockGLObjectTypes - methods
296 // ---------------------------------------------------------------------------
297 
299  FXGroupBox(selectorFrameParent->myContentFrame, "Selected items", GUIDesignGroupBoxFrame),
300  mySelectorFrameParent(selectorFrameParent) {
301  // create a matrix for TypeEntries
302  FXMatrix* matrixLockGLObjectTypes = new FXMatrix(this, 3, GUIDesignMatrixLockGLTypes);
303  // create typeEntries for the different elements
304  myTypeEntries[GLO_JUNCTION] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Junctions");
305  myTypeEntries[GLO_EDGE] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Edges");
306  myTypeEntries[GLO_LANE] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Lanes");
307  myTypeEntries[GLO_CONNECTION] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Connections");
308  myTypeEntries[GLO_ADDITIONAL] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Additionals");
309  myTypeEntries[GLO_CROSSING] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Crossings");
310  myTypeEntries[GLO_POLYGON] = new ObjectTypeEntry(matrixLockGLObjectTypes, "Polygons");
311  myTypeEntries[GLO_POI] = new ObjectTypeEntry(matrixLockGLObjectTypes, "POIs");
312 }
313 
314 
316  // remove all type entries
317  for (auto i : myTypeEntries) {
318  delete i.second;
319  }
320 }
321 
322 
323 void
325  myTypeEntries.at(type)->counterUp();
326 }
327 
328 
329 void
331  myTypeEntries.at(type)->counterDown();
332 }
333 
334 
335 bool
337  if ((type >= 100) && (type < 199)) {
338  return myTypeEntries.at(GLO_ADDITIONAL)->isGLTypeLocked();
339  } else {
340  return myTypeEntries.at(type)->isGLTypeLocked();
341  }
342 }
343 
344 
345 GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry::ObjectTypeEntry(FXMatrix* matrixParent, const std::string& label) :
346  FXObject(),
347  myCounter(0) {
348  // create elements
349  myLabelCounter = new FXLabel(matrixParent, "0", nullptr, GUIDesignLabelLeft);
350  myLabelTypeName = new FXLabel(matrixParent, label.c_str(), nullptr, GUIDesignLabelLeft);
351  myCheckBoxLocked = new FXMenuCheck(matrixParent, "Unlocked", this, MID_GNE_SET_ATTRIBUTE, LAYOUT_FILL_X | LAYOUT_RIGHT);
352 }
353 
354 
355 void
357  myCounter++;
358  myLabelCounter->setText(toString(myCounter).c_str());
359 }
360 
361 
362 void
364  myCounter--;
365  myLabelCounter->setText(toString(myCounter).c_str());
366 }
367 
368 
369 bool
371  return (myCheckBoxLocked->getCheck() == TRUE);
372 }
373 
374 
375 long
377  if(myCheckBoxLocked->getCheck() == TRUE) {
378  myCheckBoxLocked->setText("Locked");
379  } else {
380  myCheckBoxLocked->setText("Unlocked");
381  }
382  return 1;
383 }
384 
385 // ---------------------------------------------------------------------------
386 // ModificationMode::ModificationMode - methods
387 // ---------------------------------------------------------------------------
388 
390  FXGroupBox(selectorFrameParent->myContentFrame, "Modification Mode", GUIDesignGroupBoxFrame),
391  mySelectorFrameParent(selectorFrameParent),
392  myModificationModeType(SET_ADD) {
393  // Create all options buttons
394  myAddRadioButton = new FXRadioButton(this, "add\t\tSelected objects are added to the previous selection",
396  myRemoveRadioButton = new FXRadioButton(this, "remove\t\tSelected objects are removed from the previous selection",
398  myKeepRadioButton = new FXRadioButton(this, "keep\t\tRestrict previous selection by the current selection",
400  myReplaceRadioButton = new FXRadioButton(this, "replace\t\tReplace previous selection by the current selection",
402  myAddRadioButton->setCheck(true);
403 }
404 
405 
407 
408 
411  return myModificationModeType;
412 }
413 
414 
415 long
417  if (obj == myAddRadioButton) {
419  myAddRadioButton->setCheck(true);
420  myRemoveRadioButton->setCheck(false);
421  myKeepRadioButton->setCheck(false);
422  myReplaceRadioButton->setCheck(false);
423  return 1;
424  } else if (obj == myRemoveRadioButton) {
426  myAddRadioButton->setCheck(false);
427  myRemoveRadioButton->setCheck(true);
428  myKeepRadioButton->setCheck(false);
429  myReplaceRadioButton->setCheck(false);
430  return 1;
431  } else if (obj == myKeepRadioButton) {
433  myAddRadioButton->setCheck(false);
434  myRemoveRadioButton->setCheck(false);
435  myKeepRadioButton->setCheck(true);
436  myReplaceRadioButton->setCheck(false);
437  return 1;
438  } else if (obj == myReplaceRadioButton) {
440  myAddRadioButton->setCheck(false);
441  myRemoveRadioButton->setCheck(false);
442  myKeepRadioButton->setCheck(false);
443  myReplaceRadioButton->setCheck(true);
444  return 1;
445  } else {
446  return 0;
447  }
448 }
449 
450 // ---------------------------------------------------------------------------
451 // ModificationMode::ElementSet - methods
452 // ---------------------------------------------------------------------------
453 
455  FXGroupBox(selectorFrameParent->myContentFrame, "Element Set", GUIDesignGroupBoxFrame),
456  mySelectorFrameParent(selectorFrameParent),
457  myCurrentElementSet(ELEMENTSET_NETELEMENT) {
458  // Create MatchTagBox for tags and fill it
460  mySetComboBox->appendItem("Net Element");
461  mySetComboBox->appendItem("Additional");
462  mySetComboBox->appendItem("Shape");
463  mySetComboBox->setNumVisible(mySetComboBox->getNumItems());
464 }
465 
466 
468 
469 
472  return myCurrentElementSet;
473 }
474 
475 
476 long
478  if (mySetComboBox->getText() == "Net Element") {
480  mySetComboBox->setTextColor(FXRGB(0, 0, 0));
481  // enable match attribute
483  } else if (mySetComboBox->getText() == "Additional") {
485  mySetComboBox->setTextColor(FXRGB(0, 0, 0));
486  // enable match attribute
488  } else if (mySetComboBox->getText() == "Shape") {
490  mySetComboBox->setTextColor(FXRGB(0, 0, 0));
491  // enable match attribute
493  } else {
495  mySetComboBox->setTextColor(FXRGB(255, 0, 0));
496  // disable match attribute
498  }
499  return 1;
500 }
501 
502 // ---------------------------------------------------------------------------
503 // ModificationMode::MatchAttribute - methods
504 // ---------------------------------------------------------------------------
505 
507  FXGroupBox(selectorFrameParent->myContentFrame, "Match Attribute", GUIDesignGroupBoxFrame),
508  mySelectorFrameParent(selectorFrameParent),
509  myCurrentTag(SUMO_TAG_EDGE),
510  myCurrentAttribute(SUMO_ATTR_ID) {
511  // Create MatchTagBox for tags
513  // Create listBox for Attributes
515  // Create TextField for Match string
517  // Create help button
518  new FXButton(this, "Help", nullptr, this, MID_HELP, GUIDesignButtonRectangular);
519  // Fill list of sub-items (first element will be "edge")
521  // Set speed of edge as default attribute
522  myMatchAttrComboBox->setText("speed");
524  // Set default value for Match string
525  myMatchString->setText(">10.0");
526 }
527 
528 
530 
531 
532 void
534  // enable comboboxes and text field
535  myMatchTagComboBox->enable();
536  myMatchAttrComboBox->enable();
537  myMatchString->enable();
538  // Clear items of myMatchTagComboBox
539  myMatchTagComboBox->clearItems();
540  // Set items depending of current item set
541  std::vector<SumoXMLTag> listOfTags;
543  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_NETELEMENT, true);
545  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL, true);
547  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_SHAPE, true);
548  } else {
549  throw ProcessError("Invalid element set");
550  }
551  // fill combo box
552  for (auto i : listOfTags) {
553  myMatchTagComboBox->appendItem(toString(i).c_str());
554  }
555  // set first item as current item
556  myMatchTagComboBox->setCurrentItem(0);
557  myMatchTagComboBox->setNumVisible(myMatchTagComboBox->getNumItems());
558  // Fill attributes with the current element type
559  onCmdSelMBTag(nullptr, 0, nullptr);
560 }
561 
562 
563 void
565  // disable comboboxes and text field
566  myMatchTagComboBox->disable();
567  myMatchAttrComboBox->disable();
568  myMatchString->disable();
569  // change colors to black (even if there are invalid values)
570  myMatchTagComboBox->setTextColor(FXRGB(0, 0, 0));
571  myMatchAttrComboBox->setTextColor(FXRGB(0, 0, 0));
572  myMatchString->setTextColor(FXRGB(0, 0, 0));
573 }
574 
575 
576 long
577 GNESelectorFrame::MatchAttribute::onCmdSelMBTag(FXObject*, FXSelector, void*) {
578  // First check what type of elementes is being selected
580  // find current element tag
581  std::vector<SumoXMLTag> listOfTags;
583  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_NETELEMENT, true);
585  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL, true);
587  listOfTags = GNEAttributeCarrier::allowedTagsByCategory(GNEAttributeCarrier::TAGProperty::TAGPROPERTY_SHAPE, true);
588  } else {
589  throw ProcessError("Unkown set");
590  }
591  // fill myMatchTagComboBox
592  for (auto i : listOfTags) {
593  if (toString(i) == myMatchTagComboBox->getText().text()) {
594  myCurrentTag = i;
595  }
596  }
597  // check that typed-by-user value is correct
599  // obtain tag property (only for improve code legibility)
600  const auto& tagValue = GNEAttributeCarrier::getTagProperties(myCurrentTag);
601  // set color and enable items
602  myMatchTagComboBox->setTextColor(FXRGB(0, 0, 0));
603  myMatchAttrComboBox->enable();
604  myMatchString->enable();
605  myMatchAttrComboBox->clearItems();
606  // fill attribute combo box
607  for (auto it : tagValue) {
608  myMatchAttrComboBox->appendItem(toString(it.first).c_str());
609  }
610  // Add extra attribute "generic"
611  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_GENERIC).c_str());
612  // check if item can block movement
613  if (tagValue.canBlockMovement()) {
615  }
616  // check if item can block shape
617  if (tagValue.canBlockShape()) {
618  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_BLOCK_SHAPE).c_str());
619  }
620  // check if item can close shape
621  if (tagValue.canCloseShape()) {
622  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_CLOSE_SHAPE).c_str());
623  }
624  // check if item can have parent
625  if (tagValue.hasParent()) {
626  myMatchAttrComboBox->appendItem(toString(GNE_ATTR_PARENT).c_str());
627  }
628  // @ToDo: Here can be placed a button to set the default value
629  myMatchAttrComboBox->setNumVisible(myMatchAttrComboBox->getNumItems());
630  onCmdSelMBAttribute(nullptr, 0, nullptr);
631  } else {
632  // change color to red and disable items
633  myMatchTagComboBox->setTextColor(FXRGB(255, 0, 0));
634  myMatchAttrComboBox->disable();
635  myMatchString->disable();
636  }
637  update();
638  return 1;
639 }
640 
641 
642 long
644  // first obtain a copy of item attributes vinculated with current tag
645  auto tagPropertiesCopy = GNEAttributeCarrier::getTagProperties(myCurrentTag);
646  // obtain tag property (only for improve code legibility)
647  const auto& tagValue = GNEAttributeCarrier::getTagProperties(myCurrentTag);
648  // add an extra AttributeValues to allow select ACs using as criterium "generic parameters"
649  tagPropertiesCopy.addAttribute(GNE_ATTR_GENERIC, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_STRING, "", "");
650  // add extra attribute if item can block movement
651  if (tagValue.canBlockMovement()) {
652  // add an extra AttributeValues to allow select ACs using as criterium "block movement"
653  tagPropertiesCopy.addAttribute(GNE_ATTR_BLOCK_MOVEMENT, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL, "", "false");
654  }
655  // add extra attribute if item can block shape
656  if (tagValue.canBlockShape()) {
657  // add an extra AttributeValues to allow select ACs using as criterium "block shape"
658  tagPropertiesCopy.addAttribute(GNE_ATTR_BLOCK_SHAPE, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL, "", "false");
659  }
660  // add extra attribute if item can close shape
661  if (tagValue.canCloseShape()) {
662  // add an extra AttributeValues to allow select ACs using as criterium "close shape"
663  tagPropertiesCopy.addAttribute(GNE_ATTR_CLOSE_SHAPE, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_BOOL, "", "true");
664  }
665  // add extra attribute if item can have parent
666  if (tagValue.hasParent()) {
667  // add an extra AttributeValues to allow select ACs using as criterium "parent"
668  tagPropertiesCopy.addAttribute(GNE_ATTR_PARENT, GNEAttributeCarrier::AttrProperty::ATTRPROPERTY_STRING, "", "");
669  }
670  // set current selected attribute
672  for (auto i : tagPropertiesCopy) {
673  if (toString(i.first) == myMatchAttrComboBox->getText().text()) {
674  myCurrentAttribute = i.first;
675  }
676  }
677  // check if selected attribute is valid
679  myMatchAttrComboBox->setTextColor(FXRGB(0, 0, 0));
680  myMatchString->enable();
681  } else {
682  myMatchAttrComboBox->setTextColor(FXRGB(255, 0, 0));
683  myMatchString->disable();
684  }
685  return 1;
686 }
687 
688 
689 long
691  // obtain expresion
692  std::string expr(myMatchString->getText().text());
693  const auto& tagValue = GNEAttributeCarrier::getTagProperties(myCurrentTag);
694  bool valid = true;
695  if (expr == "") {
696  // the empty expression matches all objects
698  } else if (tagValue.hasAttribute(myCurrentAttribute) && tagValue.getAttributeProperties(myCurrentAttribute).isNumerical()) {
699  // The expression must have the form
700  // <val matches if attr < val
701  // >val matches if attr > val
702  // =val matches if attr = val
703  // val matches if attr = val
704  char compOp = expr[0];
705  if (compOp == '<' || compOp == '>' || compOp == '=') {
706  expr = expr.substr(1);
707  } else {
708  compOp = '=';
709  }
710  // check if value can be parsed to double
711  if (GNEAttributeCarrier::canParse<double>(expr.c_str())) {
712  mySelectorFrameParent->handleIDs(mySelectorFrameParent->getMatches(myCurrentTag, myCurrentAttribute, compOp, GNEAttributeCarrier::parse<double>(expr.c_str()), expr));
713  } else {
714  valid = false;
715  }
716  } else {
717  // The expression must have the form
718  // =str: matches if <str> is an exact match
719  // !str: matches if <str> is not a substring
720  // ^str: matches if <str> is not an exact match
721  // str: matches if <str> is a substring (sends compOp '@')
722  // Alternatively, if the expression is empty it matches all objects
723  char compOp = expr[0];
724  if (compOp == '=' || compOp == '!' || compOp == '^') {
725  expr = expr.substr(1);
726  } else {
727  compOp = '@';
728  }
730  }
731  if (valid) {
732  myMatchString->setTextColor(FXRGB(0, 0, 0));
733  myMatchString->killFocus();
734  } else {
735  myMatchString->setTextColor(FXRGB(255, 0, 0));
736  }
737  return 1;
738 }
739 
740 
741 long
742 GNESelectorFrame::MatchAttribute::onCmdHelp(FXObject*, FXSelector, void*) {
743  // Create dialog box
744  FXDialogBox* additionalNeteditAttributesHelpDialog = new FXDialogBox(this, "Netedit Parameters Help", GUIDesignDialogBox);
745  additionalNeteditAttributesHelpDialog->setIcon(GUIIconSubSys::getIcon(ICON_MODEADDITIONAL));
746  // set help text
747  std::ostringstream help;
748  help
749  << "- The 'Match Attribute' controls allow to specify a set of objects which are then applied to the current selection\n"
750  << " according to the current 'Modification Mode'.\n"
751  << " 1. Select an object type from the first input box\n"
752  << " 2. Select an attribute from the second input box\n"
753  << " 3. Enter a 'match expression' in the third input box and press <return>\n"
754  << "\n"
755  << "- The empty expression matches all objects\n"
756  << "- For numerical attributes the match expression must consist of a comparison operator ('<', '>', '=') and a number.\n"
757  << "- An object matches if the comparison between its attribute and the given number by the given operator evaluates to 'true'\n"
758  << "\n"
759  << "- For string attributes the match expression must consist of a comparison operator ('', '=', '!', '^') and a string.\n"
760  << " '' (no operator) matches if string is a substring of that object'ts attribute.\n"
761  << " '=' matches if string is an exact match.\n"
762  << " '!' matches if string is not a substring.\n"
763  << " '^' matches if string is not an exact match.\n"
764  << "\n"
765  << "- Examples:\n"
766  << " junction; id; 'foo' -> match all junctions that have 'foo' in their id\n"
767  << " junction; type; '=priority' -> match all junctions of type 'priority', but not of type 'priority_stop'\n"
768  << " edge; speed; '>10' -> match all edges with a speed above 10\n";
769  // Create label with the help text
770  new FXLabel(additionalNeteditAttributesHelpDialog, help.str().c_str(), nullptr, GUIDesignLabelFrameInformation);
771  // Create horizontal separator
772  new FXHorizontalSeparator(additionalNeteditAttributesHelpDialog, GUIDesignHorizontalSeparator);
773  // Create frame for OK Button
774  FXHorizontalFrame* myHorizontalFrameOKButton = new FXHorizontalFrame(additionalNeteditAttributesHelpDialog, GUIDesignAuxiliarHorizontalFrame);
775  // Create Button Close (And two more horizontal frames to center it)
776  new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame);
777  new FXButton(myHorizontalFrameOKButton, "OK\t\tclose", GUIIconSubSys::getIcon(ICON_ACCEPT), additionalNeteditAttributesHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK);
778  new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame);
779  // Write Warning in console if we're in testing mode
780  WRITE_DEBUG("Opening help dialog of selector frame");
781  // create Dialog
782  additionalNeteditAttributesHelpDialog->create();
783  // show in the given position
784  additionalNeteditAttributesHelpDialog->show(PLACEMENT_CURSOR);
785  // refresh APP
786  getApp()->refresh();
787  // open as modal dialog (will block all windows until stop() or stopModal() is called)
788  getApp()->runModalFor(additionalNeteditAttributesHelpDialog);
789  // Write Warning in console if we're in testing mode
790  WRITE_DEBUG("Close help dialog of selector frame");
791  return 1;
792 }
793 
794 // ---------------------------------------------------------------------------
795 // ModificationMode::VisualScaling - methods
796 // ---------------------------------------------------------------------------
797 
799  FXGroupBox(selectorFrameParent->myContentFrame, "Visual Scaling", GUIDesignGroupBoxFrame),
800  mySelectorFrameParent(selectorFrameParent) {
801  // Create spin button and configure it
802  mySelectionScaling = new FXRealSpinner(this, 7, this, MID_GNE_SELECTORFRAME_SELECTSCALE, GUIDesignSpinDial);
803  //mySelectionScaling->setNumberFormat(1);
804  //mySelectionScaling->setIncrements(0.1, .5, 1);
805  mySelectionScaling->setIncrement(0.5);
806  mySelectionScaling->setRange(1, 100);
807  mySelectionScaling->setValue(1);
808  mySelectionScaling->setHelpText("Enlarge selected objects");
809 }
810 
811 
813 
814 
815 long
817  // set scale in viewnet
819  mySelectorFrameParent->getViewNet()->update();
820  return 1;
821 }
822 
823 // ---------------------------------------------------------------------------
824 // ModificationMode::SelectionOperation - methods
825 // ---------------------------------------------------------------------------
826 
828  FXGroupBox(selectorFrameParent->myContentFrame, "Operations for selections", GUIDesignGroupBoxFrame),
829  mySelectorFrameParent(selectorFrameParent) {
830  // Create "Clear List" Button
831  new FXButton(this, "Clear\t\t", nullptr, this, MID_CHOOSEN_CLEAR, GUIDesignButton);
832  // Create "Invert" Button
833  new FXButton(this, "Invert\t\t", nullptr, this, MID_CHOOSEN_INVERT, GUIDesignButton);
834  // Create "Save" Button
835  new FXButton(this, "Save\t\tSave ids of currently selected objects to a file.", nullptr, this, MID_CHOOSEN_SAVE, GUIDesignButton);
836  // Create "Load" Button
837  new FXButton(this, "Load\t\tLoad ids from a file according to the current modfication mode.", nullptr, this, MID_CHOOSEN_LOAD, GUIDesignButton);
838 }
839 
840 
842 
843 
844 long
845 GNESelectorFrame::SelectionOperation::onCmdLoad(FXObject*, FXSelector, void*) {
846  // get the new file name
847  FXFileDialog opendialog(this, "Open List of Selected Items");
848  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY));
849  opendialog.setSelectMode(SELECTFILE_EXISTING);
850  opendialog.setPatternList("Selection files (*.txt)\nAll files (*)");
851  if (gCurrentFolder.length() != 0) {
852  opendialog.setDirectory(gCurrentFolder);
853  }
854  if (opendialog.execute()) {
855  std::vector<GNEAttributeCarrier*> loadedACs;
856  gCurrentFolder = opendialog.getDirectory();
857  std::string file = opendialog.getFilename().text();
858  std::ostringstream msg;
859  std::ifstream strm(file.c_str());
860  // check if file can be opened
861  if (!strm.good()) {
862  WRITE_ERROR("Could not open '" + file + "'.");
863  return 0;
864  }
865  while (strm.good()) {
866  std::string line;
867  strm >> line;
868  // check if line isn't empty
869  if (line.length() != 0) {
870  // obtain GLObject
872  // check if GUIGlObject exist and their their GL type isn't blocked
873  if ((object != nullptr) && !mySelectorFrameParent->myLockGLObjectTypes->IsObjectTypeLocked(object->getType())) {
874  // obtain GNEAttributeCarrier
876  // check if AC exist and if is selectable
877  if (AC != nullptr) {
878  loadedACs.push_back(AC);
879  }
880  }
881  }
882  }
883  // change selected attribute in loaded ACs allowing undo/redo
884  if (loadedACs.size() > 0) {
885  mySelectorFrameParent->getViewNet()->getUndoList()->p_begin("load selection");
886  mySelectorFrameParent->handleIDs(loadedACs);
888  }
889  }
890  mySelectorFrameParent->getViewNet()->update();
891  return 1;
892 }
893 
894 
895 long
896 GNESelectorFrame::SelectionOperation::onCmdSave(FXObject*, FXSelector, void*) {
897  FXString file = MFXUtils::getFilename2Write(
898  this, "Save List of selected Items", ".txt", GUIIconSubSys::getIcon(ICON_EMPTY), gCurrentFolder);
899  if (file == "") {
900  return 1;
901  }
902  try {
903  OutputDevice& dev = OutputDevice::getDevice(file.text());
905  GUIGlObject* object = dynamic_cast<GUIGlObject*>(i);
906  if (object) {
907  dev << GUIGlObject::TypeNames.getString(object->getType()) << ":" << i->getID() << "\n";
908  }
909  }
910  dev.close();
911  } catch (IOError& e) {
912  // write warning if netedit is running in testing mode
913  WRITE_DEBUG("Opening FXMessageBox 'error storing selection'");
914  // open message box error
915  FXMessageBox::error(this, MBOX_OK, "Storing Selection failed", "%s", e.what());
916  // write warning if netedit is running in testing mode
917  WRITE_DEBUG("Closed FXMessageBox 'error storing selection' with 'OK'");
918  }
919  return 1;
920 }
921 
922 
923 long
925  // clear current selection
927  return 1;
928 }
929 
930 
931 long
933  // first make a copy of current selected elements
934  std::vector<GNEAttributeCarrier*> copyOfSelectedAC = mySelectorFrameParent->getViewNet()->getNet()->getSelectedAttributeCarriers();
935  // for invert selection, first clean current selection and next select elements of set "unselectedElements"
936  mySelectorFrameParent->getViewNet()->getUndoList()->p_begin("invert selection");
937  // select junctions, edges, lanes connections and crossings
938  std::vector<GNEJunction*> junctions = mySelectorFrameParent->getViewNet()->getNet()->retrieveJunctions();
939  for (auto i : junctions) {
940  i->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList());
941  // due we iterate over all junctions, only it's neccesary iterate over incoming edges
942  for (auto j : i->getGNEIncomingEdges()) {
943  // only select edges if "select edges" flag is enabled. In other case, select only lanes
945  j->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList());
946  } else {
947  for (auto k : j->getLanes()) {
948  k->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList());
949  }
950  }
951  // select connections
952  for (auto k : j->getGNEConnections()) {
953  k->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList());
954  }
955  }
956  // select crossings
957  for (auto j : i->getGNECrossings()) {
958  j->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList());
959  }
960  }
961  // select additionals
962  std::vector<GNEAdditional*> additionals = mySelectorFrameParent->getViewNet()->getNet()->retrieveAdditionals();
963  for (auto i : additionals) {
964  if (i->getTagProperty().isSelectable()) {
965  i->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList());
966  }
967  }
968  // select polygons
969  for (auto i : mySelectorFrameParent->getViewNet()->getNet()->getPolygons()) {
970  dynamic_cast<GNEPoly*>(i.second)->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList());
971  }
972  // select POIs
973  for (auto i : mySelectorFrameParent->getViewNet()->getNet()->getPOIs()) {
974  dynamic_cast<GNEPOI*>(i.second)->setAttribute(GNE_ATTR_SELECTED, "true", mySelectorFrameParent->getViewNet()->getUndoList());
975  }
976  // now iterate over all elements of "copyOfSelectedAC" and undselect it
977  for (auto i : copyOfSelectedAC) {
979  }
980  // finish selection operation
982  // update view
983  mySelectorFrameParent->getViewNet()->update();
984  return 1;
985 }
986 
987 
988 /****************************************************************************/
long onCmdSave(FXObject *, FXSelector, void *)
Called when the user presses the Save-button.
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
Definition: GNENet.cpp:1092
a tl-logic
GNESelectorFrame * mySelectorFrameParent
pointer to Selector Frame Parent
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
void close()
Closes the device and removes it from the dictionary.
std::map< GUIGlObjectType, ObjectTypeEntry * > myTypeEntries
check boxes for type-based selection locking and selected object counts
SumoXMLTag
Numbers representing SUMO-XML - element names.
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:205
long onCmdSetCheckBox(FXObject *, FXSelector, void *)
bool selectEdges() const
whether inspection, selection and inversion should apply to edges or to lanes
Definition: GNEViewNet.cpp:733
void addedLockedObject(const GUIGlObjectType type)
set object selected
a polygon
FXRadioButton * myReplaceRadioButton
replace radio button
GUIGlObjectType
FXComboBox * mySetComboBox
Combo Box with the element sets.
SetOperation getModificationMode() const
get current modification mode
block shape of a graphic element (Used mainly in GNEShapes)
void handleIDs(const std::vector< GNEAttributeCarrier *> &ACs, ModificationMode::SetOperation setop=ModificationMode::SET_DEFAULT)
apply list of ids to the current selection according to SetOperation,
FXLabel * myLabelCounter
label counter
Save set.
Definition: GUIAppEnum.h:350
const Polygons & getPolygons() const
Returns all polygons.
Definition: GNEPOI.h:45
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true)
get a single attribute carrier based on a GLID
Definition: GNENet.cpp:1166
a connection
const std::string & getString(const T key) const
void show()
show Frame
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
Definition: GNEPOI.cpp:322
FXRadioButton * myAddRadioButton
add radio button
FXLabel * myLabelTypeName
label type nane
Close shape of a polygon (Used by GNEPolys)
static std::vector< SumoXMLTag > allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables)
get tags of all editable element types using TagProperty Type (TAGPROPERTY_NETELEMENT, TAGPROPERTY_ADDITIONAL, etc.)
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
FXString gCurrentFolder
The folder used as last.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
select tag in selector frame
Definition: GUIAppEnum.h:557
void counterUp()
up count
void disableMatchAttribute()
disable match attributes
ElementSetType myCurrentElementSet
current element set selected
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers()
get all selected attribute carriers
Definition: GNENet.cpp:1736
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
generic attribute
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:1720
void enableMatchAttribute()
enable match attributes
FXRealSpinner * mySelectionScaling
Spinner for selection scaling.
long onCmdLoad(FXObject *, FXSelector, void *)
Called when the user presses the Load-button.
#define GUIDesignComboBox
Definition: GUIDesigns.h:195
GNEViewNet * myViewNet
View Net for changes.
Definition: GNEFrame.h:612
~GNESelectorFrame()
Destructor.
set subset of elements
Definition: GUIAppEnum.h:346
FXComboBox * myMatchTagComboBox
tag of the match box
GNESelectorFrame * mySelectorFrameParent
pointer to Selector Frame Parent
changes the visual scaling of selected items
Definition: GUIAppEnum.h:563
GNESelectorFrame * mySelectorFrameParent
pointer to Selector Frame Parent
FXComboBox * myMatchAttrComboBox
attributes of the match box
GNEUndoList * getUndoList() const
get the undoList object
long onCmdSelMBString(FXObject *, FXSelector, void *)
Called when the user enters a new selection expression.
set type of selection
Definition: GUIAppEnum.h:344
long onCmdSelectModificationMode(FXObject *, FXSelector, void *)
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
#define GUIDesignHorizontalSeparator
Definition: GUIDesigns.h:298
#define GUIDesignTextField
Definition: GUIDesigns.h:34
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:49
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:615
help button
Definition: GUIAppEnum.h:400
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:80
Deselect selected items.
Definition: GUIAppEnum.h:358
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
Definition: GUIDesigns.h:261
LockGLObjectTypes(GNESelectorFrame *selectorFrameParent)
constructor
void removeLockedObject(const GUIGlObjectType type)
set object unselected
FXDEFMAP(GNESelectorFrame::LockGLObjectTypes::ObjectTypeEntry) ObjectTypeEntryMap[]
FXTextField * myMatchString
string of the match
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
GNESelectorFrame * mySelectorFrameParent
pointer to Selector Frame Parent
block movement of a graphic element
invalid attribute
bool autoSelectNodes()
whether to autoselect nodes or to lanes
Definition: GNEViewNet.cpp:763
ObjectTypeEntry()
FOX needs this.
#define GUIDesignMatrixLockGLTypes
Matrix for pack GLTypes (used in GNESelectorFrame)
Definition: GUIDesigns.h:242
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:248
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:184
long onCmdSelectElementSet(FXObject *, FXSelector, void *)
Called when the user change the set of element to search (netElement, Additional or shape) ...
FXRadioButton * myKeepRadioButton
keep button
SumoXMLAttr myCurrentAttribute
current SumoXMLTag Attribute
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons) ...
Definition: GUIDesigns.h:60
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag type=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
Definition: GNENet.cpp:1189
SumoXMLTag myCurrentTag
current SumoXMLTag tag
class for object types entries
begin/end of the description of an edge
long onCmdSelMBTag(FXObject *, FXSelector, void *)
Called when the user selectes a tag in the match box.
void setSelectionScaling(double selectionScale)
set selection scaling
Definition: GNEViewNet.cpp:769
#define WRITE_ERROR(msg)
Definition: MsgHandler.h:247
long onCmdClear(FXObject *, FXSelector, void *)
Called when the user presses the Clear-button.
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:46
reserved GLO type to pack all additionals
long onCmdInvert(FXObject *, FXSelector, void *)
Called when the user presses the Invert-button.
ModificationMode * getModificationModeModul() const
get modification mode modul
#define GUIDesignButton
Definition: GUIDesigns.h:54
LockGLObjectTypes * myLockGLObjectTypes
modul for lock selected items
virtual void show()
show Frame
Definition: GNEFrame.cpp:1695
#define GUIDesignDialogBox
Definition: GUIDesigns.h:410
MatchAttribute * myMatchAttribute
modul for matchA ttribute
long onCmdSelMBAttribute(FXObject *, FXSelector, void *)
Called when the user selectes a tag in the match box.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:227
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
Definition: GNENet.cpp:1797
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
void clearCurrentSelection() const
clear current selection with possibility of undo/redo
static StringBijection< GUIGlObjectType > TypeNames
associates object types with strings
Definition: GUIGlObject.h:69
element is selected
int myCounter
counter
an edge
bool IsObjectTypeLocked(const GUIGlObjectType type) const
check if an object is locked
ElementSetType getElementSet() const
get current selected element set
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:1704
GNENet * getNet() const
get the net object
GNESelectorFrame * mySelectorFrameParent
pointer to Selector Frame Parent
GUIGlID getGlID() const
Returns the numerical id of the object.
attribute edited
Definition: GUIAppEnum.h:537
#define GUIDesignButtonOK
Definition: GUIDesigns.h:96
FXMenuCheck * myCheckBoxLocked
check box to check if GLObject type is blocked
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:64
#define GUIDesignSpinDial
Definition: GUIDesigns.h:318
ModificationMode * myModificationMode
modul for change modification mode
parent of an additional element
FXRadioButton * myRemoveRadioButton
remove radio button
long onCmdHelp(FXObject *, FXSelector, void *)
Called when the user clicks the help button.
void counterDown()
down count
Load set.
Definition: GUIAppEnum.h:348
void hide()
hide Frame
#define GUIDesignLabelLeft
Definition: GUIDesigns.h:145
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
select attribute in selector frame
Definition: GUIAppEnum.h:559
GNESelectorFrame * mySelectorFrameParent
pointer to Selector Frame Parent
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
#define GUIDesignRadioButton
Definition: GUIDesigns.h:135
long onCmdScaleSelection(FXObject *, FXSelector, void *)
Called when the user changes visual scaling.
ElementSet * myElementSet
modul for select element set
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
bool isGLTypeLocked() const
check if current GLType is blocked
Clear set.
Definition: GUIAppEnum.h:352
a junction
SetOperation myModificationModeType
how to modify selection
const POIs & getPOIs() const
Returns all pois.