98 FXGLCanvas* share,
GNENet* net,
GNEUndoList* undoList, FXIcon* ic, FXuint opts, FXint x, FXint y, FXint w, FXint h) :
99 GUIGlChildWindow(p, parentWindow, mdimenu, name, parentWindow->getToolbarsGrip().navigation, ic, opts, x, y, w, h),
109 std::string(
"\t") +
TL(
"Undo") + std::string(
"\t") +
TL(
"Undo the last change. (Ctrl+Z)"),
112 std::string(
"\t") +
TL(
"Redo") + std::string(
"\t") +
TL(
"Redo the last change. (Ctrl+Y)"),
120 std::string(
"\t") +
TL(
"Compute path manager") + std::string(
"\t") +
TL(
"Compute path manager."),
133 FXComposite* tmp =
new FXComposite(
this);
160 myView->buildViewToolBars(
this);
410 if (chooserDialog ==
nullptr) {
412 }
else if (chooserDialog ==
myACChoosers.ACChooserJunction) {
414 }
else if (chooserDialog ==
myACChoosers.ACChooserEdges) {
416 }
else if (chooserDialog ==
myACChoosers.ACChooserWalkingAreas) {
418 }
else if (chooserDialog ==
myACChoosers.ACChooserVehicles) {
420 }
else if (chooserDialog ==
myACChoosers.ACChooserPersons) {
422 }
else if (chooserDialog ==
myACChoosers.ACChooserContainers) {
424 }
else if (chooserDialog ==
myACChoosers.ACChooserRoutes) {
426 }
else if (chooserDialog ==
myACChoosers.ACChooserStops) {
428 }
else if (chooserDialog ==
myACChoosers.ACChooserTLS) {
430 }
else if (chooserDialog ==
myACChoosers.ACChooserAdditional) {
432 }
else if (chooserDialog ==
myACChoosers.ACChooserPOI) {
434 }
else if (chooserDialog ==
myACChoosers.ACChooserPolygon) {
436 }
else if (chooserDialog ==
myACChoosers.ACChooserProhibition) {
438 }
else if (chooserDialog ==
myACChoosers.ACChooserWire) {
475 FXFileDialog opendialog(
this,
TL(
"Save Snapshot"));
477 opendialog.setSelectMode(SELECTFILE_ANY);
486 std::string file = opendialog.getFilename().text();
487 if (file.find(
".") == std::string::npos) {
489 WRITE_MESSAGE(
TL(
"No file extension was specified - saving Snapshot as PNG."));
491 const std::string error =
myView->makeSnapshot(file);
492 if (error.size() > 0) {
515 std::map<std::string, GNEAttributeCarrier*> ACsToLocate;
516 int messageId = FXSELID(sel);
518 std::string locateTitle;
522 locateTitle =
TL(
"Junction Chooser");
524 ACsToLocate[junction.second->getID()] = junction.second;
529 locateTitle =
TL(
"Edge Chooser");
531 ACsToLocate[edge.second->getID()] = edge.second;
536 locateTitle =
TL(
"WalkingArea Chooser");
538 ACsToLocate[walkingArea.second->getID()] = walkingArea.second;
543 locateTitle =
TL(
"Vehicle Chooser");
547 ACsToLocate[vehicle.second->getID()] = vehicle.second;
554 locateTitle =
TL(
"Person Chooser");
558 ACsToLocate[person.second->getID()] = person.second;
564 locateTitle =
TL(
"Container Chooser");
568 ACsToLocate[container.second->getID()] = container.second;
574 locateTitle =
TL(
"Route Chooser");
576 ACsToLocate[route.second->getID()] = route.second;
581 locateTitle =
TL(
"Stop Chooser");
585 ACsToLocate[flowTAZ.second->getID()] = flowTAZ.second;
592 locateTitle =
TL(
"TLS Chooser");
595 if (junction.second->getNBNode()->getControllingTLS().size() > 0) {
596 ACsToLocate[junction.second->getID()] = junction.second;
602 locateTitle =
TL(
"Additional Chooser");
606 if (!tagProperty->isShapeElement() && !tagProperty->isTAZElement()) {
607 for (
const auto& additional : additionalTag.second) {
608 ACsToLocate[additional.second->getID()] = additional.second;
615 locateTitle =
TL(
"POI Chooser");
619 ACsToLocate[poi.second->getID()] = poi.second;
625 locateTitle =
TL(
"Poly Chooser");
629 ACsToLocate[polygon.second->getID()] = polygon.second;
634 throw ProcessError(
"Unknown Message ID in onCmdLocate");
644 *chooserLoc = chooser;
657 myView->onKeyPress(o, sel, eventData);
664 myView->onKeyRelease(o, sel, eventData);
793 TAZFrame->setFrameWidth(frameWidth);
FXDEFMAP(GNEViewParent) GNEViewParentMap[]
@ MID_MAKESNAPSHOT
Make snapshot - button.
@ MID_HOTKEY_SHIFT_S_LOCATESTOP
Locate stop - button.
@ MID_HOTKEY_CTRL_Y_REDO
Undo.
@ MID_HOTKEY_CTRL_W_CLOSESIMULATION
Close simulation - ID.
@ MID_HOTKEY_SHIFT_O_LOCATEPOI
Locate poi - button.
@ MID_HOTKEY_SHIFT_A_LOCATEADDITIONAL
Locate additional structure - button.
@ MID_HOTKEY_SHIFT_R_LOCATEROUTE
Locate route - button.
@ MID_HOTKEY_SHIFT_W_LOCATEWALKINGAREA
Locate edge - button.
@ MID_HOTKEY_SHIFT_C_LOCATECONTAINER
Locate container - button.
@ MID_HOTKEY_SHIFT_V_LOCATEVEHICLE
Locate vehicle - button.
@ MID_HOTKEY_SHIFT_L_LOCATEPOLY
Locate polygons - button.
@ MID_HOTKEY_SHIFT_E_LOCATEEDGE
Locate edge - button.
@ MID_GNE_VIEWPARENT_FRAMEAREAWIDTH
Size of frame area updated.
@ MID_HOTKEY_SHIFT_P_LOCATEPERSON
Locate person - button.
@ MID_HOTKEY_SHIFT_J_LOCATEJUNCTION
Locate junction - button.
@ MID_HOTKEY_CTRL_Z_UNDO
Redo.
@ MID_HOTKEY_SHIFT_T_LOCATETLS
Locate TLS - button.
@ MID_GNE_TOOLBAREDIT_COMPUTEPATHMANAGER
compute path manager
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
#define GUIDesignFrameArea
#define GUIDesignVerticalSeparator
vertical separator
#define GUIDesignSplitter
#define GUIDesignViewnArea
design for view area
#define GUIDesignFramesAreaDefaultWidth
define the default frames area width
FXString gCurrentFolder
The folder used as last.
#define WRITE_MESSAGE(msg)
@ SUMO_TAG_ROUTE
description of a route
The main window of Netedit.
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * >, std::hash< int > > & getDemandElements() const
get demand elements
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
const std::unordered_map< const GUIGlObject *, GNEWalkingArea * > & getWalkingAreas() const
get walkingAreas
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEAdditional * >, std::hash< int > > & getAdditionals() const
get additionals
A NBNetBuilder extended by visualisation and editing capabilities.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
const GNETagPropertiesDatabase * getTagPropertiesDatabase() const
get tag properties database
const GNETagProperties * getTagProperty(const SumoXMLTag tag, const bool hardFail) const
get tagProperty associated to the given tag
GNENet * getNet() const
get the net object
GNEACChooserDialog * ACChooserPOI
pointer to ACChooser dialog used for locate POIs
GNEACChooserDialog * ACChooserPersons
pointer to ACChooser dialog used for locate persons
GNEACChooserDialog * ACChooserAdditional
pointer to ACChooser dialog used for locate additional
GNEACChooserDialog * ACChooserWire
pointer to ACChooser dialog used for locate Wires
GNEACChooserDialog * ACChooserTLS
pointer to ACChooser dialog used for locate TLSs
GNEACChooserDialog * ACChooserJunction
pointer to ACChooser dialog used for locate junctions
GNEACChooserDialog * ACChooserProhibition
pointer to ACChooser dialog used for locate Prohibitions
GNEACChooserDialog * ACChooserWalkingAreas
pointer to ACChooser dialog used for locate walkingareas
GNEACChooserDialog * ACChooserEdges
pointer to ACChooser dialog used for locate edges
GNEACChooserDialog * ACChooserVehicles
pointer to ACChooser dialog used for locate vehicles
GNEACChooserDialog * ACChooserStops
pointer to ACChooser dialog used for locate stops
GNEACChooserDialog * ACChooserContainers
pointer to ACChooser dialog used for locate containers
GNEACChooserDialog * ACChooserPolygon
pointer to ACChooser dialog used for locate Polygons
GNEACChooserDialog * ACChooserRoutes
pointer to ACChooser dialog used for locate routes
CommonFrames()
constructor
GNEMoveFrame * moveFrame
frame for move elements
GNEFrame * getCurrentShownFrame() const
get current common frame show
bool isCommonFrameShown() const
return true if at least there is a common frame shown
GNEDeleteFrame * deleteFrame
frame for delete elements
void buildCommonFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build common frames
GNESelectorFrame * selectorFrame
frame for select elements
void hideCommonFrames()
hide common frames
GNEInspectorFrame * inspectorFrame
frame for inspect elements
void setCommonFramesWidth(int frameWidth)
set new width in all common frames
GNEEdgeDataFrame * edgeDataFrame
frame for DATA_EDGEDATA
void setDataFramesWidth(int frameWidth)
set new width in all data frames
GNEFrame * getCurrentShownFrame() const
get current data frame show
GNETAZRelDataFrame * TAZRelDataFrame
frame for DATA_TAZRELDATA
GNEEdgeRelDataFrame * edgeRelDataFrame
frame for DATA_EDGERELDATA
bool isDataFrameShown() const
return true if at least there is a data frame shown
void hideDataFrames()
hide data frames
void buildDataFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build data frames
GNEMeanDataFrame * meanDataFrame
frame for DATA_MEANDATA
GNEPersonFrame * personFrame
frame for DEMAND_PERSON
DemandFrames()
constructor
GNERouteDistributionFrame * routeDistributionFrame
frame for DEMAND_ROUTEDISTRIBUTION
GNEStopFrame * stopFrame
frame for DEMAND_STOP
GNERouteFrame * routeFrame
frame for DEMAND_ROUTE
GNEContainerFrame * containerFrame
frame for DEMAND_CONTAINER
GNETypeDistributionFrame * typeDistributionFrame
frame for DEMAND_TYPEDISTRIBUTION
GNEContainerPlanFrame * containerPlanFrame
frame for DEMAND_CONTAINERPLAN
GNEVehicleFrame * vehicleFrame
frame for DEMAND_VEHICLE
GNEFrame * getCurrentShownFrame() const
get current demand frame show
void setDemandFramesWidth(int frameWidth)
set new width in all demand frames
void buildDemandFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build demand frames
GNEPersonPlanFrame * personPlanFrame
frame for DEMAND_PERSONPLAN
GNETypeFrame * typeFrame
frame for DEMAND_TYPE
bool isDemandFrameShown() const
return true if at least there is a demand frame shown
void hideDemandFrames()
hide demand frames
GNEAdditionalFrame * additionalFrame
frame for NETWORK_ADDITIONAL
NetworkFrames()
constructor
bool isNetworkFrameShown() const
return true if at least there is a network frame shown
GNECrossingFrame * crossingFrame
frame for NETWORK_CROSSING
GNEDecalFrame * decalFrame
frame for NETWORK_DECAL
GNEConnectorFrame * connectorFrame
frame for NETWORK_CONNECT
GNECreateEdgeFrame * createEdgeFrame
frame for NETWORK_CREATEDGE
GNEProhibitionFrame * prohibitionFrame
frame for NETWORK_PROHIBITION
GNEShapeFrame * polygonFrame
frame for NETWORK_SHAPE
GNETAZFrame * TAZFrame
frame for NETWORK_TAZ
GNETLSEditorFrame * TLSEditorFrame
frame for NETWORK_TLS
GNEFrame * getCurrentShownFrame() const
get current network frame show
GNEWireFrame * wireFrame
frame for NETWORK_WIRE
void hideNetworkFrames()
hide network frames
void setNetworkFramesWidth(int frameWidth)
set new width in all network frames
void buildNetworkFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build network frames
A single child window which contains a view of the simulation area.
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
GNECrossingFrame * getCrossingFrame() const
get frame for NETWORK_CROSSING
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
GNEConnectorFrame * getConnectorFrame() const
get frame for NETWORK_CONNECT
GNEStopFrame * getStopFrame() const
get frame for DEMAND_STOP
void updateUndoRedoButtons()
update toolbar undo/redo buttons (called when user press Ctrl+Z/Y)
long onCmdUpdateFrameAreaWidth(FXObject *, FXSelector, void *)
Called when user change the splitter between FrameArea and ViewNet.
GNEProhibitionFrame * getProhibitionFrame() const
get frame for NETWORK_PROHIBITION
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
GNEViewParent(FXMDIClient *p, FXMDIMenu *mdimenu, const FXString &name, GNEApplicationWindow *parentWindow, FXGLCanvas *share, GNENet *net, GNEUndoList *undoList, FXIcon *ic=nullptr, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
FOX-declaration.
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for DEMAND_PERSONFRAME
DemandFrames myDemandFrames
struct for demand frames
MFXButtonTooltip * myUndoButton
toolbar undo button
GNEMeanDataFrame * getMeanDataFrame() const
get frame for DATA_TAZRELDATA
GNEShapeFrame * getShapeFrame() const
get frame for NETWORK_SHAPE
void setFrameAreaWidth(const int frameAreaWith)
set frame area width
GNETAZRelDataFrame * getTAZRelDataFrame() const
get frame for DATA_TAZRELDATA
GNEMoveFrame * getMoveFrame() const
get frame for move elements
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x).
GNESelectorFrame * getSelectorFrame() const
get frame for select elements
GNEContainerPlanFrame * getContainerPlanFrame() const
get frame for DEMAND_CONTAINERFRAME
void hideFramesArea()
hide frames area if all GNEFrames are hidden
FXHorizontalFrame * myViewArea
frame to hold myView and myAttributePanel
GNEEdgeDataFrame * getEdgeDataFrame() const
get frame for DATA_EDGEDATA
GNEDeleteFrame * getDeleteFrame() const
get frame for delete elements
MFXButtonTooltip * myComputePathManagerButton
compute Path manager button
NetworkFrames myNetworkFrames
struct for network frames
GNETypeDistributionFrame * getTypeDistributionFrame() const
get frame for DEMAND_TYPEDISTRIBUTION
ACChoosers myACChoosers
struct for ACChoosers
GNEVehicleFrame * getVehicleFrame() const
get frame for DEMAND_VEHICLE
void showFramesArea()
show frames area if at least a GNEFrame is showed
GNEDecalFrame * getDecalFrame() const
get frame for NETWORK_DECAL
void hideAllFrames()
hide all frames
GNETypeFrame * getTypeFrame() const
get frame for DEMAND_TYPE
FXVerticalFrame * myFramesArea
frame to hold GNEFrames
GNETAZFrame * getTAZFrame() const
get frame for NETWORK_TAZ
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for NETWORK_TLS
CommonFrames myCommonFrames
struct for common frames
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
DataFrames myDataFrames
struct for data frames
GNEContainerFrame * getContainerFrame() const
get frame for DEMAND_CONTAINER
GNEAdditionalFrame * getAdditionalFrame() const
get frame for NETWORK_ADDITIONAL
GNERouteDistributionFrame * getRouteDistributionFrame() const
get frame for DEMAND_ROUTEDISTRIBUTION
GNEWireFrame * getWireFrame() const
get frame for NETWORK_WIRE
FXVerticalFrame * getFramesArea() const
get frame area
GNEPersonFrame * getPersonFrame() const
get frame for DEMAND_PERSON
FXSplitter * myFramesSplitter
Splitter to divide ViewNet und GNEFrames.
GNEInspectorFrame * getInspectorFrame() const
get frame for inspect elements
GNEApplicationWindow * myGNEAppWindows
pointer to GNEApplicationWindow
GNEEdgeRelDataFrame * getEdgeRelDataFrame() const
get frame for DATA_EDGERELDATA
MFXButtonTooltip * myRedoButton
toolbar redo button
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for NETWORK_CREATEEDGE
int getFrameAreaWidth() const
get frame area width
GNERouteFrame * getRouteFrame() const
get frame for DEMAND_ROUTE
void eraseACChooserDialog(GNEACChooserDialog *chooserDialog)
remove created chooser dialog
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
~GNEViewParent()
Destructor.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
GUIMainWindow * myGUIMainWindowParent
FOX needs this.
virtual void create()
create GUIGlChildWindow
GUIGlChildWindow(FXMDIClient *p, GUIMainWindow *GUIMainWindowParent, FXMDIMenu *mdimenu, const FXString &name, FXMenuBar *gripNavigationToolbar, FXIcon *ic=NULL, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
constructor
GUISUMOAbstractView * myView
The view.
FXPopup * myLocatorPopup
The locator menu.
MFXMenuButtonTooltip * myLocatorButton
The locator button.
FXVerticalFrame * myChildWindowContentFrame
The contents frame.
FXMenuBar * myGripNavigationToolbar
The grip navigation tool bar.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static FXbool userPermitsOverwritingWhenFileExists(FXWindow *const parent, const FXString &file)
Returns true if either the file given by its name does not exist or the user allows overwriting it.
static const std::vector< SumoXMLTag > stops
vehicle stops namespace
static const std::vector< SumoXMLTag > vehicles
vehicles namespace
static const std::vector< SumoXMLTag > POIs
POIs namespace.
static const std::vector< SumoXMLTag > persons
persons namespace
static const std::vector< SumoXMLTag > polygons
polygon namespace
static const std::vector< SumoXMLTag > containers
containers namespace
static StringBijection< ImageFileExtension > ImageFileExtensions
image file extensions