59 #ifdef CHECK_MEMORY_LEAKS
61 #endif // CHECK_MEMORY_LEAKS
110 FXIMPLEMENT(
GNEAdditionalFrame, FXScrollWindow, GNEAdditionalMap, ARRAYNUMBER(GNEAdditionalMap))
111 FXIMPLEMENT(
GNEAdditionalFrame::additionalParameterList, FXMatrix, GNEAdditionalParameterListMap, ARRAYNUMBER(GNEAdditionalParameterListMap))
112 FXIMPLEMENT(
GNEAdditionalFrame::additionalParameters, FXGroupBox, GNEAdditionalParametersMap, ARRAYNUMBER(GNEAdditionalParametersMap))
113 FXIMPLEMENT(
GNEAdditionalFrame::editorParameters, FXGroupBox, GNEEditorParametersMap, ARRAYNUMBER(GNEEditorParametersMap))
114 FXIMPLEMENT(
GNEAdditionalFrame::additionalSet, FXGroupBox, GNEAdditionalSetMap, ARRAYNUMBER(GNEAdditionalSetMap))
115 FXIMPLEMENT(
GNEAdditionalFrame::edgesSelector, FXGroupBox, GNEEdgesMap, ARRAYNUMBER(GNEEdgesMap))
116 FXIMPLEMENT(
GNEAdditionalFrame::lanesSelector, FXGroupBox, GNELanesMap, ARRAYNUMBER(GNELanesMap))
123 GNEFrame(parent, viewNet, "Additionals"),
127 myGroupBoxForMyAdditionalMatchBox =
new FXGroupBox(myContentFrame,
"Additional element", GROUPBOX_TITLE_CENTER | FRAME_GROOVE | LAYOUT_FILL_X);
130 myAdditionalMatchBox =
new FXComboBox(myGroupBoxForMyAdditionalMatchBox, 12,
this,
MID_GNE_MODE_ADDITIONAL_ITEM, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC | LAYOUT_CENTER_Y | LAYOUT_FILL_X);
149 for (std::vector<SumoXMLTag>::const_iterator i = additionalTags.begin(); i != additionalTags.end(); i++) {
150 myAdditionalMatchBox->appendItem(
toString(*i).c_str());
154 myAdditionalMatchBox->setNumVisible((
int)myAdditionalMatchBox->getNumItems());
157 if (additionalTags.size() > 0) {
159 myActualAdditionalType = additionalTags.front();
160 setParametersOfAdditional(myActualAdditionalType);
183 pointed_junction =
dynamic_cast<GNEJunction*
>(netElement);
184 if (pointed_junction != NULL) {
196 if (dynamic_cast<GNELane*>(netElement) != NULL) {
197 pointed_edge = &(
dynamic_cast<GNELane*
>(netElement)->getParentEdge());
199 if (pointed_edge != NULL) {
210 pointed_lane =
dynamic_cast<GNELane*
>(netElement);
211 if (pointed_lane != NULL) {
222 pointed_crossing =
dynamic_cast<GNECrossing*
>(netElement);
223 if (pointed_crossing != NULL) {
245 if (startPos != -1) {
261 }
else if (pointed_lane) {
269 if (startPos != -1) {
317 std::vector<std::string> vectorOfIds;
321 for (std::vector<GNEEdge*>::iterator i = selectedEdges.begin(); i != selectedEdges.end(); i++) {
322 vectorOfIds.push_back((*i)->getID());
340 std::vector<std::string> vectorOfIds;
344 for (std::vector<GNELane*>::iterator i = selectedLanes.begin(); i != selectedLanes.end(); i++) {
345 vectorOfIds.push_back((*i)->getID());
375 for (std::vector<SumoXMLTag>::const_iterator i = additionalTags.begin(); i != additionalTags.end(); i++) {
387 FXScrollWindow::show();
400 FXScrollWindow::hide();
418 for (std::vector<std::pair <SumoXMLAttr, std::string> >::iterator i = attrs.begin(); i != attrs.end(); i++) {
476 return positionOfTheMouseOverLane;
478 if (positionOfTheMouseOverLane - lenghtOfAdditional >= 0.01) {
479 return positionOfTheMouseOverLane - lenghtOfAdditional;
487 if (positionOfTheMouseOverLane - lenghtOfAdditional / 2 >= 0.01) {
488 return positionOfTheMouseOverLane - lenghtOfAdditional / 2;
505 if (positionOfTheMouseOverLane + lenghtOfAdditional <= laneLenght - 0.01) {
506 return positionOfTheMouseOverLane + lenghtOfAdditional;
508 return laneLenght - 0.01;
514 return positionOfTheMouseOverLane;
516 if (positionOfTheMouseOverLane + lenghtOfAdditional / 2 <= laneLenght - 0.01) {
517 return positionOfTheMouseOverLane + lenghtOfAdditional / 2;
519 return laneLenght - 0.01;
534 FXMatrix(parent, 3, MATRIX_BY_COLUMNS | LAYOUT_FILL_X),
537 myLabel =
new FXLabel(
this,
"name", 0, JUSTIFY_RIGHT | LAYOUT_FIX_WIDTH, 0, 0, 60, 0);
553 myLabel->setText(
toString(myAttr).c_str());
555 myTextField->setText(value.c_str());
564 myLabel->setText(
toString(myAttr).c_str());
566 myTextField->setText(
toString(value).c_str());
575 myLabel->setText(
toString(myAttr).c_str());
577 myTextField->setText(
toString(value).c_str());
586 myLabel->setText(
toString(myAttr).c_str());
588 myMenuCheck->setCheck(value);
613 return (myMenuCheck->getCheck() == 1) ?
"true" :
"false";
615 return myTextField->getText().text();
624 FXMatrix(parent, 2, MATRIX_BY_COLUMNS | LAYOUT_FILL_X),
626 numberOfVisibleTextfields(1),
627 myMaxNumberOfValuesInParameterList(20) {
630 myLabels.push_back(
new FXLabel(
this,
"name", 0, JUSTIFY_RIGHT | LAYOUT_FIX_WIDTH, 0, 0, 60, 0));
634 myLabels.push_back(
new FXLabel(
this,
"Rows", 0, JUSTIFY_RIGHT | LAYOUT_FIX_WIDTH, 0, 0, 60, 0));
635 FXHorizontalFrame* buttonsFrame =
new FXHorizontalFrame(
this, LAYOUT_FILL_COLUMN | LAYOUT_FILL_X);
638 ICON_BEFORE_TEXT | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | FRAME_THICK | FRAME_RAISED,
642 ICON_BEFORE_TEXT | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | FRAME_THICK | FRAME_RAISED,
655 std::cout <<
"FINISH" << std::endl;
661 std::cout <<
"FINISH" << std::endl;
667 std::cout <<
"FINISH" << std::endl;
672 if ((
int)value.size() < myMaxNumberOfValuesInParameterList) {
674 numberOfVisibleTextfields = (int)value.size();
675 if (numberOfVisibleTextfields == 0) {
676 numberOfVisibleTextfields++;
678 for (
int i = 0; i < myMaxNumberOfValuesInParameterList; i++) {
681 for (
int i = 0; i < numberOfVisibleTextfields; i++) {
682 myLabels.at(i)->show();
683 myTextFields.at(i)->show();
695 for (
int i = 0; i < myMaxNumberOfValuesInParameterList; i++) {
696 myLabels.at(i)->hide();
697 myTextFields.at(i)->hide();
698 myTextFields.at(i)->setText(
"");
716 for (
int i = 0; i < numberOfVisibleTextfields; i++) {
717 if (!myTextFields.at(i)->getText().empty()) {
718 value += (myTextFields.at(i)->getText().text() + std::string(
" "));
727 if (numberOfVisibleTextfields < (myMaxNumberOfValuesInParameterList - 1)) {
728 myLabels.at(numberOfVisibleTextfields)->show();
729 myTextFields.at(numberOfVisibleTextfields)->show();
730 numberOfVisibleTextfields++;
731 getParent()->recalc();
739 if (numberOfVisibleTextfields > 1) {
740 numberOfVisibleTextfields--;
741 myLabels.at(numberOfVisibleTextfields)->hide();
742 myTextFields.at(numberOfVisibleTextfields)->hide();
743 myTextFields.at(numberOfVisibleTextfields)->setText(
"");
745 getParent()->recalc();
755 FXGroupBox(parent,
"Default parameters", GROUPBOX_TITLE_CENTER | FRAME_GROOVE | LAYOUT_FILL_X),
757 myIndexParameterList(0),
759 maxNumberOfListParameters(2) {
783 for (
int i = 0; i < maxNumberOfParameters; i++) {
784 myVectorOfAdditionalParameter.at(i)->hideParameter();
788 for (
int i = 0; i < maxNumberOfListParameters; i++) {
789 myVectorOfAdditionalParameterList.at(i)->hideParameter();
793 myIndexParameterList = 0;
794 myIndexParameter = 0;
801 myAdditional = additional;
805 if (myIndexParameterList < maxNumberOfListParameters) {
814 myVectorOfAdditionalParameterList.at(myIndexParameterList)->showListParameter(attribute,
GNEAttributeCarrier::getDefaultValue< std::vector<std::string> >(additional, attribute));
817 myIndexParameterList++;
819 WRITE_ERROR(
"Max number of list attributes reached (" +
toString(maxNumberOfListParameters) +
").");
822 if (myIndexParameter < maxNumberOfParameters) {
825 myVectorOfAdditionalParameter.at(myIndexParameter)->showParameter(attribute, GNEAttributeCarrier::getDefaultValue<int>(additional, attribute));
827 myVectorOfAdditionalParameter.at(myIndexParameter)->showParameter(attribute, GNEAttributeCarrier::getDefaultValue<SUMOReal>(additional, attribute));
829 myVectorOfAdditionalParameter.at(myIndexParameter)->showParameter(attribute, GNEAttributeCarrier::getDefaultValue<bool>(additional, attribute));
831 myVectorOfAdditionalParameter.at(myIndexParameter)->showParameter(attribute, GNEAttributeCarrier::getDefaultValue<std::string>(additional, attribute));
833 WRITE_WARNING(
"Attribute '" +
toString(attribute) +
"' don't have a defined type. Check definition in GNEAttributeCarrier");
838 WRITE_ERROR(
"Max number of attributes reached (" +
toString(maxNumberOfParameters) +
").");
857 std::map<SumoXMLAttr, std::string>
859 std::map<SumoXMLAttr, std::string> values;
861 for (
int i = 0; i < myIndexParameter; i++) {
862 values[myVectorOfAdditionalParameter.at(i)->getAttr()] = myVectorOfAdditionalParameter.at(i)->getValue();
865 for (
int i = 0; i < myIndexParameterList; i++) {
866 values[myVectorOfAdditionalParameterList.at(i)->getAttr()] = myVectorOfAdditionalParameterList.at(i)->getListValues();
874 return (myIndexParameter + myIndexParameterList);
881 FXDialogBox* helpDialog =
new FXDialogBox(
this, (
"Parameters of " +
toString(myAdditional)).c_str(), DECOR_CLOSE | DECOR_TITLE);
883 FXTable* myTable =
new FXTable(helpDialog,
this,
MID_TABLE, TABLE_READONLY);
884 myTable->setVisibleRows((FXint)(myIndexParameter + myIndexParameterList));
885 myTable->setVisibleColumns(3);
886 myTable->setTableSize((FXint)(myIndexParameter + myIndexParameterList), 3);
887 myTable->setBackColor(FXRGB(255, 255, 255));
888 myTable->setColumnText(0,
"Name");
889 myTable->setColumnText(1,
"Value");
890 myTable->setColumnText(2,
"Definition");
891 myTable->getRowHeader()->setWidth(0);
892 FXHeader* header = myTable->getColumnHeader();
893 header->setItemJustify(0, JUSTIFY_CENTER_X);
894 header->setItemSize(0, 120);
895 header->setItemJustify(1, JUSTIFY_CENTER_X);
896 header->setItemSize(1, 80);
897 int maxSizeColumnDefinitions = 0;
899 for (
int i = 0; i < myIndexParameter; i++) {
900 SumoXMLAttr attr = myVectorOfAdditionalParameter.at(i)->getAttr();
902 myTable->setItem(i, 0,
new FXTableItem(
toString(attr).c_str()));
904 FXTableItem* type =
new FXTableItem(
"");
906 type->setText(
"int");
908 type->setText(
"float");
910 type->setText(
"bool");
912 type->setText(
"string");
914 type->setJustify(FXTableItem::CENTER_X);
915 myTable->setItem(i, 1, type);
918 definition->setJustify(FXTableItem::LEFT);
919 myTable->setItem(i, 2, definition);
925 for (
int i = 0; i < myIndexParameterList; i++) {
926 SumoXMLAttr attr = myVectorOfAdditionalParameterList.at(i)->getAttr();
928 myTable->setItem(i, 0,
new FXTableItem(
toString(attr).c_str()));
930 FXTableItem* type =
new FXTableItem(
"");
932 type->setText(
"list of int");
934 type->setText(
"list of float");
936 type->setText(
"list of bool");
938 type->setText(
"list of string");
940 type->setJustify(FXTableItem::CENTER_X);
941 myTable->setItem(i, 1, type);
944 definition->setJustify(FXTableItem::LEFT);
945 myTable->setItem(i, 2, definition);
951 header->setItemJustify(2, JUSTIFY_CENTER_X);
952 header->setItemSize(2, maxSizeColumnDefinitions * 6);
954 new FXButton(helpDialog,
"OK\t\tclose", 0, helpDialog, FXDialogBox::ID_ACCEPT, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 4, 4, 3, 3);
955 helpDialog->create();
965 FXGroupBox(parent,
"editor parameters", GROUPBOX_TITLE_CENTER | FRAME_GROOVE | LAYOUT_FILL_X),
966 myActualAdditionalReferencePoint(GNE_ADDITIONALREFERENCEPOINT_LEFT) {
969 FRAME_SUNKEN | LAYOUT_LEFT | COMBOBOX_STATIC | LAYOUT_FILL_X);
972 FXHorizontalFrame* lengthFrame =
new FXHorizontalFrame(
this, LAYOUT_FILL_X | LAYOUT_LEFT);
975 myLengthLabel =
new FXLabel(lengthFrame,
"Length:", 0, JUSTIFY_LEFT | LAYOUT_FILL_X);
985 LAYOUT_LEFT | LAYOUT_FILL_X);
989 LAYOUT_LEFT | LAYOUT_FILL_X);
1009 myLengthLabel->show();
1010 myLengthTextField->show();
1016 myLengthLabel->hide();
1017 myLengthTextField->hide();
1023 myReferencePointMatchBox->show();
1024 myCheckForcePosition->show();
1030 myReferencePointMatchBox->hide();
1031 myCheckForcePosition->hide();
1037 return myActualAdditionalReferencePoint;
1043 return GNEAttributeCarrier::parse<SUMOReal>(myLengthTextField->getText().text());
1049 return myCheckBlock->getCheck() == 1 ?
true :
false;
1055 return myCheckForcePosition->getCheck() == 1 ?
true :
false;
1062 myActualAdditionalReferencePoint =
static_cast<additionalReferencePoint>(myReferencePointMatchBox->getCurrentItem());
1069 FXDialogBox* helpDialog =
new FXDialogBox(
this,
"Parameter editor Help", DECOR_CLOSE | DECOR_TITLE);
1070 std::ostringstream help;
1072 <<
"Referece point: Mark the initial position of the additional element.\n"
1073 <<
"Example: If you want to create a busStop with a lenght of 30 in the point 100 of the lane:\n"
1074 <<
"- Reference Left will create it with startPos = 70 and endPos = 100.\n"
1075 <<
"- Reference Right will create it with startPos = 100 and endPos = 130.\n"
1076 <<
"- Reference Center will create it with startPos = 85 and endPos = 115.\n"
1078 <<
"Force position: if is enabled, will create the additional adapting size of additional element to lane.\n"
1079 <<
"Example: If you have a lane with lenght = 100, but you try to create a busStop with size = 50\n"
1080 <<
"in the position 80 of the lane, a busStop with startPos = 80 and endPos = 100 will be created\n"
1081 <<
"instead of a busStop with startPos = 80 and endPos = 130.\n"
1083 <<
"Block movement: if is enabled, the created additional element will be blocked. i.e. cannot be moved with\n"
1084 <<
"the mouse. This option can be modified with the Inspector.";
1085 new FXLabel(helpDialog, help.str().c_str(), 0, JUSTIFY_LEFT);
1087 new FXButton(helpDialog,
"OK\t\tclose", 0, helpDialog, FXDialogBox::ID_ACCEPT,
1088 ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED,
1089 0, 0, 0, 0, 4, 4, 3, 3);
1090 helpDialog->create();
1099 std::string vectorOfIds;
1100 for (
int i = 0; i < list->getNumItems(); i++) {
1101 if (list->isItemSelected(i)) {
1102 if (vectorOfIds.size() > 0) {
1105 vectorOfIds += (list->getItem(i)->getText()).text();
1118 FXGroupBox(parent,
"Additional Set", GROUPBOX_TITLE_CENTER | FRAME_GROOVE | LAYOUT_FILL_X),
1123 mySetLabel =
new FXLabel(
this,
"Set Type:", 0, JUSTIFY_LEFT | LAYOUT_FILL_X);
1141 for (
int i = 0; i < myList->getNumItems(); i++) {
1142 if (myList->isItemSelected(i)) {
1143 return myList->getItem(i)->getText().text();
1159 mySetLabel->setText((
"Type of set: " +
toString(myType)).c_str());
1160 myList->clearItems();
1162 for (std::vector<GNEAdditional*>::const_iterator i = vectorOfAdditionalSets.begin(); i != vectorOfAdditionalSets.end(); i++) {
1163 myList->appendItem((*i)->getID().c_str());
1193 FXGroupBox(parent,
"Edges", GROUPBOX_TITLE_CENTER | FRAME_GROOVE | LAYOUT_FILL_X),
1205 FXHorizontalFrame* buttonsFrame =
new FXHorizontalFrame(
this, LAYOUT_FILL_X);
1233 myList->clearItems();
1235 for (std::vector<GNEEdge*>::iterator i = vectorOfEdges.begin(); i != vectorOfEdges.end(); i++) {
1236 if ((*i)->getID().find(search) != std::string::npos) {
1237 myList->appendItem((*i)->getID().c_str());
1241 myUseSelectedEdges->setCheck(
false);
1261 myUseSelectedEdges->enable();
1263 myUseSelectedEdges->disable();
1270 if (myUseSelectedEdges->getCheck()) {
1280 if (myUseSelectedEdges->getCheck()) {
1281 myEdgesSearch->hide();
1283 clearEdgesSelection->hide();
1284 invertEdgesSelection->hide();
1287 myEdgesSearch->show();
1289 clearEdgesSelection->show();
1290 invertEdgesSelection->show();
1304 showList(myEdgesSearch->getText().text());
1317 for (
int i = 0; i < myList->getNumItems(); i++) {
1318 if (myList->getItem(i)->isSelected()) {
1319 myList->deselectItem(i);
1328 for (
int i = 0; i < myList->getNumItems(); i++) {
1329 if (myList->getItem(i)->isSelected()) {
1330 myList->deselectItem(i);
1332 myList->selectItem(i);
1341 std::cout <<
"IMPLEMENT" << std::endl;
1350 FXGroupBox(parent,
"lanesSelector", GROUPBOX_TITLE_CENTER | FRAME_GROOVE | LAYOUT_FILL_X),
1362 FXHorizontalFrame* buttonsFrame =
new FXHorizontalFrame(
this, LAYOUT_FILL_X);
1389 myList->clearItems();
1391 for (std::vector<GNELane*>::iterator i = vectorOfLanes.begin(); i != vectorOfLanes.end(); i++) {
1392 if ((*i)->getID().find(search) != std::string::npos) {
1393 myList->appendItem((*i)->getID().c_str());
1397 myUseSelectedLanes->setCheck(
false);
1413 myUseSelectedLanes->enable();
1415 myUseSelectedLanes->disable();
1422 if (myUseSelectedLanes->getCheck()) {
1432 if (myUseSelectedLanes->getCheck()) {
1433 myLanesSearch->hide();
1435 clearLanesSelection->hide();
1436 invertLanesSelection->hide();
1439 myLanesSearch->show();
1441 clearLanesSelection->show();
1442 invertLanesSelection->show();
1456 showList(myLanesSearch->getText().text());
1469 for (
int i = 0; i < myList->getNumItems(); i++) {
1470 if (myList->getItem(i)->isSelected()) {
1471 myList->deselectItem(i);
1480 for (
int i = 0; i < myList->getNumItems(); i++) {
1481 if (myList->getItem(i)->isSelected()) {
1482 myList->deselectItem(i);
1484 myList->selectItem(i);
static bool isList(SumoXMLAttr attr)
whether an attribute is of type bool
long onCmdSelectReferencePoint(FXObject *, FXSelector, void *)
std::string getValue() const
return value
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
SumoXMLTag
Numbers representing SUMO-XML - element names.
std::vector< additionalParameterList * > myVectorOfAdditionalParameterList
vector with the additional parameters of type list
FXMenuCheck * myCheckForcePosition
checkBox for the option "force position"
int maxNumberOfListParameters
max number of parameters (Defined in constructor)
void hideFramesArea()
hide frames area if all GNEFrames are hidden
FXLabel * myLabel
lael with the name of the parameter
SumoXMLTag getCurrentlyTag() const
get current tag
SUMOReal nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
void addAttribute(SumoXMLTag additional, SumoXMLAttr attribute)
add attribute
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
bool isBlockEnabled()
check if block is enabled
edgesSelector()
FOX needs this.
int getNumberOfAddedAttributes() const
get number of added attributes
FXDEFMAP(GNEAdditionalFrame) GNEAdditionalMap[]
FXButton * add
Button to increase the number of textFields.
void showFramesArea()
show frames area if at least a GNEFrame is showed
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
~lanesSelector()
destructor
long onCmdSelectEdge(FXObject *, FXSelector, void *)
called when user select a edge of the list
FXButton * clearEdgesSelection
button for clear selection
FXMenuCheck * myUseSelectedEdges
CheckBox for selected edges.
void hideLengthField()
hide length field
FXTextField * myLengthTextField
textField for lenght
FXButton * helpAdditionalSet
button for help
additionalReferencePoint getActualReferencePoint()
get actual reference point
FXButton * invertEdgesSelection
button for invert selection
static bool buildAdditional(GNEViewNet *viewNet, SumoXMLTag tag, std::map< SumoXMLAttr, std::string > values)
Builds additional / additionalSet.
void remove2Update()
Removes the dialog to be updated.
GNEAdditionalFrame::lanesSelector * myLanesSelector
list of lanesSelector
void hideParameter()
hide all parameters
additionalParameterList()
FOX needs this.
long onCmdSelectAdditional(FXObject *, FXSelector, void *)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
additionalReferencePoint
FOX-declaration.
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...
bool addAdditional(GNENetElement *netElement, GUISUMOAbstractView *parent)
add additional element
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
~additionalParameter()
destructor
GNEViewParent * getViewParent() const
get the net object
bool isUseSelectedLanesEnable() const
get status of checkBox UseSelectedLanes
~additionalParameterList()
destructor
std::string getIdsSelected() const
get list of selecte id's in string format
GNEAdditionalFrame::additionalParameters * myAdditionalParameters
additional default parameters
static const std::vector< std::pair< SumoXMLAttr, std::string > > & allowedAttributes(SumoXMLTag tag)
get all editable attributes for tag and their default values.
void hideList()
hide edgesSelector
~edgesSelector()
destructor
void setParametersOfAdditional(SumoXMLTag actualAdditionalType)
set parameters depending of the new additionalType
void showListParameter(SumoXMLAttr attr, std::vector< int > value)
show name and value of parameters of type int
FXTextField * myLanesSearch
text field for search lane IDs
#define WRITE_WARNING(msg)
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
std::vector< FXLabel * > myLabels
vector with with the name of every parameter
GNEUndoList * getUndoList() const
get the undoList object
additional match box messages
FXButton * helpAdditional
button for help
std::string getIdSelected() const
get if currently additional Set
void hide()
hidde additional frame
GNEViewNet * myViewNet
the window to inform when the tls is modfied
void showReferencePoint()
show refence point comboBox
FXList * myList
List of lanesSelector.
additionalParameters()
FOX needs this.
FXTextField * myTextField
textField to modify the value of parameter
GNEAdditionalFrame::editorParameters * myEditorParameters
editor parameter
void hideList()
hide lanesSelector
SUMOReal setEndPosition(SUMOReal laneLenght, SUMOReal positionOfTheMouseOverLane, SUMOReal lenghtOfAdditional)
obtain the End position values of StoppingPlaces and E2 detector over the lane
long onCmdRemoveRow(FXObject *, FXSelector, void *)
add a new row int the list
SUMOReal getLenght()
get value of lenght
static bool hasAttribute(SumoXMLTag tag, SumoXMLAttr attr)
check if a element with certain tag has a certain attribute
std::map< SumoXMLAttr, std::string > getAttributes() const
get attributes
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
~additionalParameters()
destructor
static bool hasParent(SumoXMLTag tag)
check if a element with certain tag has another additional element as parent
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.
~additionalSet()
destructor
lanesSelector()
FOX needs this.
FXList * myList
List of edgesSelector.
SumoXMLTag myActualAdditionalType
actual additional type selected in the match Box
virtual std::string getDescription()
how should this attribute carrier be called
void removeAdditional(GNEAdditional *additional)
remove an additional element previously added
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
void clearAttributes()
clear attributes
static T getDefaultValue(SumoXMLTag tag, SumoXMLAttr attr)
return the default value of the attribute of an element
std::vector< GNEAdditional * > getAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING)
get vector with additionals
SumoXMLAttr getAttr() const
return attribute of list
void showList(std::string search="")
Show list of edgesSelector.
~GNEAdditionalFrame()
Destructor.
FXButton * helpReferencePoint
Button for help about the reference point.
FXComboBox * myAdditionalMatchBox
combo box with the list of additional elements
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING)
Returns the number of additionals of the net.
long onCmdUseSelectedLanes(FXObject *, FXSelector, void *)
long onCmdAddRow(FXObject *, FXSelector, void *)
GNEAdditionalFrame::additionalSet * myAdditionalSet
list of additional Set
const std::string getID() const
function to support debugging
SUMOReal setStartPosition(SUMOReal positionOfTheMouseOverLane, SUMOReal lenghtOfAdditional)
obtain the Start position values of StoppingPlaces and E2 detector over the lane
FXLabel * myLengthLabel
Label for lenght.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
long onCmdHelp(FXObject *, FXSelector, void *)
FXMenuCheck * myCheckBlock
checkBox for blocking movement
static bool isFloat(SumoXMLAttr attr)
whether an attribute is numerical of type float
A road/street connecting two junctions (netedit-version)
std::string getListValues()
return the value of list
bool isForcePositionEnabled()
check if force position is enabled
std::vector< FXTextField * > myTextFields
vector textField to modify the value of parameter
GNEAdditional * getAdditional(SumoXMLTag type, const std::string &id) const
Returns the named additional.
FXTextField * myEdgesSearch
text field for search edge IDs
FXButton * helpEdges
button for help
std::string generateID(GNENetElement *netElement) const
generate a ID for an additiona element
FXButton * clearLanesSelection
button for clear selection
const PositionVector & getShape() const
returns the shape of the lane
SUMOReal getLaneShapeLenght() const
returns the length of the lane's shape
int myMaxNumberOfValuesInParameterList
Number max of values in a parameter of type list.
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
long onCmdUseSelectedEdges(FXObject *, FXSelector, void *)
editorParameters()
FOX needs this.
void updateUseSelectedLanes()
static const std::vector< SumoXMLTag > & allowedAdditionalTags()
get all editable tags for additionals
void show()
show additional frame
static bool isInt(SumoXMLAttr attr)
whether an attribute is numerical or type int
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
FXList * myList
List of additional sets.
An Element which don't belongs to GNENet but has influency in the simulation.
void hideReferencePoint()
hide refence point comboBox
long onCmdTypeInSearchBox(FXObject *, FXSelector, void *)
called when user type in search box
void showAdditionalParameters()
show group box
additionalParameter(FXComposite *parent, FXObject *tgt)
constructor
std::vector< additionalParameter * > myVectorOfAdditionalParameter
vector with the additional parameters
SumoXMLAttr getAttr() const
return Attr
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
void hideParameter()
hide all parameters
void updateUseSelectedEdges()
Update use selectedEdges.
static std::string getDefinition(SumoXMLTag tag, SumoXMLAttr attr)
return definition of a certain SumoXMLAttr
GNENet * getNet() const
get the net object
std::string getIdsSelected() const
get list of selecte id's in string format
FXMenuCheck * myMenuCheck
menuCheck to enable/disable the value of parameter
static SumoXMLTag getParentType(SumoXMLTag tag)
get parent's tag of a certain additional element
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=OUTPUT_ACCURACY)
void showLengthField()
show length field
static bool isUnique(SumoXMLAttr attr)
whether an attribute is unique (may not be edited for a multi-selection)
~editorParameters()
destructor
static bool isString(SumoXMLAttr attr)
whether an attribute is of type string
long onCmdSelectLane(FXObject *, FXSelector, void *)
called when user select a lane of the list
void showList(SumoXMLTag type)
Show list of additionalSet.
void hideList()
hide additionalSet
void hideAdditionalParameters()
hide group box
void showList(std::string search="")
Show list of lanesSelector.
FXMenuCheck * myUseSelectedLanes
CheckBox for selected lanes.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
additionalSet()
FOX needs this.
static std::string getIdsSelected(const FXList *list)
get list of selecte id's in string format
bool isUseSelectedEdgesEnable() const
get status of checkBox UseSelectedEdges
int maxNumberOfParameters
max number of parameters (Defined in constructor)
void showParameter(SumoXMLAttr attr, std::string value)
show name and value of attribute of type string
GUISelectedStorage gSelected
A global holder of selected objects.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXLabel * mySetLabel
Label with the name of Set.
static bool isBool(SumoXMLAttr attr)
whether an attribute is of type bool
long onCmdSelectAdditionalSet(FXObject *, FXSelector, void *)
long onCmdTypeInSearchBox(FXObject *, FXSelector, void *)
called when user type in search box
FXButton * invertLanesSelection
button for invert selection
GNEAdditionalFrame::edgesSelector * myEdgesSelector
list of edgesSelector
FXButton * helpLanes
button for help
FXComboBox * myReferencePointMatchBox
match box with the list of reference points