91 myFrameParent(frameParent) {
93 myPlansComboBox =
new MFXComboBoxIcon(getCollapsableFrame(), frameParent->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
96 const auto net = myFrameParent->getViewNet()->getNet();
99 fillPersonPlanTemplates(net);
101 fillContainerPlanTemplates(net);
106 for (
const auto& planTemplate : myPlanTemplates) {
107 planTemplate.second->resetDefaultValues(
false);
108 myPlansComboBox->appendIconItem(planTemplate.first->getTooltipText().c_str(),
110 planTemplate.second->getTagProperty()->getBackGroundColor());
113 myCurrentPlanTemplate = myPlanTemplates.front();
116 myPlansComboBox->killFocus();
124 delete planTemplate.first;
125 delete planTemplate.second;
239 junction.second->setInvalidCandidate(
true);
243 for (
int i = 0; i < (int)edge.second->getChildLanes().size(); i++) {
244 if (edge.second->getNBEdge()->getLanes().at(i).permissions &
SVC_PEDESTRIAN) {
245 edge.second->getFromJunction()->setPossibleCandidate(
true);
246 edge.second->getToJunction()->setPossibleCandidate(
true);
261 bool allowPedestrian =
false;
262 for (
int i = 0; i < (int)edge.second->getChildLanes().size(); i++) {
263 if (edge.second->getNBEdge()->getLanes().at(i).permissions &
SVC_PEDESTRIAN) {
264 allowPedestrian =
true;
267 if (allowPedestrian) {
268 edge.second->setPossibleCandidate(
true);
270 edge.second->setInvalidCandidate(
true);
282 junction.second->resetCandidateFlags();
291 edge.second->resetCandidateFlags();
FXDEFMAP(GNEPlanSelector) TagSelectorMap[]
@ MID_GNE_TAG_SELECTED
tag selected in ComboBox
#define GUIDesignTextColorRed
red color (for invalid text)
#define GUIDesignComboBox
#define GUIDesignComboBoxVisibleItems
#define GUIDesignTextColorBlack
black color (for correct text)
@ GLO_TRANSHIP
a container tranship
@ GLO_CONTAINER_STOP
a containerStop
@ GLO_PERSONTRIP
a person trip
@ GLO_TRANSPORT
a container transport
@ SVC_PEDESTRIAN
pedestrian
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_PERSONTRIP_EDGE_EDGE
@ GNE_TAG_TRANSHIP_EDGE_EDGE
@ GNE_TAG_STOPCONTAINER_EDGE
@ SUMO_TAG_STOP
stop for vehicles
@ GNE_TAG_TRANSPORT_EDGE_EDGE
@ GNE_TAG_STOPPERSON_EDGE
virtual void tagSelected()
Tag selected in GNETagSelector.
GNEViewNet * getViewNet() const
get view net
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
const std::map< std::string, GNEJunction * > & getJunctions() const
get junctions
A NBNetBuilder extended by visualisation and editing capabilities.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
void updateJunctionColors()
update junction colors
GNEDemandElement * getCurrentPlanTemplate() const
get current plan template
bool markJunctions() const
check if mark junctions with dotted contours
std::pair< GNETagProperties *, GNEDemandElement * > myCurrentPlanTemplate
current plan template;
void showPlanSelector()
show plan selector
void fillPersonPlanTemplates(GNENet *net)
fill person templates
bool markRoutes() const
check if mark routes with dotted contours
void hidePlanSelector()
plan item selector
void updateEdgeColors()
update edge colors
bool markTAZs() const
check if mark TAZs with dotted contours
~GNEPlanSelector()
destructor
GNEFrame * myFrameParent
pointer to Frame Parent
const GNETagProperties * getCurrentPlanTagProperties() const
get current plan tag properties
void clearEdgeColors()
clear edge colors
bool markStoppingPlaces() const
check if mark stoppingPlaces with dotted contours
std::vector< std::pair< GNETagProperties *, GNEDemandElement * > > myPlanTemplates
list with demand templates
MFXComboBoxIcon * myPlansComboBox
comboBox with the tags
long onCmdSelectPlan(FXObject *, FXSelector, void *)
Called when the user select an element in ComboBox.
bool markEdges() const
check if mark edges with dotted contours
void refreshPlanSelector()
refresh plan selector (used when frameParent is show)
void fillContainerPlanTemplates(GNENet *net)
fill container templates
void clearJunctionColors()
clear junction colors
bool isPlanValid() const
FOX need this.
GNENet * getNet() const
get the net object
void updateViewNet(const bool ignoreViewUpdater=true) const
Mark the entire GNEViewNet to be repainted later.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXString getText() const
Get the text.
void setTextColor(FXColor clr)
Change text color.
FXColor getTextColor() const
Return text color.
MFXGroupBoxModule (based on FXGroupBox)