80FXIMPLEMENT(
GNEInspectorFrame, FXVerticalFrame, GNEInspectorFrameMap, ARRAYNUMBER(GNEInspectorFrameMap))
98 myInspectorFrameParent(inspectorFrameParent) {
106 inspectorFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
123 const auto& ACs = myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers();
125 if (ACs.size() > 0) {
127 myTextFieldParentAdditional->enable();
128 myCheckBoxCloseShape->enable();
130 const auto& tagValue = ACs.front()->getTagProperty();
132 if (ACs.size() == 1) {
136 myMarkFrontElementButton->show();
138 if (myInspectorFrameParent->getViewNet()->getFrontAttributeCarrier() == ACs.front()) {
139 myMarkFrontElementButton->disable();
141 myMarkFrontElementButton->enable();
145 if (tagValue.canCloseShape()) {
150 for (
const auto& inspectedAC : ACs) {
154 myHorizontalFrameCloseShape->show();
156 myHelpButton->show();
159 myCheckBoxCloseShape->setCheck(
true);
160 myCheckBoxCloseShape->setText(
TL(
"true"));
162 myCheckBoxCloseShape->setCheck(
false);
163 myCheckBoxCloseShape->setText(
TL(
"false"));
167 if (tagValue.isChild() && tagValue.canBeReparent()) {
171 std::set<std::string> parents;
172 for (
const auto& inspectedAC : ACs) {
176 myLabelParentAdditional->show();
177 myTextFieldParentAdditional->show();
178 mySetNewParentButton->show();
180 mySetNewParentButton->setChecked(
false);
181 mySetNewParentButton->setText(
TL(
"Set new parent"));
186 myHelpButton->show();
188 myLabelParentAdditional->setText((parentTagProperty.getTagStr() +
" parent").c_str());
189 myTextFieldParentAdditional->setText(
toString(parents).c_str());
193 myTextFieldParentAdditional->disable();
194 myCheckBoxCloseShape->disable();
203 myLabelParentAdditional->hide();
204 myTextFieldParentAdditional->hide();
205 mySetNewParentButton->hide();
206 myHorizontalFrameCloseShape->hide();
207 myMarkFrontElementButton->hide();
208 myHelpButton->hide();
217 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
218 if (ACs.size() > 0) {
220 if (myInspectorFrameParent->getViewNet()->getFrontAttributeCarrier() == ACs.front()) {
221 myMarkFrontElementButton->disable();
223 myMarkFrontElementButton->enable();
226 if (myHorizontalFrameCloseShape->shown()) {
229 for (
const auto& i : ACs) {
234 myCheckBoxCloseShape->setCheck(
true);
235 myCheckBoxCloseShape->setText(
TL(
"true"));
237 myCheckBoxCloseShape->setCheck(
false);
238 myCheckBoxCloseShape->setText(
TL(
"false"));
242 if (myTextFieldParentAdditional->shown() && ((myTextFieldParentAdditional->getTextColor() == FXRGB(0, 0, 0)) || forceRefresh)) {
244 myLabelParentAdditional->setText((
toString(ACs.front()->getTagProperty().getParentTags().front()) +
" parent").c_str());
245 myTextFieldParentAdditional->setText(ACs.front()->getAttribute(
GNE_ATTR_PARENT).c_str());
256 return (mySetNewParentButton->shown() && mySetNewParentButton->amChecked());
263 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
265 if ((ACs.size() > 0) && clickedAC) {
267 for (
const auto& parentTag : ACs.front()->getTagProperty().getParentTags()) {
270 if (ACs.size() > 1) {
271 myInspectorFrameParent->myViewNet->getUndoList()->begin(ACs.front()->getTagProperty().getGUIIcon(),
"Change multiple attributes");
274 for (
const auto& AC : ACs) {
275 AC->setAttribute(
GNE_ATTR_PARENT, clickedAC->
getID(), myInspectorFrameParent->myViewNet->getUndoList());
278 if (ACs.size() > 1) {
279 myInspectorFrameParent->myViewNet->getUndoList()->end();
284 refreshNeteditAttributesEditor(
true);
293 if (mySetNewParentButton->amChecked()) {
294 onCmdSetNeteditAttribute(mySetNewParentButton, 0,
nullptr);
301 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
303 if (ACs.size() > 0) {
305 if (ACs.size() > 1) {
306 myInspectorFrameParent->myViewNet->getUndoList()->begin(ACs.front()->getTagProperty().getGUIIcon(),
"Change multiple attributes");
308 if (obj == mySetNewParentButton) {
309 if (mySetNewParentButton->amChecked()) {
310 mySetNewParentButton->setText(
TL(
"Set new parent"));
311 mySetNewParentButton->setChecked(
false);
313 mySetNewParentButton->setText((
"Click over " +
toString(ACs.front()->getTagProperty().getParentTags().front())).c_str());
314 mySetNewParentButton->setChecked(
true);
316 }
else if (obj == myCheckBoxCloseShape) {
318 for (
const auto& AC : ACs) {
319 if (myCheckBoxCloseShape->getCheck() == 1) {
320 AC->setAttribute(
GNE_ATTR_CLOSE_SHAPE,
"true", myInspectorFrameParent->myViewNet->getUndoList());
321 myCheckBoxCloseShape->setText(
TL(
"true"));
323 AC->setAttribute(
GNE_ATTR_CLOSE_SHAPE,
"false", myInspectorFrameParent->myViewNet->getUndoList());
324 myCheckBoxCloseShape->setText(
TL(
"false"));
327 }
else if (obj == myTextFieldParentAdditional) {
328 if (ACs.front()->isValid(
GNE_ATTR_PARENT, myTextFieldParentAdditional->getText().text())) {
330 for (
const auto& AC : ACs) {
331 AC->setAttribute(
GNE_ATTR_PARENT, myTextFieldParentAdditional->getText().text(), myInspectorFrameParent->myViewNet->getUndoList());
333 myTextFieldParentAdditional->setTextColor(FXRGB(0, 0, 0));
334 myTextFieldParentAdditional->killFocus();
336 myTextFieldParentAdditional->setTextColor(FXRGB(255, 0, 0));
340 if (ACs.size() > 1) {
341 myInspectorFrameParent->myViewNet->getUndoList()->end();
344 myInspectorFrameParent->myAttributesEditor->refreshAttributeEditor(
true,
true);
345 myInspectorFrameParent->myGEOAttributesEditor->refreshGEOAttributesEditor(
true);
354 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
356 myInspectorFrameParent->getViewNet()->setFrontAttributeCarrier(myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front());
358 myMarkFrontElementButton->disable();
367 FXDialogBox* additionalNeteditAttributesHelpDialog =
new FXDialogBox(getCollapsableFrame(),
"Netedit Attributes Help",
GUIDesignDialogBox);
370 std::ostringstream help;
372 <<
TL(
"- Mark as front element: Mark element as front element (Will be drawn over all other elements)\n")
373 <<
TL(
"- Block movement: disable movement in move mode\n")
374 <<
TL(
"- Block shape: Disable moving of shape's vertices and edges. Entire shape can be moved'.\n")
375 <<
TL(
"- Close shape: Add or remove the last vertex with the same position of first edge'.");
387 WRITE_DEBUG(
"Opening NeteditAttributesEditor help dialog");
389 additionalNeteditAttributesHelpDialog->create();
391 additionalNeteditAttributesHelpDialog->show(PLACEMENT_CURSOR);
395 getApp()->runModalFor(additionalNeteditAttributesHelpDialog);
397 WRITE_DEBUG(
"Closing NeteditAttributesEditor help dialog");
407 myInspectorFrameParent(inspectorFrameParent) {
430 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() > 0) {
432 myGEOAttributeTextField->enable();
433 myUseGEOCheckButton->enable();
435 const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty();
437 if (tagProperty.hasGEOShape()) {
442 for (
const auto& i : myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers()) {
443 value &= GNEAttributeCarrier::parse<bool>(i->getAttribute(
SUMO_ATTR_GEO));
446 myUseGEOFrame->show();
449 myUseGEOCheckButton->enable();
451 myUseGEOCheckButton->setCheck(
true);
452 myUseGEOCheckButton->setText(
TL(
"true"));
454 myUseGEOCheckButton->setCheck(
false);
455 myUseGEOCheckButton->setText(
TL(
"false"));
458 myUseGEOCheckButton->disable();
460 if (tagProperty.hasGEOShape() && myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
461 myGEOAttributeFrame->show();
463 myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0));
466 myGEOAttributeTextField->enable();
467 myGEOAttributeTextField->setText(myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getAttribute(
SUMO_ATTR_GEOSHAPE).c_str());
469 myGEOAttributeTextField->disable();
470 myGEOAttributeTextField->setText(
TL(
"No geo-conversion defined"));
475 if (
GNEFrameAttributeModules::isSupermodeValid(myInspectorFrameParent->getViewNet(), myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()) ==
false) {
476 myGEOAttributeTextField->disable();
477 myUseGEOCheckButton->disable();
486 myGEOAttributeFrame->hide();
487 myUseGEOFrame->hide();
496 const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty();
498 if ((
GeoConvHelper::getFinal().getProjString() !=
"!") && myGEOAttributeFrame->shown() && ((myGEOAttributeTextField->getTextColor() == FXRGB(0, 0, 0)) || forceRefresh)) {
499 if (tagProperty.hasGEOShape()) {
500 myGEOAttributeTextField->setText(myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getAttribute(
SUMO_ATTR_GEOSHAPE).c_str());
502 myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0));
510 if ((
GeoConvHelper::getFinal().getProjString() !=
"!") && (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() > 0)) {
511 if (obj == myGEOAttributeTextField) {
513 const auto& tagProperty = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty();
515 if (tagProperty.hasGEOShape()) {
516 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->isValid(
SUMO_ATTR_GEOSHAPE, myGEOAttributeTextField->getText().text())) {
517 myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->setAttribute(
SUMO_ATTR_GEOSHAPE, myGEOAttributeTextField->getText().text(), myInspectorFrameParent->myViewNet->getUndoList());
518 myGEOAttributeTextField->setTextColor(FXRGB(0, 0, 0));
519 myGEOAttributeTextField->killFocus();
521 myGEOAttributeTextField->setTextColor(FXRGB(255, 0, 0));
524 throw ProcessError(
"myGEOAttributeTextField must be hidden becaurse there isn't GEO Attribute to edit");
526 }
else if (obj == myUseGEOCheckButton) {
528 for (
const auto& i : myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers()) {
529 if (myUseGEOCheckButton->getCheck() == 1) {
530 i->setAttribute(
SUMO_ATTR_GEO,
"true", myInspectorFrameParent->myViewNet->getUndoList());
531 myUseGEOCheckButton->setText(
TL(
"true"));
533 i->setAttribute(
SUMO_ATTR_GEO,
"false", myInspectorFrameParent->myViewNet->getUndoList());
534 myUseGEOCheckButton->setText(
TL(
"false"));
539 myInspectorFrameParent->myAttributesEditor->refreshAttributeEditor(
true,
true);
540 myInspectorFrameParent->myNeteditAttributesEditor->refreshNeteditAttributesEditor(
true);
548 FXDialogBox* helpDialog =
new FXDialogBox(getCollapsableFrame(),
"GEO attributes Help",
GUIDesignDialogBox);
549 std::ostringstream help;
551 <<
TL(
" SUMO uses the World Geodetic System 84 (WGS84/UTM).\n")
552 <<
TL(
" For a GEO-referenced network, geo coordinates are represented as pairs of Longitude and Latitude\n")
553 <<
TL(
" in decimal degrees without extra symbols. (N,W..)\n")
554 <<
TL(
" - Longitude: East-west position of a point on the Earth's surface.\n")
555 <<
TL(
" - Latitude: North-south position of a point on the Earth's surface.\n")
556 <<
TL(
" - CheckBox 'geo' enables or disables saving position in GEO coordinates\n");
560 helpDialog->create();
571 myInspectorFrameParent(inspectorFrameParent),
572 myEdgeTemplate(nullptr) {
589 if ((myInspectorFrameParent->myViewNet->getEditModes().isCurrentSupermodeNetwork()) &&
590 (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty().getTag() ==
SUMO_TAG_EDGE)) {
592 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
593 mySetTemplateButton->show();
594 mySetTemplateButton->setText((
"Set edge '" + myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getID() +
"' as Template").c_str());
613 return myEdgeTemplate;
620 if (myEdgeTemplate) {
621 delete myEdgeTemplate;
622 myEdgeTemplate =
nullptr;
628 myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getViewParent()->getCreateEdgeFrame()->setUseEdgeTemplate();
635 if (myEdgeTemplate) {
636 myEdgeTemplate->updateLaneTemplates();
638 myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getViewParent()->getCreateEdgeFrame()->setUseEdgeTemplate();
645 if (shown() && mySetTemplateButton->isEnabled()) {
646 onCmdSetTemplate(
nullptr, 0,
nullptr);
654 if (shown() && myCopyTemplateButton->isEnabled()) {
655 onCmdCopyTemplate(
nullptr, 0,
nullptr);
663 if (shown() && myClearTemplateButton->isEnabled()) {
664 onCmdClearTemplate(
nullptr, 0,
nullptr);
672 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() != 1) {
676 GNEEdge* edge = myInspectorFrameParent->myViewNet->
getNet()->
getAttributeCarriers()->
retrieveEdge(myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front()->getID());
678 setEdgeTemplate(edge);
688 if (myEdgeTemplate) {
690 myInspectorFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::EDGE,
"copy edge template");
692 for (
const auto& inspectedAC : myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers()) {
694 if (inspectedAC->getID() != myEdgeTemplate->getID()) {
696 myInspectorFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveEdge(inspectedAC->getID())->copyTemplate(myEdgeTemplate, myInspectorFrameParent->myViewNet->getUndoList());
700 myInspectorFrameParent->myViewNet->getUndoList()->end();
702 myInspectorFrameParent->myAttributesEditor->refreshAttributeEditor(
true,
true);
704 myInspectorFrameParent->myViewNet->updateViewNet();
713 setEdgeTemplate(
nullptr);
723 if (myEdgeTemplate) {
725 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
727 if (ACs.size() == 1) {
728 myCopyTemplateButton->setText((
"Copy '" + myEdgeTemplate->getID() +
"' into edge '" + ACs.front()->getID() +
"'").c_str());
730 myCopyTemplateButton->setText((
"Copy '" + myEdgeTemplate->getID() +
"' into " +
toString(ACs.size()) +
" selected edges").c_str());
733 myCopyTemplateButton->enable();
734 myClearTemplateButton->enable();
737 myCopyTemplateButton->setText(
TL(
"No edge Template Set"));
739 myCopyTemplateButton->disable();
740 myClearTemplateButton->disable();
750 myInspectorFrameParent(inspectorFrameParent) {
763 if ((myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0) &&
764 myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front()->getTagProperty().hasParameters()) {
766 refreshParametersEditor();
785 const GNEAttributeCarrier* frontAC = myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0 ? myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front() :
nullptr;
789 if (myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
792 }
else if (myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0) {
795 for (
const auto& AC : myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers()) {
797 parameters =
"different parameters";
801 myTextFieldParameters->setText(parameters.c_str());
804 myTextFieldParameters->setTextColor(FXRGB(0, 0, 0));
807 myTextFieldParameters->enable();
808 myButtonEditParameters->enable();
810 myTextFieldParameters->disable();
811 myButtonEditParameters->disable();
819 return myInspectorFrameParent;
826 const GNEAttributeCarrier* frontAC = myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 0 ? myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().front() :
nullptr;
829 if (myInspectorFrameParent->getViewNet()->getInspectedAttributeCarriers().size() > 1) {
837 myInspectorFrameParent->attributeUpdated();
839 refreshParametersEditor();
851 myInspectorFrameParent->attributeUpdated();
853 refreshParametersEditor();
866 const auto& ACs = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers();
874 myTextFieldParameters->setTextColor(FXRGB(0, 0, 0));
875 myTextFieldParameters->killFocus();
877 if (ACs.size() == 1) {
879 myInspectorFrameParent->myViewNet->getUndoList()->begin(frontAC->
getTagProperty().
getGUIIcon(),
"change parameters");
881 frontAC->
setACParameters(myTextFieldParameters->getText().text(), myInspectorFrameParent->myViewNet->getUndoList());
883 myInspectorFrameParent->myViewNet->getUndoList()->end();
884 }
else if (ACs.size() > 0) {
886 myInspectorFrameParent->myViewNet->getUndoList()->begin(frontAC->
getTagProperty().
getGUIIcon(),
"change multiple parameters");
888 for (
const auto& inspectedAC : ACs) {
889 inspectedAC->setACParameters(myTextFieldParameters->getText().text(), myInspectorFrameParent->myViewNet->getUndoList());
892 myInspectorFrameParent->myViewNet->getUndoList()->end();
895 myInspectorFrameParent->attributeUpdated();
897 myTextFieldParameters->setTextColor(FXRGB(255, 0, 0));
909 myInspectorFrameParent(inspectorFrameParent) {
921 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
923 const GNEAttributeCarrier* AC = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front();
927 myOpenAdditionalDialog->setText(
TL(
"Open rerouter dialog"));
933 myOpenAdditionalDialog->setText(
TL(
"Open calibrator dialog"));
939 myOpenAdditionalDialog->setText(
TL(
"Open calibrator lane dialog"));
945 myOpenAdditionalDialog->setText(
TL(
"Open VSS dialog"));
967 if (myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().size() == 1) {
969 GNEAttributeCarrier* AC = myInspectorFrameParent->myAttributesEditor->getFrameParent()->getViewNet()->getInspectedAttributeCarriers().front();
990 GNEFrame(viewParent, viewNet,
"Inspector"),
1056 if (AC->isAttributeCarrierSelected()) {
1059 AC->selectAttributeCarrier();
1091 if (AC->isAttributeCarrierSelected()) {
1094 AC->selectAttributeCarrier();
1126 if (AC->isAttributeCarrierSelected()) {
1129 AC->selectAttributeCarrier();
1155 std::vector<GNEAttributeCarrier*> itemsToInspect;
1156 if (AC !=
nullptr) {
1162 for (
const auto& selectedAC : selectedACs) {
1165 itemsToInspect.push_back(selectedAC);
1169 itemsToInspect.push_back(AC);
1193 if (ACs.size() > 0) {
1195 std::string headerString;
1196 if (ACs.front()->getTagProperty().isNetworkElement()) {
1197 headerString =
"Net: ";
1198 }
else if (ACs.front()->getTagProperty().isAdditionalElement()) {
1199 headerString =
"Additional: ";
1200 }
else if (ACs.front()->getTagProperty().isShapeElement()) {
1201 headerString =
"Shape: ";
1202 }
else if (ACs.front()->getTagProperty().isTAZElement()) {
1203 headerString =
"TAZ: ";
1204 }
else if (ACs.front()->getTagProperty().isWireElement()) {
1205 headerString =
"WIRE: ";
1206 }
else if (ACs.front()->getTagProperty().isVehicle()) {
1207 headerString =
"Vehicle: ";
1208 }
else if (ACs.front()->getTagProperty().isRoute()) {
1209 headerString =
"Route: ";
1210 }
else if (ACs.front()->getTagProperty().isPerson()) {
1211 headerString =
"Person: ";
1212 }
else if (ACs.front()->getTagProperty().isPersonPlan()) {
1213 headerString =
"PersonPlan: ";
1214 }
else if (ACs.front()->getTagProperty().isStop()) {
1215 headerString =
"Stop: ";
1216 }
else if (ACs.front()->getTagProperty().isDataElement()) {
1217 headerString =
"Data: ";
1219 if (ACs.size() > 1) {
1220 headerString +=
toString(ACs.size()) +
" ";
1222 headerString += ACs.front()->getTagStr();
1223 if (ACs.size() > 1) {
1224 headerString +=
"s";
1248 if (ACs.size() == 1) {
FXDEFMAP(GNEInspectorFrame) GNEInspectorFrameMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_OPEN_PARAMETERS_DIALOG
open parameters dialog
@ MID_GNE_INSPECTORFRAME_GOBACK
go back to the previous element
@ MID_OPEN_ADDITIONAL_DIALOG
open additional dialog (used in netedit)
@ MID_HOTKEY_SHIFT_F2_TEMPLATE_COPY
copy template
@ MID_GNE_MARKFRONTELEMENT
mark item as front element
@ MID_HOTKEY_SHIFT_F1_TEMPLATE_SET
set template
@ MID_HOTKEY_SHIFT_F3_TEMPLATE_CLEAR
clear template
#define GUIDesignMFXCheckableButton
checkable button extended over frame
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame
#define GUIDesignDialogBox
#define GUIDesignButtonRectangular
little button rectangula used in frames (For example, in "help" buttons)
#define GUIDesignButtonIconRectangular
button only with icon
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignButtonOK
#define GUIDesignLabelCenterThick
label extended over frame with thick and with text justify to center
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignHorizontalSeparator
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
@ SUMO_TAG_REROUTER
A rerouter.
@ GNE_TAG_CALIBRATOR_LANE
A calibrator placed over lane.
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_VSS
A variable speed sign.
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ GNE_ATTR_PARENT
parent of an additional element
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ GNE_ATTR_CLOSE_SHAPE
Close shape of a polygon (Used by GNEPolys)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void setACParameters(const std::string ¶meters, GNEUndoList *undoList)
set parameters (string)
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
GNENet * getNet() const
get pointer to net
virtual std::string getAttribute(SumoXMLAttr key) const =0
Dialog for edit calibrators.
void show()
show delete frame
A road/street connecting two junctions (netedit-version)
void hideHierarchicalElementTree()
hide GNEElementTree
void refreshHierarchicalElementTree()
refresh GNEElementTree
void showHierarchicalElementTree(GNEAttributeCarrier *AC)
show GNEElementTree
void refreshAttributeEditor(bool forceRefreshShape, bool forceRefreshPosition)
refresh attribute editor (only the valid values will be refresh)
void showAttributeEditorModule(bool includeExtended, bool forceAttributeEnabled)
show attributes of multiple ACs
GNEFrame * getFrameParent() const
pointer to GNEFrame parent
void hideAttributesEditorModule()
hide attribute editor
static bool isSupermodeValid(const GNEViewNet *viewNet, const GNEAttributeCarrier *AC)
return true if AC can be edited in the current supermode
void setFrameWidth(const int newWidth)
set width of GNEFrame
void focusUpperElement()
focus upper element of frame
GNEViewNet * getViewNet() const
get view net
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
GNEViewNet * myViewNet
FOX need this.
virtual void show()
show Frame
virtual void hide()
hide Frame
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
FXButton * myOpenAdditionalDialog
button for open additional dialog
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
void hideAdditionalDialog()
hide netedit attributes editor
AdditionalDialog(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
~AdditionalDialog()
destructor
void showAdditionalDialog()
show netedit attributes editor
FXCheckButton * myUseGEOCheckButton
checkBox for use GEO
long onCmdGEOAttributeHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
FXButton * myHelpButton
button for help
void showGEOAttributesEditor()
show GEO attributes editor
FXTextField * myGEOAttributeTextField
textField for GEOAttribute
FXLabel * myUseGEOLabel
Label for use GEO.
FXHorizontalFrame * myUseGEOFrame
horizontal frame for use GEO
GEOAttributesEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
long onCmdSetGEOAttribute(FXObject *, FXSelector, void *)
Called when user change the current GEO Attribute.
FXLabel * myGEOAttributeLabel
Label for GEOAttribute.
~GEOAttributesEditor()
destructor
void refreshGEOAttributesEditor(bool forceRefresh)
refresh GEO attributes editor
void hideGEOAttributesEditor()
hide GEO attributes editor
FXHorizontalFrame * myGEOAttributeFrame
horizontal frame for GEOAttribute
bool isSelectingParent() const
check if we're selecting a new parent
long onCmdNeteditAttributeHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
long onCmdSetNeteditAttribute(FXObject *, FXSelector, void *)
long onCmdMarkFrontElement(FXObject *, FXSelector, void *)
Called when user press button "Mark front element".
void refreshNeteditAttributesEditor(bool forceRefresh)
refresh netedit attributes
void setNewParent(GNEAttributeCarrier *clickedAC)
set new parent
void hideNeteditAttributesEditor()
hide netedit attributes editor
void stopSelectParent()
stop select new parent
void showNeteditAttributesEditor()
show netedit attributes editor
~NeteditAttributesEditor()
destructor
FXButton * myButtonEditParameters
button for edit parameters using specific dialog
long onCmdEditParameters(FXObject *, FXSelector, void *)
void showParametersEditor()
show netedit attributes EditorInspector
~ParametersEditor()
destructor
long onCmdSetParameters(FXObject *, FXSelector, void *)
Called when user udpate the parameter text field.
FXTextField * myTextFieldParameters
text field for write parameters
GNEInspectorFrame * getInspectorFrameParent() const
get inspector frame parent
void refreshParametersEditor()
refresh netedit attributes
ParametersEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
void hideParametersEditor()
hide netedit attributes EditorInspector
void updateButtons()
FOX need this.
void hideTemplateEditor()
hide template editor
void clearTemplate()
clear template (used by shortcut)
void setEdgeTemplate(const GNEEdge *edge)
set edge template
~TemplateEditor()
destructor
FXButton * myClearTemplateButton
clear template button
FXButton * mySetTemplateButton
set template button
long onCmdCopyTemplate(FXObject *, FXSelector, void *)
copy edge attributes from edge template
void setTemplate()
set template (used by shortcut)
TemplateEditor(GNEInspectorFrame *inspectorFrameParent)
FOX-declaration.
FXButton * myCopyTemplateButton
copy template button
long onCmdSetTemplate(FXObject *, FXSelector, void *)
GNEEdgeTemplate * getEdgeTemplate() const
get edge template (to copy attributes from)
void copyTemplate()
copy template (used by shortcut)
void updateEdgeTemplate()
update edge template
void showTemplateEditor()
show template editor
long onCmdClearTemplate(FXObject *, FXSelector, void *)
clear current edge template
NeteditAttributesEditor * myNeteditAttributesEditor
Netedit Attributes editor.
GNEAttributeCarrier * myPreviousElementDelete
pointer to previous element called by Delete Frame
GNEFrameAttributeModules::AttributesEditor * getAttributesEditor() const
get AttributesEditor
void inspectChild(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement)
inspect child of already inspected element
void inspectSingleElement(GNEAttributeCarrier *AC)
Inspect a single element.
GNEFrameAttributeModules::AttributesEditor * myAttributesEditor
Attribute editor.
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog (can be reimplemented in frame children)
TemplateEditor * getTemplateEditor() const
get template editor
GNEInspectorFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
GNEElementTree * getHierarchicalElementTree() const
get GNEElementTree modul
void clearInspectedAC()
Clear all current inspected ACs.
long onCmdGoBack(FXObject *, FXSelector, void *)
called when user toggle the go back button
bool processDataSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Data
void show()
show inspector frame
GEOAttributesEditor * myGEOAttributesEditor
GEO Attributes editor.
ParametersEditor * myParametersEditor
Parameters editor inspector.
GNEAttributeCarrier * myPreviousElementInspect
Pointer to previous element called by Inspector Frame.
void attributeUpdated()
function called after set a valid attribute in AttributeEditor
bool myPreviousElementDeleteWasMarked
flag to ckec if myPreviousElementDelete was marked in Delete Frame
void inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
FOX need this.
GNEOverlappedInspection * myOverlappedInspection
Overlapped Inspection.
GNEOverlappedInspection * getOverlappedInspection() const
get GNEOverlappedInspection modul
AdditionalDialog * myAdditionalDialog
Additional dialog.
void hide()
hide inspector frame
void inspectFromDeleteFrame(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement, bool previousElementWasMarked)
inspect called from DeleteFrame
GNEInspectorFrame::NeteditAttributesEditor * getNeteditAttributesEditor() const
get Netedit Attributes editor
FXButton * myBackButton
Back Button.
GNEElementTree * myHierarchicalElementTree
Attribute Carrier Hierarchy.
bool processNetworkSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Network
void inspectMultisection(const std::vector< GNEAttributeCarrier * > &ACs)
Inspect the given multi-selection.
~GNEInspectorFrame()
Destructor.
TemplateEditor * myTemplateEditor
Template editor.
bool processDemandSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Demand
void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Dialog for edit parameters.
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(const bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
void hideOverlappedInspection()
hide template editor
bool nextElement(const Position &clickedPosition)
try to go to next element if clicked position is near to saved position
bool previousElement(const Position &clickedPosition)
try to go to previous element if clicked position is near to saved position
void showOverlappedInspection(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
show template editor
Dialog for edit rerouters.
Dialog for edit parameters.
GUIIcon getGUIIcon() const
get GUI icon associated to this Tag
bool hasParameters() const
return true if Tag correspond to an element that supports parameters "key1=value1|key2=value2|....
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
class used to group all variables related with objects under cursor after a click over view
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
GNENet * getNet() const
get the net object
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed module
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
GNEViewParent * getViewParent() const
get the net object
const std::vector< GNEAttributeCarrier * > & getInspectedAttributeCarriers() const
get inspected attribute carriers
void updateViewNet() const
Mark the entire GNEViewNet to be repainted later.
void setInspectedAttributeCarriers(const std::vector< GNEAttributeCarrier * > ACs)
set inspected attributeCarrier
A single child window which contains a view of the simulation area.
GNEDeleteFrame * getDeleteFrame() const
get frame for delete elements
int getFrameAreaWidth() const
get frame area width
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
A point in 2D or 3D with translation and scaling methods.
bool selectEdges() const
check if select edges checkbox is enabled