83 myAdditionalFrameParent(additionalFrameParent) {
88 myStopSelectingButton->disable();
89 myAbortSelectingButton->disable();
99 abortConsecutiveLaneSelector();
101 FXGroupBoxModule::show();
108 abortConsecutiveLaneSelector();
110 FXGroupBoxModule::hide();
119 myStopSelectingButton->enable();
120 myAbortSelectingButton->enable();
122 addSelectedLane(lane, clickedPosition);
130 const auto& tagProperties = myAdditionalFrameParent->myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
132 if (mySelectedLanes.size() < 2) {
133 WRITE_WARNING(myAdditionalFrameParent->myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty().getTagStr() +
" requires at least two lanes.");
135 abortConsecutiveLaneSelector();
139 if (!myAdditionalFrameParent->createBaseAdditionalObject(tagProperties)) {
143 myAdditionalFrameParent->myAdditionalAttributes->getAttributesAndValues(myAdditionalFrameParent->myBaseAdditional,
true);
145 myAdditionalFrameParent->myNeteditAttributes->getNeteditAttributesAndValues(myAdditionalFrameParent->myBaseAdditional,
nullptr);
147 if (!myAdditionalFrameParent->myBaseAdditional->hasStringAttribute(
SUMO_ATTR_ID)) {
148 myAdditionalFrameParent->myBaseAdditional->addStringAttribute(
SUMO_ATTR_ID, myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->generateAdditionalID(tagProperties.getTag()));
151 std::vector<std::string> laneIDs;
152 for (
const auto& selectedlane : mySelectedLanes) {
153 laneIDs.push_back(selectedlane.first->getID());
155 myAdditionalFrameParent->myBaseAdditional->addStringListAttribute(
SUMO_ATTR_LANES, laneIDs);
157 myAdditionalFrameParent->myBaseAdditional->addDoubleAttribute(
SUMO_ATTR_POSITION, mySelectedLanes.front().second);
159 myAdditionalFrameParent->myBaseAdditional->addDoubleAttribute(
SUMO_ATTR_ENDPOS, mySelectedLanes.back().second);
161 if (!myAdditionalFrameParent->buildAdditionalCommonAttributes(tagProperties)) {
165 if (myAdditionalFrameParent->myAdditionalAttributes->areValuesValid() ==
false) {
166 myAdditionalFrameParent->myAdditionalAttributes->showWarningMessage();
174 abortConsecutiveLaneSelector();
176 myAdditionalFrameParent->myAdditionalAttributes->refreshAttributesCreator();
185 for (
const auto& lane : myCandidateLanes) {
186 lane->resetCandidateFlags();
189 myCandidateLanes.clear();
191 for (
const auto& lane : mySelectedLanes) {
192 lane.first->resetCandidateFlags();
195 mySelectedLanes.clear();
197 myStopSelectingButton->disable();
198 myAbortSelectingButton->disable();
200 myAdditionalFrameParent->getViewNet()->updateViewNet();
207 if (lane ==
nullptr) {
211 for (
auto i : mySelectedLanes) {
212 if (i.first == lane) {
218 if (mySelectedLanes.size() > 0) {
219 if (myCandidateLanes.empty()) {
222 }
else if ((myCandidateLanes.size() > 0) && (std::find(myCandidateLanes.begin(), myCandidateLanes.end(), lane) == myCandidateLanes.end())) {
232 for (
const auto& candidateLane : myCandidateLanes) {
233 candidateLane->setPossibleCandidate(
false);
236 myCandidateLanes.clear();
240 if ((lane == connection->getLaneFrom()) && (!isLaneSelected(connection->getLaneTo()))) {
242 connection->getLaneTo()->setPossibleCandidate(
true);
243 myCandidateLanes.push_back(connection->getLaneTo());
247 myAdditionalFrameParent->getViewNet()->updateViewNet();
254 if (mySelectedLanes.size() > 1) {
255 mySelectedLanes.pop_back();
264 return myStopSelectingButton->isEnabled();
274 const std::vector<std::pair<GNELane*, double> >&
276 return mySelectedLanes;
282 stopConsecutiveLaneSelector();
289 abortConsecutiveLaneSelector();
296 for (
auto i : mySelectedLanes) {
297 if (i.first == lane) {
310 myAdditionalFrameParent(additionalFrameParent) {
337 std::vector<std::string>
339 std::vector<std::string> vectorOfIds;
340 if (myUseSelectedEdgesCheckButton->getCheck()) {
342 const auto selectedEdges = myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getSelectedEdges();
344 for (
const auto& edge : selectedEdges) {
345 vectorOfIds.push_back(edge->getID());
349 for (
int i = 0; i < myList->getNumItems(); i++) {
350 if (myList->isItemSelected(i)) {
351 vectorOfIds.push_back(myList->getItem(i)->getText().text());
362 myList->clearItems();
364 for (
const auto& edge : myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
366 if (edge.second->getID().find(search) != std::string::npos) {
367 myList->appendItem(edge.second->getID().c_str());
371 myUseSelectedEdgesCheckButton->setCheck(
false);
383 FXGroupBoxModule::hide();
390 if (myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getNumberOfSelectedEdges() > 0) {
391 myUseSelectedEdgesCheckButton->enable();
393 myUseSelectedEdgesCheckButton->disable();
400 if (myUseSelectedEdgesCheckButton->getCheck()) {
401 myEdgesSearch->hide();
403 myClearEdgesSelection->hide();
404 myInvertEdgesSelection->hide();
406 myEdgesSearch->show();
408 myClearEdgesSelection->show();
409 myInvertEdgesSelection->show();
422 showSelectorChildEdgesModule(myEdgesSearch->getText().text());
435 for (
int i = 0; i < myList->getNumItems(); i++) {
436 if (myList->getItem(i)->isSelected()) {
437 myList->deselectItem(i);
446 for (
int i = 0; i < myList->getNumItems(); i++) {
447 if (myList->getItem(i)->isSelected()) {
448 myList->deselectItem(i);
450 myList->selectItem(i);
462 myAdditionalFrameParent(additionalFrameParent) {
489 std::vector<std::string>
491 std::vector<std::string> vectorOfIds;
492 if (myUseSelectedLanesCheckButton->getCheck()) {
494 const auto selectedLanes = myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getSelectedLanes();
496 for (
const auto& lane : selectedLanes) {
497 vectorOfIds.push_back(lane->getID());
501 for (
int i = 0; i < myList->getNumItems(); i++) {
502 if (myList->isItemSelected(i)) {
503 vectorOfIds.push_back(myList->getItem(i)->getText().text());
513 myList->clearItems();
515 for (
const auto& lane : myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getLanes()) {
516 if (lane->getID().find(search) != std::string::npos) {
517 myList->appendItem(lane->getID().c_str());
521 myUseSelectedLanesCheckButton->setCheck(
false);
529 FXGroupBoxModule::hide();
536 if (myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getNumberOfSelectedLanes() > 0) {
537 myUseSelectedLanesCheckButton->enable();
539 myUseSelectedLanesCheckButton->disable();
546 if (myUseSelectedLanesCheckButton->getCheck()) {
547 myLanesSearch->hide();
549 clearLanesSelection->hide();
550 invertLanesSelection->hide();
552 myLanesSearch->show();
554 clearLanesSelection->show();
555 invertLanesSelection->show();
581 for (
int i = 0; i < myList->getNumItems(); i++) {
582 if (myList->getItem(i)->isSelected()) {
583 myList->deselectItem(i);
592 for (
int i = 0; i < myList->getNumItems(); i++) {
593 if (myList->getItem(i)->isSelected()) {
594 myList->deselectItem(i);
596 myList->selectItem(i);
608 myAdditionalFrameParent(additionalFrameParent) {
625 "BACKSPACE: undo click",
638 myFinishCreationButton->disable();
639 myAbortCreationButton->disable();
640 myRemoveLastInsertedElement->disable();
662 if (lane ==
nullptr) {
666 if ((myLanePath.size() > 0) && (myLanePath.back().first == lane)) {
682 const Position mousePos = myAdditionalFrameParent->getViewNet()->snapToActiveGrid(myAdditionalFrameParent->getViewNet()->getPositionInformation());
686 myLanePath.push_back(std::make_pair(lane, offset));
688 myAbortCreationButton->enable();
690 myFinishCreationButton->enable();
692 myAdditionalFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->disableUndoRedo(
"route creation");
694 if (myLanePath.size() > 1) {
695 myRemoveLastInsertedElement->enable();
697 myRemoveLastInsertedElement->disable();
700 updateInfoRouteLabel();
709 return (myShowCandidateLanes->getCheck() == TRUE);
716 for (
const auto& edge : myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
717 for (
const auto& lane : edge.second->getLanes()) {
718 lane->resetCandidateFlags();
722 if (myLanePath.size() > 0 && (myShowCandidateLanes->getCheck() == TRUE)) {
724 for (
const auto& edge : myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
725 for (
const auto& lane : edge.second->getLanes()) {
726 lane->setConflictedCandidate(
true);
730 for (
const auto& lane : myLanePath) {
732 lane.first->setConflictedCandidate(
false);
733 if (lane == myLanePath.back()) {
734 lane.first->setSourceCandidate(
true);
736 lane.first->setTargetCandidate(
true);
740 const GNEEdge* edge = myLanePath.back().first->getParentEdge();
744 if (connection->getLaneFrom() == myLanePath.back().first) {
746 connection->getLaneTo()->setPossibleCandidate(
true);
751 myAdditionalFrameParent->getViewNet()->updateViewNet();
757 if (myLanePath.size() > 0) {
759 const bool drawExtremeSymbols = myAdditionalFrameParent->getViewNet()->getEditModes().isCurrentSupermodeNetwork() &&
762 const double lineWidth = 0.35;
763 const double lineWidthin = 0.25;
771 for (
int i = 0; i < (int)myLanePath.size(); i++) {
773 const GNELane* lane = myLanePath.at(i).first;
777 if ((i + 1) < (
int)myLanePath.size()) {
779 const GNELane* nextLane = myLanePath.at(i + 1).first;
788 glTranslated(0, 0, 0.1);
792 for (
int i = 0; i < (int)myLanePath.size(); i++) {
794 const GNELane* lane = myLanePath.at(i).first;
798 if ((i + 1) < (
int)myLanePath.size()) {
800 const GNELane* nextLane = myLanePath.at(i + 1).first;
812 const Position firstPosition = myLanePath.front().first->getLaneShape().positionAtOffset2D(myLanePath.front().second);
813 const Position secondPosition = myLanePath.back().first->getLaneShape().positionAtOffset2D(myLanePath.back().second);
817 myAdditionalFrameParent->getViewNet()->getNetworkViewOptions().editingElevation(), drawExtremeSymbols);
827 const auto& tagProperties = myAdditionalFrameParent->myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
833 if (myLanePath.size() < 2) {
834 WRITE_WARNING(
"E2 multilane detectors need at least two consecutive lanes");
838 if (!myAdditionalFrameParent->createBaseAdditionalObject(tagProperties)) {
842 myAdditionalFrameParent->myAdditionalAttributes->getAttributesAndValues(myAdditionalFrameParent->myBaseAdditional,
true);
844 if (!myAdditionalFrameParent->myNeteditAttributes->getNeteditAttributesAndValues(myAdditionalFrameParent->myBaseAdditional,
nullptr)) {
848 if (!myAdditionalFrameParent->myBaseAdditional->hasStringAttribute(
SUMO_ATTR_ID)) {
849 myAdditionalFrameParent->myBaseAdditional->addStringAttribute(
SUMO_ATTR_ID, myAdditionalFrameParent->myViewNet->getNet()->getAttributeCarriers()->generateAdditionalID(
GNE_TAG_E2DETECTOR_MULTILANE));
852 std::vector<std::string> laneIDs;
853 for (
const auto& lane : myLanePath) {
854 laneIDs.push_back(lane.first->getID());
856 myAdditionalFrameParent->myBaseAdditional->addStringListAttribute(
SUMO_ATTR_LANES, laneIDs);
858 myAdditionalFrameParent->myBaseAdditional->addDoubleAttribute(
SUMO_ATTR_POSITION, myLanePath.front().second);
859 myAdditionalFrameParent->myBaseAdditional->addDoubleAttribute(
SUMO_ATTR_ENDPOS, myLanePath.back().second);
861 if (!myAdditionalFrameParent->buildAdditionalCommonAttributes(myAdditionalFrameParent->myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty())) {
865 if (myAdditionalFrameParent->myAdditionalAttributes->areValuesValid() ==
false) {
866 myAdditionalFrameParent->myAdditionalAttributes->showWarningMessage();
874 myAdditionalFrameParent->mySelectorAdditionalParent->refreshSelectorParentModule();
878 myAdditionalFrameParent->myAdditionalAttributes->refreshAttributesCreator();
886 if (myLanePath.size() > 0) {
888 myAdditionalFrameParent->getViewNet()->getViewParent()->getGNEAppWindows()->enableUndoRedo();
892 myFinishCreationButton->disable();
893 myAbortCreationButton->disable();
894 myRemoveLastInsertedElement->disable();
896 updateInfoRouteLabel();
900 myAdditionalFrameParent->getViewNet()->updateViewNet();
907 if (myLanePath.size() > 1) {
909 myLanePath.back().first->resetCandidateFlags();
911 myLanePath.pop_back();
913 if ((myLanePath.size() > 0) && myLanePath.back().first->isSourceCandidate()) {
914 myLanePath.back().first->setSourceCandidate(
false);
915 myLanePath.back().first->setTargetCandidate(
true);
918 if (myLanePath.size() > 1) {
919 myRemoveLastInsertedElement->enable();
921 myRemoveLastInsertedElement->disable();
924 updateInfoRouteLabel();
928 myAdditionalFrameParent->getViewNet()->updateViewNet();
969 if (myLanePath.size() > 0) {
972 for (
const auto& lane : myLanePath) {
973 length += lane.first->getParentEdge()->getNBEdge()->getLength();
976 std::ostringstream information;
978 <<
"- Selected lanes: " <<
toString(myLanePath.size()) <<
"\n"
979 <<
"- Length: " <<
toString(length);
981 myInfoRouteLabel->setText(information.str().c_str());
983 myInfoRouteLabel->setText(
"No lanes selected");
991 for (
const auto& edge : myAdditionalFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
992 for (
const auto& lane : edge.second->getLanes()) {
993 lane->resetCandidateFlags();
999 updateInfoRouteLabel();
1007 GNEFrame(horizontalFrameParent, viewNet,
"Additionals"),
1305 if (lane !=
nullptr) {
1353 WRITE_WARNING(
"Currently unsuported. Create rerouter elements using rerouter dialog");
1358 WRITE_WARNING(
"Currently unsuported. Create VSS steps elements using VSS dialog");
1383 for (
const auto& additionalChild : VSSParent->getChildAdditionals()) {
1384 if (!additionalChild->getTagProperty().isSymbol()) {
1385 step = additionalChild;
FXDEFMAP(GNEAdditionalFrame::SelectorParentLanes) ConsecutiveLaneSelectorMap[]
@ NETWORK_MOVE
mode for moving network elements
@ MID_GNE_ADDITIONALFRAME_CLEARSELECTION
clear selection of elements
@ MID_GNE_LANEPATH_ABORT
abort lane path creation
@ MID_GNE_ADDITIONALFRAME_STOPSELECTION
stop selection of consecutive egdes/lanes
@ MID_GNE_ADDITIONALFRAME_USESELECTED
use selected elements
@ MID_GNE_LANEPATH_FINISH
finish lane path creation
@ MID_GNE_ADDITIONALFRAME_INVERTSELECTION
invert selection of eleents
@ MID_GNE_ADDITIONALFRAME_ABORTSELECTION
abort selection of consecutive egdes/lanes
@ MID_GNE_LANEPATH_REMOVELAST
remove last inserted element in path
@ MID_GNE_ADDITIONALFRAME_SELECT
select element
@ MID_GNE_ADDITIONALFRAME_SEARCH
search element
@ MID_GNE_LANEPATH_SHOWCANDIDATES
enable or disable show path candidates
#define GUIDesignListFixedHeight
design for FXLists with height fixed
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignButtonRectangular
little button rectangula used in frames (For example, in "help" buttons)
#define GUIDesignLabelFrameThicked
label extended over frame without thick and with text justify to left, used to show information in fr...
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
@ GLO_TEMPORALSHAPE
temporal shape (used in NETEDIT)
#define WRITE_WARNING(msg)
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_E2DETECTOR
an e2 detector
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_BUS_STOP
A bus stop.
@ GNE_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator
@ SUMO_TAG_STEP
trigger: a step description
@ SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ GNE_TAG_E2DETECTOR_MULTILANE
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destiny of a reroute
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
@ 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
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_TIME
trigger: the time of the step
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
bool hasStringAttribute(const SumoXMLAttr attr) const
has function
void setTag(const SumoXMLTag tag)
set SumoBaseObject tag
SumoBaseObject * getParentSumoBaseObject() const
get pointer to mySumoBaseObjectParent SumoBaseObject (if is null, then is the root)
SumoXMLTag getTag() const
void addTimeAttribute(const SumoXMLAttr attr, const SUMOTime value)
add time attribute into current SumoBaseObject node
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
void addPositionAttribute(const SumoXMLAttr attr, const Position &value)
add Position attribute into current SumoBaseObject node
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
double getDoubleAttribute(const SumoXMLAttr attr) const
get double attribute
const std::vector< std::string > & getStringListAttribute(const SumoXMLAttr attr) const
get string list attribute
bool hasStringListAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given string list attribute
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
FXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toogled)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
static void pushMatrix()
push matrix
bool drawCandidateLanesWithSpecialColor() const
draw candidate lanes with special color (Only for candidates, special and conflicted)
long onCmdCreatePath(FXObject *, FXSelector, void *)
bool addLane(GNELane *lane)
add lane
void updateLaneColors()
update lane colors
E2MultilaneLaneSelector(GNEAdditionalFrame *additionalFrameParent)
FOX-declaration.
void abortPathCreation()
abort path creation
long onCmdRemoveLastElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove las inserted lane".
void removeLastElement()
remove path element
void drawTemporalE2Multilane(const GUIVisualizationSettings &s) const
draw temporal E2Multilane
FXButton * myRemoveLastInsertedElement
button for removing last inserted element
FXLabel * myInfoRouteLabel
label with route info
void showE2MultilaneLaneSelectorModule()
show E2MultilaneLaneSelector
FXButton * myFinishCreationButton
button for finish route creation
void clearPath()
clear lanes (and restore colors)
void hideE2MultilaneLaneSelectorModule()
show E2MultilaneLaneSelector
FXButton * myAbortCreationButton
button for abort route creation
long onCmdShowCandidateLanes(FXObject *, FXSelector, void *)
Called when the user click over check button "show candidate lanes".
FXCheckButton * myShowCandidateLanes
CheckBox for show candidate lanes.
~E2MultilaneLaneSelector()
destructor
long onCmdAbortPathCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Abort route creation".
void updateInfoRouteLabel()
fox need this
bool createPath()
create path
std::vector< std::string > getEdgeIdsSelected() const
get list of selecte id's in string format
~SelectorChildEdges()
destructor
long onCmdTypeInSearchBox(FXObject *, FXSelector, void *)
called when user type in search box
long onCmdSelectEdge(FXObject *, FXSelector, void *)
called when user select a edge of the list
FXButton * myClearEdgesSelection
button for clear selection
FXButton * myInvertEdgesSelection
button for invert selection
void updateUseSelectedEdges()
Update use selectedEdges.
FXCheckButton * myUseSelectedEdgesCheckButton
CheckBox for selected edges.
void showSelectorChildEdgesModule(std::string search="")
Show SelectorChildEdges Module.
void hideSelectorChildEdgesModule()
hide SelectorChildEdges Module
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
FXList * myList
List of SelectorChildEdges.
FXTextField * myEdgesSearch
text field for search edge IDs
SelectorChildEdges(GNEAdditionalFrame *additionalFrameParent)
FOX-declaration.
long onCmdUseSelectedEdges(FXObject *, FXSelector, void *)
FXList * myList
List of SelectorChildLanes.
void hideSelectorChildLanesModule()
hide SelectorChildLanes Module
~SelectorChildLanes()
destructor
void showSelectorChildLanesModule(std::string search="")
Show list of SelectorChildLanes Module.
long onCmdUseSelectedLanes(FXObject *, FXSelector, void *)
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
FXTextField * myLanesSearch
text field for search lane IDs
long onCmdTypeInSearchBox(FXObject *, FXSelector, void *)
called when user type in search box
void updateUseSelectedLanes()
std::vector< std::string > getLaneIdsSelected() const
get list of selecte lane ids in string format
FXButton * clearLanesSelection
button for clear selection
SelectorChildLanes(GNEAdditionalFrame *additionalFrameParent)
FOX-declaration.
long onCmdInvertSelection(FXObject *, FXSelector, void *)
called when invert selection button is pressed
long onCmdSelectLane(FXObject *, FXSelector, void *)
called when user select a lane of the list
FXButton * invertLanesSelection
button for invert selection
FXCheckButton * myUseSelectedLanesCheckButton
CheckBox for selected lanes.
bool isSelectingLanes() const
return true if modul is selecting lane
~SelectorParentLanes()
destructor
const std::vector< std::pair< GNELane *, double > > & getSelectedLanes() const
get current selected lanes
bool isShown() const
return true if modul is shown
bool isLaneSelected(GNELane *lane) const
check if certain lane is selected
void showSelectorParentLanesModule()
show SelectorParentLanes modul
long onCmdStopSelection(FXObject *, FXSelector, void *)
bool stopConsecutiveLaneSelector()
stop selection of consecutive lanes
void removeLastSelectedLane()
remove last added point
void hideSelectorParentLanesModule()
hide SelectorParentLanes
long onCmdAbortSelection(FXObject *, FXSelector, void *)
Called when the user press abort selection button.
void startConsecutiveLaneSelector(GNELane *lane, const Position &clickedPosition)
start selection of consecutive lanes
bool addSelectedLane(GNELane *lane, const Position &clickedPosition)
return true if lane can be selected as consecutive lane
void abortConsecutiveLaneSelector()
abort selection of consecutive lanes
GNEFrameModules::TagSelector * myAdditionalTagSelector
item selector
SelectorChildEdges * mySelectorChildEdges
Module for select child edges.
GNEAdditionalFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
bool buildAdditionalOverLane(GNELane *lane, const GNETagProperties &tagValues)
build additional over a single lane
SelectorChildLanes * mySelectorChildLanes
Module for select child lanes.
GNEAdditionalFrame::SelectorParentLanes * getConsecutiveLaneSelector() const
get consecutive Lane Selector
SelectorParentLanes * mySelectorLaneParents
Module for select parent lanes (currently only consecutives)
void tagSelected()
Tag selected in TagSelector.
bool buildAdditionalOverView(const GNETagProperties &tagValues)
build additional over view
GNEFrameModules::SelectorParent * mySelectorAdditionalParent
Module for select a single parent additional.
bool buildAdditionalCommonAttributes(const GNETagProperties &tagValues)
build common additional attributes
void showSelectorChildLanesModule()
show selector child lane and update use selected edges/lanes
E2MultilaneLaneSelector * myE2MultilaneLaneSelector
Module for E2Multilane lane selector.
~GNEAdditionalFrame()
Destructor.
GNEFrameAttributeModules::NeteditAttributes * myNeteditAttributes
Netedit parameter.
GNEAdditionalFrame::E2MultilaneLaneSelector * getE2MultilaneLaneSelector() const
getConsecutive Lane Selector
CommonXMLStructure::SumoBaseObject * myBaseAdditional
SumoBaseObject used for create additional.
bool addAdditional(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add additional element
bool createBaseAdditionalObject(const GNETagProperties &tagProperty)
bool buildAdditionalOverEdge(GNELane *lane, const GNETagProperties &tagValues)
build additional over an edge (parent of lane)
GNEFrameAttributeModules::AttributesCreator * myAdditionalAttributes
internal additional attributes
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
virtual std::string getAttribute(SumoXMLAttr key) const =0
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
bool isSpecialCandidate() const
check if this element is a special candidate
void setTargetCandidate(const bool value)
set element as target candidate
bool isPossibleCandidate() const
check if this element is a possible candidate
bool isConflictedCandidate() const
check if this element is a conflicted candidate
void setConflictedCandidate(const bool value)
set element as conflicted candidate
A road/street connecting two junctions (netedit-version)
const std::vector< GNEConnection * > & getGNEConnections() const
returns a reference to the GNEConnection vector
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
bool areValuesValid() const
check if parameters of attributes are valid
void refreshAttributesCreator()
refresh attribute creator
void showAttributesCreatorModule(GNEAttributeCarrier *templateAC, const std::vector< SumoXMLAttr > &hiddenAttributes)
show AttributesCreator modul
void getAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, bool includeAll) const
get attributes and their values
void hideAttributesCreatorModule()
hide group box
void hideNeteditAttributesModule()
hide Netedit attributes modul
bool getNeteditAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, const GNELane *lane) const
fill valuesMap with netedit attributes
void showNeteditAttributesModule(const GNETagProperties &tagValue)
show Netedit attributes modul
GNEViewNet * myViewNet
View Net.
virtual void createPath()
create path (can be reimplemented in frame children)
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
virtual void show()
show Frame
virtual void hide()
hide Frame
void setIDSelected(const std::string &id)
select manually a element of the list
std::string getIdSelected() const
get currently parent additional selected
void refreshSelectorParentModule()
Refresh list of Additional Parents Module.
void hideSelectorParentModule()
hide SelectorParent Module
bool showSelectorParentModule(const std::vector< SumoXMLTag > &additionalTypeParents)
Show list of SelectorParent Module.
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
bool exist(const GNELane *toLane) const
check if exist a lane2lane geometry for the given tolane
const GUIGeometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getLaneShape() const
get elements shape
const GNELane2laneConnection & getLane2laneConnections() const
get Lane2laneConnection struct
double getLengthGeometryFactor() const
get length geometry factor
GNEEdge * getParentEdge() const
get arent edge
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
const std::string & getID() const
get ID
const std::vector< SumoXMLTag > & getParentTags() const
get parent tags
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
bool isChild() const
return true if tag correspond to an element child of another element (Example: E3->Entry/Exit)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
class used to group all variables related with objects under cursor after a click over view
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
GNEAdditional * getAdditionalFront() const
get front additional element or a pointer to nullptr
GNENet * getNet() const
get the net object
const GNEViewNetHelper::ObjectsUnderCursor & getObjectsUnderCursor() const
get objects under cursor
void setStatusBarText(const std::string &text)
set staturBar text
static void drawGeometryPoints(const GUIVisualizationSettings &s, const Position &mousePos, const PositionVector &shape, const RGBColor &geometryPointColor, const RGBColor &textColor, const double radius, const double exaggeration, const bool editingElevation, const bool drawExtremeSymbols)
draw geometry points
const PositionVector & getShape() const
The shape of the additional element.
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
Stores the information about how to visualize structures.
GUIVisualizationNeteditSizeSettings neteditSizeSettings
netedit size settings
C++ TraCI client API implementation.
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double z() const
Returns the z-position.
double y() const
Returns the y-position.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
static const RGBColor GREY
static const RGBColor ORANGE
RGBColor changedBrightness(int change, int toChange=3) const
Returns a new color with altered brightness.
static const RGBColor RED
named colors
static const double polylineWidth
poly line width