Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMatchAttribute.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// The Widget for modifying selections of network-elements
19/****************************************************************************/
20
23#include <netedit/GNENet.h>
24#include <netedit/GNEViewNet.h>
34
35#include "GNEMatchAttribute.h"
36
37// ===========================================================================
38// FOX callback mapping
39// ===========================================================================
40
48
49// Object implementation
50FXIMPLEMENT(GNEMatchAttribute, MFXGroupBoxModule, GNEMatchAttributeMap, ARRAYNUMBER(GNEMatchAttributeMap))
51
52// ===========================================================================
53// method definitions
54// ===========================================================================
55
56// ---------------------------------------------------------------------------
57// GNEMatchAttribute - methods
58// ---------------------------------------------------------------------------
59#ifdef _MSC_VER
60#pragma warning(push)
61#pragma warning(disable: 4355) // mask warning about "this" in initializers
62#endif
64 MFXGroupBoxModule(selectorFrameParent, TL("Match Attribute")),
65 mySelectorFrameParent(selectorFrameParent),
66 myCurrentEditedProperties(new CurrentEditedProperties(this)) {
67 const auto staticTooltipMenu = selectorFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu();
68 // Create MFXComboBoxIcons (sum 1 due children)
69 for (int i = 0; i < selectorFrameParent->getViewNet()->getNet()->getTagPropertiesDatabase()->getHierarchyDepth() + 1; i++) {
70 auto comboBoxIcon = new MFXComboBoxTagProperty(getCollapsableFrame(), staticTooltipMenu, true, GUIDesignComboBoxVisibleItems,
72 myTagComboBoxVector.push_back(comboBoxIcon);
73 }
75 myShowOnlyCommonAttributes->setCheck(FALSE);
76 // Create MFXComboBoxIcon for Attributes
79 // Create TextField for Match string
81 // create button
83 // Create help button
85 // refresh with the current tag and attr
87}
88#ifdef _MSC_VER
89#pragma warning(pop)
90#endif
91
95
96
97void
99 for (const auto& tagComboBox : myTagComboBoxVector) {
100 tagComboBox->enable();
101 }
103 myMatchString->enable();
104 myMatchStringButton->enable();
105}
106
107
108void
110 for (const auto& tagComboBox : myTagComboBoxVector) {
111 tagComboBox->disable();
112 tagComboBox->setTextColor(GUIDesignTextColorBlack);
113 }
115 myMatchString->disable();
116 myMatchStringButton->disable();
117 // change colors to black (even if there are invalid values)
120}
121
122
123void
125 // refresh before show
127 // show groupbox
128 show();
129}
130
131
132void
134 // hide groupbox
135 hide();
136}
137
138
139void
141 // continue depending of current
143 // fill hierarchy
144 for (size_t i = 0; i < parentHierarchy.size(); i++) {
145 auto comboBox = myTagComboBoxVector.at(i);
146 // clear previous elements
147 comboBox->clearItems();
148 // add <all> always as first element
150 // add siblings (except for root)
151 if (parentHierarchy.at(i)->getHierarchicalParent()) {
152 for (const auto tagSibling : parentHierarchy.at(i)->getHierarchicalParent()->getHierarchicalChildren()) {
153 if (tagSibling->isDrawable()) {
154 myTagComboBoxVector.at(i)->appendTagItem(tagSibling);
155 }
156 }
157 // update tag
158 if (myTagComboBoxVector.at(i)->hasTagProperty(parentHierarchy.at(i))) {
159 myTagComboBoxVector.at(i)->setCurrentItem(parentHierarchy.at(i), FALSE);
160 myTagComboBoxVector.at(i)->show();
161 } else {
162 myTagComboBoxVector.at(i)->hide();
163 }
164 }
165 }
166 // hide the two first combo boxes(root and supermode)
167 myTagComboBoxVector.at(0)->hide();
168 myTagComboBoxVector.at(1)->hide();
169 // hide comboBox with only one element (+ <all>)
170 if (myTagComboBoxVector.at(parentHierarchy.size() - 1)->getNumItems() == 2) {
171 myTagComboBoxVector.at(parentHierarchy.size() - 1)->hide();
172 }
173 // check if show children
174 auto comboBoxChildren = myTagComboBoxVector.at(parentHierarchy.size());
175 if (parentHierarchy.back()->getHierarchicalChildren().size() > 0) {
176 // clear previous elements
177 comboBoxChildren->clearItems();
178 // add <all> always as first element
179 comboBoxChildren->appendTagItem(myCurrentEditedProperties->getTagPropertiesAll());
180 for (const auto childTagProperty : parentHierarchy.back()->getHierarchicalChildren()) {
181 comboBoxChildren->appendTagItem(childTagProperty);
182 }
183 comboBoxChildren->show();
184 } else {
185 comboBoxChildren->hide();
186 }
187 // hide rest of combo boxes
188 for (size_t i = (parentHierarchy.size() + 1); i < myTagComboBoxVector.size(); i++) {
189 myTagComboBoxVector.at(i)->hide();
190 }
191 // now fill attributes
193 // get all children recursivelly
195 for (const auto& attribute : attributes) {
196 myAttributeComboBox->appendAttrItem(attribute.second);
197 }
198 // update tag
199 if (myAttributeComboBox->getNumItems() == 0) {
202 // set match string
203 myMatchString->setText("", FALSE);
204 myMatchString->disable();
205 } else {
209 } else {
210 myAttributeComboBox->setCurrentItem(attributes.begin()->second, FALSE);
212 }
213 // set match string
214 myMatchString->setText(myCurrentEditedProperties->getMatchValue().c_str(), FALSE);
215 myMatchString->enable();
216 }
217}
218
219
220long
221GNEMatchAttribute::onCmdTagSelected(FXObject* obj, FXSelector, void*) {
222 // iterate over all comboBoxes
223 int tagComboBoxIndex = 0;
224 for (int i = 0; i < (int)myTagComboBoxVector.size(); i++) {
225 if (myTagComboBoxVector.at(i) == obj) {
226 tagComboBoxIndex = i;
227 }
228 }
229 // check if tag property exist
230 if (myTagComboBoxVector.at(tagComboBoxIndex)->getCurrentTagProperty()) {
231 const auto selectedTag = myTagComboBoxVector.at(tagComboBoxIndex)->getCurrentTagProperty();
232 // if we select <all>, use parent tag
233 if (selectedTag == myCurrentEditedProperties->getTagPropertiesAll()) {
234 myCurrentEditedProperties->setTagProperties(myTagComboBoxVector.at(tagComboBoxIndex - 1)->getCurrentTagProperty());
235 } else {
237 }
239 }
240 return 0;
241}
242
243
244long
250
251
252long
253GNEMatchAttribute::onCmdToogleOnlyCommon(FXObject*, FXSelector, void*) {
254 // simply refresh attribute
256 return 1;
257}
258
259
260long
261GNEMatchAttribute::onCmdProcessString(FXObject*, FXSelector, void*) {
262 std::vector<GNEAttributeCarrier*> matches;
263 // obtain expresion
264 std::string expr = myMatchString->getText().text();
265 bool valid = true;
266 if (expr == "") {
267 // the empty expression matches all objects
268 matches = getMatches('@', 0, expr);
270 // The expression must have the form
271 // <val matches if attr < val
272 // >val matches if attr > val
273 // =val matches if attr = val
274 // val matches if attr = val
275 char compOp = expr[0];
276 if (compOp == '<' || compOp == '>' || compOp == '=') {
277 expr = expr.substr(1);
278 } else {
279 compOp = '=';
280 }
281 // check if value can be parsed to double
282 if (GNEAttributeCarrier::canParse<double>(expr.c_str())) {
283 matches = getMatches(compOp, GNEAttributeCarrier::parse<double>(expr.c_str()), expr);
284 } else {
285 valid = false;
286 }
287 } else {
288 // The expression must have the form
289 // =str: matches if <str> is an exact match
290 // !str: matches if <str> is not a substring
291 // ^str: matches if <str> is not an exact match
292 // str: matches if <str> is a substring (sends compOp '@')
293 // Alternatively, if the expression is empty it matches all objects
294 char compOp = expr[0];
295 if (compOp == '=' || compOp == '!' || compOp == '^') {
296 expr = expr.substr(1);
297 } else {
298 compOp = '@';
299 }
300 matches = getMatches(compOp, 0, expr);
301 }
302 if (valid) {
305 myMatchString->killFocus();
306 } else {
308 }
309 return 1;
310
311}
312
313
314long
315GNEMatchAttribute::onCmdHelp(FXObject*, FXSelector, void*) {
316 // set help text
317 std::ostringstream help;
318 help
319 << TL("- The 'Match Attribute' controls allow to specify a set of objects which are then applied to the current selection") << "\n"
320 << TL(" according to the current 'Modification Mode'.") << "\n"
321 << TL(" 1. Select an object type from the first input box") << "\n"
322 << TL(" 2. Select an attribute from the second input box") << "\n"
323 << TL(" 3. Enter a 'match expression' in the third input box and press <return>") << "\n"
324 << "\n"
325 << TL("- The empty expression matches all objects") << "\n"
326 << TL("- For numerical attributes the match expression must consist of a comparison operator ('<', '>', '=') and a number.") << "\n"
327 << TL("- An object matches if the comparison between its attribute and the given number by the given operator evaluates to 'true'") << "\n"
328 << "\n"
329 << TL("- For string attributes the match expression must consist of a comparison operator ('', '=', '!', '^') and a string.") << "\n"
330 << TL(" '' (no operator) matches if string is a substring of that object's attribute.") << "\n"
331 << TL(" '=' matches if string is an exact match.") << "\n"
332 << TL(" '!' matches if string is not a substring.") << "\n"
333 << TL(" '^' matches if string is not an exact match.") << "\n"
334 << "\n"
335 << TL("- Examples:")
336 << TL(" junction; id; 'foo' -> match all junctions that have 'foo' in their id") << "\n"
337 << TL(" junction; type; '=priority' -> match all junctions of type 'priority', but not of type 'priority_stop'") << "\n"
338 << TL(" edge; speed; '>10' -> match all edges with a speed above 10");
339 // open help dialog
341 TL("Netedit parameters Help"), help);
342 return 1;
343}
344
345
346std::vector<GNEAttributeCarrier*>
347GNEMatchAttribute::getMatches(const char compOp, const double val, const std::string& expr) {
348 std::vector<GNEAttributeCarrier*> result;
349 // first retrieve all ACs using ACTag
351 // iterate over all ACs
352 for (const auto& AC : allACbyTag) {
353 // first check if the attribute exist in the given tag
354 if (AC->getTagProperty()->hasAttribute(myCurrentEditedProperties->getAttributeProperties()->getAttr())) {
355 if (expr == "" && compOp == '@') {
356 result.push_back(AC);
358 double acVal;
359 std::istringstream buf(AC->getAttribute(myCurrentEditedProperties->getAttributeProperties()->getAttr()));
360 buf >> acVal;
361 switch (compOp) {
362 case '<':
363 if (acVal < val) {
364 result.push_back(AC);
365 }
366 break;
367 case '>':
368 if (acVal > val) {
369 result.push_back(AC);
370 }
371 break;
372 case '=':
373 if (acVal == val) {
374 result.push_back(AC);
375 }
376 break;
377 }
378 } else {
379 // string match
380 std::string acVal = AC->getAttributeForSelection(myCurrentEditedProperties->getAttributeProperties()->getAttr());
381 switch (compOp) {
382 case '@':
383 if (acVal.find(expr) != std::string::npos) {
384 result.push_back(AC);
385 }
386 break;
387 case '!':
388 if (acVal.find(expr) == std::string::npos) {
389 result.push_back(AC);
390 }
391 break;
392 case '=':
393 if (acVal == expr) {
394 result.push_back(AC);
395 }
396 break;
397 case '^':
398 if (acVal != expr) {
399 result.push_back(AC);
400 }
401 break;
402 }
403 }
404 }
405 }
406 return result;
407}
408
409
410std::vector<GNEAttributeCarrier*>
411GNEMatchAttribute::getGenericMatches(const std::vector<GNEGenericData*>& genericDatas, const std::string& attr, const char compOp, const double val, const std::string& expr) {
412 std::vector<GNEAttributeCarrier*> result;
413 // iterate over generic datas
414 for (const auto& genericData : genericDatas) {
415 if (expr == "" && compOp == '@') {
416 result.push_back(genericData);
417 } else if (attr != toString(GNE_ATTR_PARENT)) {
418 double acVal;
419 std::istringstream buf(genericData->getParameter(attr, "0"));
420 buf >> acVal;
421 switch (compOp) {
422 case '<':
423 if (acVal < val) {
424 result.push_back(genericData);
425 }
426 break;
427 case '>':
428 if (acVal > val) {
429 result.push_back(genericData);
430 }
431 break;
432 case '=':
433 if (acVal == val) {
434 result.push_back(genericData);
435 }
436 break;
437 }
438 } else {
439 // string match
440 std::string acVal = genericData->getAttributeForSelection(GNE_ATTR_PARENT);
441 switch (compOp) {
442 case '@':
443 if (acVal.find(expr) != std::string::npos) {
444 result.push_back(genericData);
445 }
446 break;
447 case '!':
448 if (acVal.find(expr) == std::string::npos) {
449 result.push_back(genericData);
450 }
451 break;
452 case '=':
453 if (acVal == expr) {
454 result.push_back(genericData);
455 }
456 break;
457 case '^':
458 if (acVal != expr) {
459 result.push_back(genericData);
460 }
461 break;
462 }
463 }
464 }
465 return result;
466}
467
468// ---------------------------------------------------------------------1------
469// GNEMatchAttribute::CurrentEditedProperties - methods
470// ---------------------------------------------------------------------------
471
473 myMatchAttributeParent(matchAttributeParent) {
474 // build special attributes
476 nullptr,
478 TL("Show all attributes"),
479 FXRGBA(255, 255, 255, 255),
480 TL("<all>"));
483 TL("No common attributes defined"));
484 // set default tag and attribute for every property
486 setTagProperties(database->getTagProperty(SUMO_TAG_EDGE, true));
487 setAttributeProperties(myNetworkTagProperties.back()->getAttributeProperties(SUMO_ATTR_SPEED));
488 myNetworkMatchValue = ">10";
489 setTagProperties(database->getTagProperty(SUMO_TAG_VEHICLE, true));
490 setAttributeProperties(myDemandTagProperties.back()->getAttributeProperties(SUMO_ATTR_ID));
491 setTagProperties(database->getTagProperty(GNE_TAG_DATAS, true));
492}
493
494
496 delete myTagPropertiesAllAttributes;
497}
498
499
500const GNETagProperties*
502 return myTagPropertiesAllAttributes;
503}
504
505
508 return myAttributePropertiesNoCommon;
509}
510
511
512const GNETagProperties*
514 if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeNetwork()) {
515 return myNetworkTagProperties.back();
516 } else if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
517 return myDemandTagProperties.back();
518 } else if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeData()) {
519 return myDataTagProperties.back();
520 } else {
521 throw ProcessError("Invalid supermode");
522 }
523}
524
525
528 if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeNetwork()) {
529 return myNetworkAttributeProperties;
530 } else if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
531 return myDemandAttributeProperties;
532 } else if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeData()) {
533 return myDataAttributeProperties;
534 } else {
535 throw ProcessError("Invalid supermode");
536 }
537}
538
539
540const std::string&
542 if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeNetwork()) {
543 return myNetworkMatchValue;
544 } else if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
545 return myDemandMatchValue;
546 } else if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeData()) {
547 return myDataMatchValue;
548 } else {
549 throw ProcessError("Invalid supermode");
550 }
551}
552
553
554void
556 if (tagProperty->getSupermode() == Supermode::NETWORK) {
557 myNetworkTagProperties = tagProperty->getHierarchicalParentsRecuersively();
558 } else if (tagProperty->getSupermode() == Supermode::DEMAND) {
559 myDemandTagProperties = tagProperty->getHierarchicalParentsRecuersively();
560 } else if (tagProperty->getSupermode() == Supermode::DATA) {
561 myDataTagProperties = tagProperty->getHierarchicalParentsRecuersively();
562 }
563}
564
565
566void
568 if (attrProperty->getTagPropertyParent()->getSupermode() == Supermode::NETWORK) {
569 myNetworkAttributeProperties = attrProperty;
570 } else if (attrProperty->getTagPropertyParent()->getSupermode() == Supermode::DEMAND) {
571 myDemandAttributeProperties = attrProperty;
572 } else if (attrProperty->getTagPropertyParent()->getSupermode() == Supermode::DATA) {
573 myDataAttributeProperties = attrProperty;
574 }
575}
576
577
578void
580 if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeNetwork()) {
581 myNetworkMatchValue = value;
582 } else if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeDemand()) {
583 myDemandMatchValue = value;
584 } else if (myMatchAttributeParent->mySelectorFrameParent->getViewNet()->getEditModes().isCurrentSupermodeData()) {
585 myDataMatchValue = value;
586 }
587}
588
589/****************************************************************************/
FXDEFMAP(GNEMatchAttribute) GNEMatchAttributeMap[]
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
@ MID_GNE_SELECTORFRAME_SELECTATTRIBUTE
select attribute in selector frame
@ MID_GNE_SELECTORFRAME_SELECTTAG
select tag in selector frame
@ MID_HELP
help button
Definition GUIAppEnum.h:653
@ MID_GNE_SELECTORFRAME_PROCESSSTRING
process string
@ MID_GNE_SELECTORFRAME_TOGGLECOMMON
toogle only show common
#define GUIDesignTextColorRed
red color (for invalid text)
Definition GUIDesigns.h:44
#define GUIDesignButton
Definition GUIDesigns.h:100
#define GUIDesignComboBox
Definition GUIDesigns.h:295
#define GUIDesignTextField
Definition GUIDesigns.h:74
#define GUIDesignButtonRectangular
little rectangular button used in frames (For example, in "help" buttons)
Definition GUIDesigns.h:112
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition GUIDesigns.h:92
#define GUIDesignComboBoxVisibleItems
Definition GUIDesigns.h:64
#define GUIDesignTextColorBlack
black color (for correct text)
Definition GUIDesigns.h:38
#define GUIDesignCheckButton
checkButton placed in left position
Definition GUIDesigns.h:194
#define TL(string)
Definition MsgHandler.h:305
@ SUMO_TAG_VEHICLE
description of a vehicle
@ GNE_TAG_ATTRIBUTES_ALL
@ GNE_TAG_DATAS
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ GNE_ATTR_NOCOMMON
no common attributes
@ SUMO_ATTR_SPEED
@ GNE_ATTR_PARENT
parent of an additional element
@ SUMO_ATTR_ID
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
bool isNumerical() const
return true if attribute is numerical (int or float)
const GNETagProperties * getTagPropertyParent() const
get reference to tagProperty parent
SumoXMLAttr getAttr() const
get XML Attribute
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:152
container with current edited properties
CurrentEditedProperties()=delete
default constructor
std::vector< const GNETagProperties * > myDemandTagProperties
current demand tag properties
const GNEAttributeProperties * getAttributePropertiesNoCommon() const
get attr properties no common
std::vector< const GNETagProperties * > myNetworkTagProperties
current network tag properties
std::string myNetworkMatchValue
current network match value
GNETagProperties * myTagPropertiesAllAttributes
tag properties <all>
void setTagProperties(const GNETagProperties *tagProperty)
set tag property (depending of supermode)
const std::string & getMatchValue() const
get match value (depending of supermode)
const GNETagProperties * getTagPropertiesAll() const
get special tag <all>
void setAttributeProperties(const GNEAttributeProperties *attrProperty)
set attribute property (depending of supermode)
const GNEMatchAttribute * myMatchAttributeParent
pointer to match attribute parent
const GNEAttributeProperties * myAttributePropertiesNoCommon
attribute properties no common
const GNETagProperties * getTagProperties() const
get tag property (depending of supermode)
void setMatchValue(const std::string value)
set match value (depending of supermode)
const GNEAttributeProperties * getAttributeProperties() const
get attribute property (depending of supermode)
CurrentEditedProperties * myCurrentEditedProperties
current edited properties
~GNEMatchAttribute()
destructor
FXButton * myMatchStringButton
match string button
long onCmdAttributeSelected(FXObject *, FXSelector, void *)
Called when the user selects an attribute in the match box.
void showMatchAttribute()
show match attributes
std::vector< MFXComboBoxTagProperty * > myTagComboBoxVector
vector with tag property comboBoxes
std::vector< GNEAttributeCarrier * > getGenericMatches(const std::vector< GNEGenericData * > &genericDatas, const std::string &attr, const char compOp, const double val, const std::string &expr)
return GenericDatas of the given type with matching attrs
long onCmdProcessString(FXObject *, FXSelector, void *)
Called when the user enters a new selection expression.
GNESelectorFrame * mySelectorFrameParent
pointer to selector frame parent
long onCmdToogleOnlyCommon(FXObject *, FXSelector, void *)
Called when the user toogle the only common checkbox.
long onCmdTagSelected(FXObject *obj, FXSelector, void *)
Called when the user selects a tag in the match box.
FXTextField * myMatchString
string of the match
void hideMatchAttribute()
hide match attributes
FXCheckButton * myShowOnlyCommonAttributes
checkbox for enable/disable show only common attributes
long onCmdHelp(FXObject *, FXSelector, void *)
Called when the user clicks the help button.
void refreshMatchAttribute()
refresh match attribute
std::vector< GNEAttributeCarrier * > getMatches(const char compOp, const double val, const std::string &expr)
FOX need this.
void enableMatchAttribute()
enable match attributes
void disableMatchAttribute()
disable match attributes
MFXComboBoxAttrProperty * myAttributeComboBox
attribute property comboBox
GNEMatchAttribute(GNESelectorFrame *selectorFrameParent)
FOX-declaration.
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag tag=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:144
const GNETagPropertiesDatabase * getTagPropertiesDatabase() const
get tag properties database
Definition GNENet.cpp:138
void handleIDs(const std::vector< GNEAttributeCarrier * > &ACs, const ModificationMode::Operation setop=ModificationMode::Operation::DEFAULT)
apply list of ids to the current selection according to Operation,
std::map< std::string, const GNEAttributeProperties * > getHierarchicalChildrenAttributesRecursively(const bool onlyCommon, const bool onlyDrawables) const
get all children attributes sorted by name (Including this)
const std::vector< const GNETagProperties * > getHierarchicalParentsRecuersively() const
get all parents, beginning from current element (root not included) untils this element
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Supermode getSupermode() const
get supermode associated with this tag
GNENet * getNet() const
get the net object
GNEViewParent * getViewParent() const
get the net object
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
MFXStaticToolTip * getStaticTooltipMenu() const
get static toolTip for menus
void clearItems()
Remove all items from the list.
bool hasAttrProperty(const GNEAttributeProperties *attrProperties)
check if the given attribute exist in comboBox
FXint appendAttrItem(const GNEAttributeProperties *attrProperties, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append item
long setCurrentItem(const GNEAttributeProperties *attrProperties, FXbool notify=FALSE)
Set the current item.
const GNEAttributeProperties * getCurrentAttrProperty() const
get current attribute property
FXint getNumItems() const
Return the number of items in the list.
void setTextColor(FXColor clr)
Change text color.
void disable()
Disable combo box.
void enable()
Enable combo box.
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)