75 myCreateEdgeFrameParent(createEdgeFrameParent),
76 myDefaultEdgeType(new
GNEEdgeType(createEdgeFrameParent)),
79 myCreateDefaultEdgeType =
new FXRadioButton(getCollapsableFrame(),
TL(
"Create default edge"),
82 myCreateDefaultShortEdgeType =
new FXRadioButton(getCollapsableFrame(),
TL(
"Create default edge short"),
85 myNoPedestriansCheckButton =
new FXCheckButton(getCollapsableFrame(),
TL(
"Disallow for pedestrians"),
87 myAddSidewalkCheckButton =
new FXCheckButton(getCollapsableFrame(),
TL(
"Add sidewalk"),
89 myAddBikelaneCheckButton =
new FXCheckButton(getCollapsableFrame(),
TL(
"Add bikelane"),
92 myCreateCustomEdgeType =
new FXRadioButton(getCollapsableFrame(),
TL(
"Use edgeType/template"),
109 myCreateDefaultEdgeType->setCheck(TRUE);
111 for (
const auto& junction : createEdgeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getJunctions()) {
112 if (junction.second->getNBNode()->getCrossings().size() > 0) {
113 enableCheckBoxDisablePedestrians();
129 const int index = myEdgeTypesComboBox->getCurrentItem();
133 if (myCreateDefaultEdgeType->getCheck() || myCreateDefaultShortEdgeType->getCheck()) {
135 myAddSidewalkCheckButton->enable();
136 myAddBikelaneCheckButton->enable();
137 myNoPedestriansCheckButton->enable();
139 myCreateFromTemplate->disable();
141 myEdgeTypesComboBox->disable();
143 myAddEdgeTypeButton->disable();
144 myDeleteEdgeTypeButton->disable();
146 myCreateEdgeFrameParent->myEdgeTypeAttributes->showAttributesCreatorModule(myDefaultEdgeType, {
SUMO_ATTR_ID});
148 myCreateEdgeFrameParent->myLaneTypeSelector->showLaneTypeSelector();
149 }
else if (myCreateCustomEdgeType->getCheck()) {
151 myAddSidewalkCheckButton->disable();
152 myAddBikelaneCheckButton->disable();
153 myNoPedestriansCheckButton->disable();
155 myAddEdgeTypeButton->enable();
156 myDeleteEdgeTypeButton->enable();
158 if (myEdgeTypesComboBox->getNumItems() == 0) {
160 myEdgeTypesComboBox->disable();
161 myDeleteEdgeTypeButton->disable();
163 myCreateEdgeFrameParent->myEdgeTypeAttributes->hideAttributesCreatorModule();
164 myCreateEdgeFrameParent->myLaneTypeSelector->hideLaneTypeSelector();
167 myCreateFromTemplate->enable();
169 myEdgeTypesComboBox->enable();
171 myDeleteEdgeTypeButton->disable();
173 myCreateEdgeFrameParent->myEdgeTypeAttributes->showAttributesCreatorModule(templateEditor->
getEdgeTemplate(), {SUMO_ATTR_ID});
174 myCreateEdgeFrameParent->myEdgeTypeAttributes->disableAttributesCreator();
176 myCreateEdgeFrameParent->myLaneTypeSelector->showLaneTypeSelector();
179 myCreateFromTemplate->disable();
181 myEdgeTypesComboBox->enable();
183 myEdgeTypeSelected = myCreateEdgeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveEdgeType(myEdgeTypesComboBox->getText().text(),
false);
185 if (myEdgeTypeSelected) {
187 myCreateEdgeFrameParent->myEdgeTypeAttributes->showAttributesCreatorModule(myEdgeTypeSelected, {});
189 myCreateEdgeFrameParent->myLaneTypeSelector->showLaneTypeSelector();
192 myCreateEdgeFrameParent->myEdgeTypeAttributes->hideAttributesCreatorModule();
194 myCreateEdgeFrameParent->myLaneTypeSelector->hideLaneTypeSelector();
196 myEdgeTypesComboBox->setTextColor(FXRGB(255, 0, 0));
207 for (
int i = 0; i < myEdgeTypesComboBox->getNumItems(); i++) {
208 if (myEdgeTypesComboBox->getItemText(i) == oldID) {
209 myEdgeTypesComboBox->updateIconItem(i, newID.c_str());
217 return (myCreateDefaultEdgeType->getCheck() == TRUE);
223 return (myCreateDefaultShortEdgeType->getCheck() == TRUE);
229 if (myCreateEdgeFrameParent->getViewNet()->getViewParent()->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate()) {
230 if ((myCreateCustomEdgeType->getCheck() == TRUE) && (myEdgeTypesComboBox->getCurrentItem() == 0)) {
243 myNoPedestriansCheckButton->setCheck(TRUE);
249 return myDefaultEdgeType;
255 if ((myCreateDefaultEdgeType->getCheck() == TRUE) || (myCreateDefaultShortEdgeType->getCheck() == TRUE)) {
256 return myDefaultEdgeType;
258 return myEdgeTypeSelected;
265 return (myNoPedestriansCheckButton->getCheck() == TRUE);
271 return (myAddSidewalkCheckButton->getCheck() == TRUE);
277 return (myAddBikelaneCheckButton->getCheck() == TRUE);
283 myEdgeTypeSelected =
nullptr;
285 if (myCurrentIndex < 0) {
293 for (
int i = 0; i < myEdgeTypesComboBox->getNumItems(); i++) {
294 if (myEdgeTypesComboBox->getItemText(i) == edgeType->
getID()) {
296 myEdgeTypesComboBox->setCurrentItem(i);
299 myCreateDefaultEdgeType->setCheck(FALSE);
300 myCreateDefaultShortEdgeType->setCheck(FALSE);
301 myCreateCustomEdgeType->setCheck(TRUE);
303 refreshEdgeTypeSelector();
311 myCreateDefaultEdgeType->setCheck(FALSE);
312 myCreateDefaultShortEdgeType->setCheck(FALSE);
313 myCreateCustomEdgeType->setCheck(TRUE);
314 refreshEdgeTypeSelector();
321 if (obj == myCreateDefaultEdgeType) {
322 myCreateDefaultEdgeType->setCheck(TRUE);
323 myCreateDefaultShortEdgeType->setCheck(FALSE);
324 myCreateCustomEdgeType->setCheck(FALSE);
325 }
else if (obj == myCreateDefaultShortEdgeType) {
326 myCreateDefaultEdgeType->setCheck(FALSE);
327 myCreateDefaultShortEdgeType->setCheck(TRUE);
328 myCreateCustomEdgeType->setCheck(FALSE);
330 myCreateDefaultEdgeType->setCheck(FALSE);
331 myCreateDefaultShortEdgeType->setCheck(FALSE);
332 myCreateCustomEdgeType->setCheck(TRUE);
335 refreshEdgeTypeSelector();
345 myCreateEdgeFrameParent->getViewNet()->getUndoList()->begin(edgeType,
TL(
"create new edge type"));
346 myCreateEdgeFrameParent->getViewNet()->getUndoList()->add(
new GNEChange_EdgeType(edgeType,
true),
true);
347 myCreateEdgeFrameParent->getViewNet()->getUndoList()->end();
349 myEdgeTypeSelected = edgeType;
351 myCurrentIndex = (myEdgeTypesComboBox->getNumItems() - 1);
353 refreshEdgeTypeSelector();
361 if (myEdgeTypeSelected && (myEdgeTypeSelected->getID() == myEdgeTypesComboBox->getText().text())) {
362 myEdgeTypeSelected =
nullptr;
367 myCreateEdgeFrameParent->getViewNet()->getUndoList()->begin(edgeType,
TL(
"delete edge type"));
368 myCreateEdgeFrameParent->getViewNet()->getUndoList()->add(
new GNEChange_EdgeType(edgeType,
false),
true);
369 myCreateEdgeFrameParent->getViewNet()->getUndoList()->end();
371 refreshEdgeTypeSelector();
379 myCurrentIndex = myEdgeTypesComboBox->getCurrentItem();
381 refreshEdgeTypeSelector();
388 if (myCreateEdgeFrameParent->getViewNet()->getViewParent()->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate()) {
392 edgeType->
copyTemplate(myCreateEdgeFrameParent->getViewNet()->getViewParent()->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate());
394 myCreateEdgeFrameParent->getViewNet()->getUndoList()->begin(edgeType,
TL(
"create new edge type"));
395 myCreateEdgeFrameParent->getViewNet()->getUndoList()->add(
new GNEChange_EdgeType(edgeType,
true),
true);
396 myCreateEdgeFrameParent->getViewNet()->getUndoList()->end();
398 myEdgeTypeSelected = edgeType;
400 myCurrentIndex = (myEdgeTypesComboBox->getNumItems() - 1);
402 refreshEdgeTypeSelector();
410 if (myAddSidewalkCheckButton->getCheck() == TRUE) {
411 myNoPedestriansCheckButton->setCheck(TRUE);
412 myNoPedestriansCheckButton->disable();
414 myNoPedestriansCheckButton->enable();
417 myCreateEdgeFrameParent->myEdgeTypeAttributes->showAttributesCreatorModule(myDefaultEdgeType, {
SUMO_ATTR_ID});
427 const auto& edgeTypes = myCreateEdgeFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdgeTypes();
429 myEdgeTypesComboBox->clearItems();
431 myEdgeTypesComboBox->setTextColor(FXRGB(0, 0, 0));
434 myEdgeTypesComboBox->appendIconItem((
TL(
"template: ") + templateEditor->
getEdgeTemplate()->
getID()).c_str(),
nullptr);
436 if (edgeTypes.size() > 0) {
438 for (
const auto& edgeType : edgeTypes) {
439 myEdgeTypesComboBox->appendIconItem(edgeType.second->getID().c_str(), edgeType.second->getACIcon());
442 if ((myCurrentIndex < 0) || (myCurrentIndex >= myEdgeTypesComboBox->getNumItems())) {
443 myCurrentIndex = myEdgeTypesComboBox->getNumItems() - 1;
445 myEdgeTypesComboBox->setCurrentItem(myCurrentIndex);
446 myEdgeTypesComboBox->enable();
448 myEdgeTypesComboBox->disable();
458 myCreateEdgeFrameParent(createEdgeFrameParent),
483 refreshLaneTypeSelector();
492 myCreateEdgeFrameParent->myLaneTypeAttributes->hideAttributesCreatorModule();
501 myLaneTypesComboBox->clearItems();
503 if (myCreateEdgeFrameParent->myEdgeTypeSelector->useEdgeTemplate()) {
504 const GNEEdgeTemplate* edgeTemplate = myCreateEdgeFrameParent->getViewNet()->getViewParent()->getInspectorFrame()->getTemplateEditor()->getEdgeTemplate();
507 myLaneTypesComboBox->appendIconItem(laneTemplate->getAttribute(
SUMO_ATTR_ID).c_str(), laneTemplate->getACIcon());
512 myCreateEdgeFrameParent->myLaneTypeAttributes->showAttributesCreatorModule(edgeTemplate->
getLaneTemplates().at(myLaneIndex), {SUMO_ATTR_ID});
514 myCreateEdgeFrameParent->myLaneTypeAttributes->disableAttributesCreator();
516 myAddLaneTypeButton->disable();
517 myDeleteLaneTypeButton->disable();
520 const GNEEdgeType* edgeType = myCreateEdgeFrameParent->myEdgeTypeSelector->getEdgeTypeSelected();
523 myLaneTypesComboBox->appendIconItem(laneType->getAttribute(
SUMO_ATTR_ID).c_str(), laneType->getACIcon());
528 myCreateEdgeFrameParent->myLaneTypeAttributes->showAttributesCreatorModule(edgeType->
getLaneTypes().at(myLaneIndex), {});
530 myAddLaneTypeButton->enable();
533 myDeleteLaneTypeButton->enable();
535 myDeleteLaneTypeButton->disable();
546 if (myCreateEdgeFrameParent->myEdgeTypeSelector->useDefaultEdgeType() ||
547 myCreateEdgeFrameParent->myEdgeTypeSelector->useDefaultEdgeTypeShort()) {
549 myCreateEdgeFrameParent->myEdgeTypeSelector->getDefaultEdgeType()->addLaneType(
new GNELaneType(myCreateEdgeFrameParent->myEdgeTypeSelector->getDefaultEdgeType()));
551 refreshLaneTypeSelector();
553 myLaneTypesComboBox->setCurrentItem(myLaneTypesComboBox->getNumItems() - 1);
554 }
else if (!myCreateEdgeFrameParent->myEdgeTypeSelector->useEdgeTemplate()) {
556 const auto edgeType = myCreateEdgeFrameParent->myEdgeTypeSelector->getEdgeTypeSelected();
561 for (
const auto& laneType : edgeType->getLaneTypes()) {
567 myCreateEdgeFrameParent->getViewNet()->getUndoList()->begin(
GUIIcon::LANETYPE,
TL(
"add laneType"));
568 myCreateEdgeFrameParent->getViewNet()->getUndoList()->add(
new GNEChange_EdgeType(edgeType,
false),
true);
569 myCreateEdgeFrameParent->getViewNet()->getUndoList()->add(
new GNEChange_EdgeType(newEdgeType,
true),
true);
570 myCreateEdgeFrameParent->getViewNet()->getUndoList()->end();
572 myLaneIndex = myLaneTypesComboBox->getNumItems() - 1;
574 myCreateEdgeFrameParent->myEdgeTypeSelector->setCurrentEdgeType(newEdgeType);
584 if (myCreateEdgeFrameParent->myEdgeTypeSelector->useDefaultEdgeType() ||
585 myCreateEdgeFrameParent->myEdgeTypeSelector->useDefaultEdgeTypeShort()) {
587 myCreateEdgeFrameParent->myEdgeTypeSelector->getDefaultEdgeType()->removeLaneType(myLaneIndex);
589 refreshLaneTypeSelector();
591 myLaneTypesComboBox->setCurrentItem(0);
592 }
else if (!myCreateEdgeFrameParent->myEdgeTypeSelector->useEdgeTemplate()) {
594 const auto edgeType = myCreateEdgeFrameParent->myEdgeTypeSelector->getEdgeTypeSelected();
599 for (
int i = 0; i < (int)edgeType->getLaneTypes().size(); i++) {
600 if (i != myLaneIndex) {
605 myCreateEdgeFrameParent->getViewNet()->getUndoList()->begin(
GUIIcon::LANETYPE,
TL(
"remove laneType"));
606 myCreateEdgeFrameParent->getViewNet()->getUndoList()->add(
new GNEChange_EdgeType(edgeType,
false),
true);
607 myCreateEdgeFrameParent->getViewNet()->getUndoList()->add(
new GNEChange_EdgeType(newEdgeType,
true),
true);
608 myCreateEdgeFrameParent->getViewNet()->getUndoList()->end();
610 myLaneIndex = myLaneTypesComboBox->getNumItems() - 1;
612 myCreateEdgeFrameParent->myEdgeTypeSelector->setCurrentEdgeType(newEdgeType);
622 myLaneIndex = myLaneTypesComboBox->getCurrentItem();
624 refreshLaneTypeSelector();
632 if (myLaneIndex > myLaneTypesComboBox->getNumItems()) {
636 myLaneTypesComboBox->setCurrentItem(myLaneIndex);
645 std::ostringstream information;
648 <<
"- " <<
TL(
"ESC:") <<
"\n"
649 <<
" " <<
TL(
"Deselect origin") <<
"\n"
650 <<
"- " <<
TL(
"Control+Click:") <<
"\n"
651 <<
" " <<
TL(
"Move view") <<
"\n"
652 <<
"- " <<
TL(
"Shift+Click:") <<
"\n"
653 <<
" " <<
TL(
"Splits edge in both directions") <<
"\n"
654 <<
"- " <<
TL(
"Alt+Shift+Click:") <<
"\n"
655 <<
" " <<
TL(
"Splits edge in one direction");
668 GNEFrame(viewParent, viewNet,
TL(
"Create Edge")),
688 const bool oppositeEdge,
const bool chainEdge) {
692 WRITE_WARNING(
TL(
"Select either default edgeType or short edge or a custom edgeType or template"));
709 if (junction ==
nullptr) {
738 std::cout <<
"edge created without an open CommandGroup" << std::endl;
803 std::cout <<
"edge created without an open CommandGroup" << std::endl;
892 for (
const auto& lane : edge->
getLanes()) {
896 std::vector<std::string> disallowList = GNEAttributeCarrier::parse<std::vector<std::string> >(lane->getAttribute(
SUMO_ATTR_DISALLOW));
898 if (std::find(disallowList.begin(), disallowList.end(),
"pedestrian") == disallowList.end()) {
899 disallowList.push_back(
"pedestrian");
910 bool bikelaneFound =
false;
912 for (
const auto& lane : edge->
getLanes()) {
915 bikelaneFound =
true;
919 if (!bikelaneFound) {
922 if (bikelaneWidth !=
"default") {
931 bool sidewalkFound =
false;
933 for (
const auto& lane : edge->
getLanes()) {
936 sidewalkFound =
true;
940 if (!sidewalkFound) {
943 if (sidewalkWidth !=
"default") {
FXDEFMAP(GNECreateEdgeFrame::EdgeTypeSelector) EdgeTypeSelectorMap[]
@ MID_GNE_CREATEEDGEFRAME_CREATEFROMTEMPLATE
create edge type from template
@ MID_GNE_CREATEEDGEFRAME_CHECKBUTTON
check button
@ MID_GNE_CREATEEDGEFRAME_SELECTTEMPLATE
select edge template
@ MID_GNE_CREATEEDGEFRAME_DELETE
delete edge type
@ MID_GNE_CREATEEDGEFRAME_ADD
add new edge type
@ MID_GNE_CREATEEDGEFRAME_SELECTLANE
select lane (used for default and template edges)
@ MID_GNE_CREATEEDGEFRAME_SELECTRADIOBUTTON
#define GUIDesignComboBoxAttribute
Combo box static (cannot be edited) extended over the matrix column.
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignComboBoxVisibleItems
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignRadioButton
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
#define WRITE_WARNING(msg)
@ SVC_BICYCLE
vehicle is a bicycle
@ SVC_PEDESTRIAN
pedestrian
@ SUMO_ATTR_BIKELANEWIDTH
@ SUMO_ATTR_SIDEWALKWIDTH
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string getID() const
get ID (all Attribute Carriers have one)
GNENet * getNet() const
get pointer to net
bool areValuesValid() const
check if parameters of attributes are valid
GNEEdgeType * getEdgeTypeSelected() const
get edgeType selected
~EdgeTypeSelector()
destructor
void useTemplate()
use template
GNEEdgeType * getDefaultEdgeType() const
get default edgeType
bool useEdgeTemplate() const
check if we have to use edge template
bool useDefaultEdgeTypeShort() const
check if we're using default edge type short
long onUpdCheckButtons(FXObject *, FXSelector, void *)
Called when check buttons are updated.
bool isAddBikelaneEnabled() const
check if add bikelane check button is enabled
void updateIDinComboBox(const std::string &oldID, const std::string &newID)
update id in comboBox
long onCmdAddEdgeType(FXObject *, FXSelector, void *)
Called when the user press button for add a new edge type.
void enableCheckBoxDisablePedestrians()
void enable checkbox for disable pedestrians
bool useDefaultEdgeType() const
check if we're using default edge type
long onCmdDeleteEdgeType(FXObject *, FXSelector, void *)
Called when the user press button for delete edge type.
GNEEdgeType * myDefaultEdgeType
default edge type
long onCmdCreateFromTemplate(FXObject *, FXSelector, void *)
Called when the user press create edgeType from Template.
bool isAddSidewalkEnabled() const
check if add sidewalk check button is enabled
void fillComboBox()
fill comboBox
void refreshEdgeTypeSelector()
refresh edge type selector
bool isNoPedestriansEnabled() const
check if no pedestrian check button is enabled
long onCmdRadioButton(FXObject *, FXSelector, void *)
void setCurrentEdgeType(const GNEEdgeType *edgeType)
set current edgeType
void clearEdgeTypeSelected()
clear edgeType selected
long onCmdSelectEdgeTypeOrTemplate(FXObject *, FXSelector, void *)
Called when the user press select an edgeType or template in comboBox.
void updateComboBox()
update comboBox
long onCmdSelectLaneType(FXObject *, FXSelector, void *)
Called when the user press select an laneType in comboBox.
FXButton * myDeleteLaneTypeButton
button for delete lane type
MFXComboBoxIcon * myLaneTypesComboBox
ComboBox for lane types.
void showLaneTypeSelector()
show lane type selector
LaneTypeSelector(GNECreateEdgeFrame *createEdgeFrameParent)
FOX-declaration.
void hideLaneTypeSelector()
hide lane type selector
~LaneTypeSelector()
destructor
long onCmdAddLaneType(FXObject *, FXSelector, void *)
FXButton * myAddLaneTypeButton
button for create new lane type
long onCmdDeleteLaneType(FXObject *, FXSelector, void *)
Called when the user press button for delete lane type.
void refreshLaneTypeSelector()
refresh LaneTypeSelector
Legend(GNECreateEdgeFrame *createEdgeFrameParent)
constructor
EdgeTypeSelector * getEdgeTypeSelector() const
get edgeType selector
GNEJunction * myJunctionSource
source junction for new edge
void processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const bool oppositeEdge, const bool chainEdge)
handle processClick and set the relative coloring
void abortEdgeCreation()
abort current edge creation
void show()
show create edge frame
GNECreateEdgeFrame::LaneTypeSelector * myLaneTypeSelector
lane type selector
GNEAttributesCreator * getLaneTypeAttributes() const
get laneType attributes
GNEAttributesCreator * myEdgeTypeAttributes
internal edgeType attributes
void addSidewalk(GNEEdge *edge, const std::string &sidewalkWidth) const
add sidewalk in the given edge
GNEAttributesCreator * getEdgeTypeAttributes() const
get edgeType attributes
const GNEJunction * getJunctionSource() const
get junction source for new edge
GNEAttributesCreator * myLaneTypeAttributes
internal laneType attributes
~GNECreateEdgeFrame()
Destructor.
void disablePedestrians(GNEEdge *edge) const
disable pedestrians in the given edge (within undoRedo)
GNECreateEdgeFrame::Legend * myLegend
Legend.
GNECreateEdgeFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
void addBikelane(GNEEdge *edge, const std::string &bikelaneWidth) const
add bikelane in the given edge
void hide()
hide create edge frame
EdgeTypeSelector * myEdgeTypeSelector
edge type selector
void setUseEdgeTemplate()
set default to using edge template
LaneTypeSelector * getLaneTypeSelector()
get lane type selector
A road/street connecting two junctions (netedit-version)
void copyEdgeType(const GNEEdgeType *edgeType, GNEUndoList *undoList)
copy edge attributes from edgeType
NBEdge * getNBEdge() const
returns the internal NBEdge
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
void copyTemplate(const GNEEdgeTemplate *edgeTemplate, GNEUndoList *undoList)
copy edge attributes from edgetemplate
const std::vector< GNELaneTemplate * > & getLaneTemplates() const
get vector with the lane templates of this edge
void copyTemplate(const GNEEdgeTemplate *edgeTemplate)
copy edge template
const std::vector< GNELaneType * > & getLaneTypes() const
get laneTypes
void addLaneType(GNELaneType *laneType)
add laneType
std::string getAttribute(SumoXMLAttr key) const
GNEViewNet * myViewNet
FOX need this.
virtual void show()
show Frame
virtual void hide()
hide Frame
GNEEdgeTemplate * getEdgeTemplate() const
get edge template (to copy attributes from)
TemplateEditor * getTemplateEditor() const
get template editor
void markAsCreateEdgeSource()
marks as first junction in createEdge-mode
void unMarkAsCreateEdgeSource()
removes mark as first junction in createEdge-mode
std::vector< GNEEdge * > retrieveEdges(GNEJunction *from, GNEJunction *to) const
get all edges by from and to GNEJunction
GNEEdgeType * retrieveEdgeType(const std::string &id, bool hardFail=true) const
get edge type by id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEEdge * createEdge(GNEJunction *src, GNEJunction *dest, GNEEdge *edgeTemplate, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false, bool recomputeConnections=true)
creates a new edge (unless an edge with the same geometry already exists)
GNEJunction * createJunction(const Position &pos, GNEUndoList *undoList)
creates a new junction
GNEViewNet * getViewNet() const
get view net
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
bool hasCommandGroup() const
Check if undoList has command group.
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
class used to group all variables related with objects under cursor after a click over view
GNEJunction * getJunctionFront() const
get front junction or a pointer to nullptr
GNENet * getNet() const
get the net object
void updateObjectsInPosition(const Position &pos)
update objects and boundaries in position
GNEViewParent * getViewParent() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
bool addRestrictedLane(GNELane *lane, SUMOVehicleClass vclass, const bool insertAtFront)
add restricted lane
void setStatusBarText(const std::string &text)
set statusBar text
A single child window which contains a view of the simulation area.
GNEInspectorFrame * getInspectorFrame() const
get frame for inspect elements
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
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.
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
bool showGrid
Information whether a grid shall be shown.
A list item which allows for custom coloring.
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
const std::string & getID() const
A point in 2D or 3D with translation and scaling methods.