85 FXGLCanvas* share,
GNENet* net,
GNEUndoList* undoList, FXIcon* ic, FXuint opts, FXint x, FXint y, FXint w, FXint h) :
86 GUIGlChildWindow(p, parentWindow, mdimenu, name, parentWindow->getToolbarsGrip().navigation, ic, opts, x, y, w, h),
87 myGNEAppWindows(parentWindow) {
89 myParent->addGLChild(
this);
105 myFramesArea->setWidth(220);
111 FXComposite* tmp =
new FXComposite(
this);
114 GNEViewNet* viewNet =
new GNEViewNet(tmp, myViewArea, *myParent,
this, net, undoList, myParent->getGLVisual(), share);
117 myGNEAppWindows->getToolbarsGrip().buildMenuToolbarsGrip();
130 myFrames.TAZFrame =
new GNETAZFrame(myFramesArea, viewNet);
136 myFrames.routeFrame =
new GNERouteFrame(myFramesArea, viewNet);
139 myFrames.stopFrame =
new GNEStopFrame(myFramesArea, viewNet);
145 onCmdUpdateFrameAreaWidth(
nullptr, 0,
nullptr);
151 myView->buildViewToolBars(*
this);
320 if (chooserDialog ==
nullptr) {
351 FXFileDialog opendialog(
this,
"Save Snapshot");
353 opendialog.setSelectMode(SELECTFILE_ANY);
354 opendialog.setPatternList(
"All Image Files (*.gif, *.bmp, *.xpm, *.pcx, *.ico, *.rgb, *.xbm, *.tga, *.png, *.jpg, *.jpeg, *.tif, *.tiff, *.ps, *.eps, *.pdf, *.svg, *.tex, *.pgf)\n" 355 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n" 356 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n" 357 "JPEG Image (*.jpg, *.jpeg)\nTIFF Image (*.tif, *.tiff)\n" 358 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n" 359 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n" 368 std::string file = opendialog.getFilename().text();
372 WRITE_DEBUG(
"Opening FXMessageBox 'error saving snapshot'");
374 FXMessageBox::error(
this, MBOX_OK,
"Saving failed.",
"%s", error.c_str());
376 WRITE_DEBUG(
"Closed FXMessageBox 'error saving snapshot' with 'OK'");
395 std::vector<GNEAttributeCarrier*> ACsToLocate;
396 switch (FXSELID(sel)) {
404 ACsToLocate.reserve(junctions.size());
405 for (
auto i : junctions) {
406 ACsToLocate.push_back(i);
419 ACsToLocate.reserve(edges.size());
420 for (
auto i : edges) {
421 ACsToLocate.push_back(i);
439 ACsToLocate.push_back(i.second);
443 ACsToLocate.push_back(i.second);
447 ACsToLocate.push_back(i.second);
451 ACsToLocate.push_back(i.second);
466 ACsToLocate.push_back(i.second);
485 ACsToLocate.push_back(i.second);
489 ACsToLocate.push_back(i.second);
493 ACsToLocate.push_back(i.second);
497 ACsToLocate.push_back(i.second);
501 ACsToLocate.push_back(i.second);
514 ACsToLocate.reserve(junctions.size());
515 for (
auto i : junctions) {
516 if (i->getNBNode()->getControllingTLS().size() > 0) {
517 ACsToLocate.push_back(i);
531 ACsToLocate.reserve(additionals.size());
532 for (
auto i : additionals) {
533 ACsToLocate.push_back(i);
546 ACsToLocate.push_back(dynamic_cast<GNEAttributeCarrier*>(i.second));
559 ACsToLocate.push_back(dynamic_cast<GNEAttributeCarrier*>(i.second));
566 throw ProcessError(
"Unknown Message ID in onCmdLocate");
603 inspectorFrame(nullptr),
604 selectorFrame(nullptr),
605 connectorFrame(nullptr),
606 TLSEditorFrame(nullptr),
607 additionalFrame(nullptr),
608 crossingFrame(nullptr),
610 deleteFrame(nullptr),
611 polygonFrame(nullptr),
612 prohibitionFrame(nullptr),
613 createEdgeFrame(nullptr),
615 vehicleFrame(nullptr),
616 vehicleTypeFrame(nullptr),
618 personFrame(nullptr),
619 personTypeFrame(nullptr),
620 personPlanFrame(nullptr) {
773 ACChooserJunction(nullptr),
774 ACChooserEdges(nullptr),
775 ACChooserVehicles(nullptr),
776 ACChooserRoutes(nullptr),
777 ACChooserStops(nullptr),
778 ACChooserTLS(nullptr),
779 ACChooserAdditional(nullptr),
780 ACChooserPOI(nullptr),
781 ACChooserPolygon(nullptr),
782 ACChooserProhibition(nullptr) {
Locate junction - button.
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
stop placed over a parking area (used in netedit)
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
GNEConnectorFrame * connectorFrame
frame for GNE_NMODE_CONNECT
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_NMODE_INSPECT
GNEApplicationWindow * myGNEAppWindows
pointer to GNEApplicationWindow
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
void hideFramesArea()
hide frames area if all GNEFrames are hidden
~GNEViewParent()
Destructor.
Frames myFrames
struct for frames
void hide()
hide delete frame
void hide()
hide TAZ frame
GNETLSEditorFrame * TLSEditorFrame
frame for GNE_NMODE_TLS
GNEVehicleFrame * vehicleFrame
frame for GNE_DMODE_VEHICLE
The main window of the Netedit.
a flow definitio nusing a from-to edges instead of a route (used by router)
#define GUIDesignVerticalSeparator
vertical separator
const Polygons & getPolygons() const
Returns all polygons.
Locate addtional structure - button.
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
GNEVehicleTypeFrame * getVehicleTypeFrame() const
get frame for GNE_DMODE_VEHICLETYPE
a flow definition nusing a route instead of a from-to edges route (used in NETEDIT) ...
GNEAdditionalFrame * additionalFrame
frame for GNE_NMODE_ADDITIONAL
GNEProhibitionFrame * prohibitionFrame
frame for GNE_NMODE_PROHIBITION
GNEPersonFrame * getPersonFrame() const
get frame for GNE_DMODE_PERSON
bool isFrameShown() const
return true if at least there is a frame shown
GNEPersonFrame * personFrame
frame for GNE_DMODE_PERSON
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...
void showFramesArea()
show frames area if at least a GNEFrame is showed
GNEStopFrame * getStopFrame() const
get frame for GNE_DMODE_STOP
stop placed over a lane (used in netedit)
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
#define GUIDesignSplitter
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
A NBNetBuilder extended by visualisation and editing capabilities.
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
FXString gCurrentFolder
The folder used as last.
GNEVehicleTypeFrame * vehicleTypeFrame
frame for GNE_DMODE_VEHICLETYPE
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_NMODE_PROHIBITION
FXPopup * myLocatorPopup
The locator menu.
#define GUIDesignFrameArea
GNEPersonTypeFrame * getPersonTypeFrame() const
get frame for GNE_DMODE_PERSONTYPE
GNEPersonTypeFrame * personTypeFrame
frame for GNE_DMODE_PERSONTYPE
#define GUIDesignViewnArea
design for viewn area
GNEPersonPlanFrame * personPlanFrame
frame for GNE_DMODE_PERSONPLAN
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_NMODE_POLYGON
GNECreateEdgeFrame * createEdgeFrame
frame for GNE_NMODE_CREATEDGE
begin/end of the description of a route
A single child window which contains a view of the simulation area.
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
void hide()
hide crossing frame
ACChoosers myACChoosers
struct for ACChoosers
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_NMODE_ADDITIONAL
void hide()
hide inspector frame
GUIMainWindow * myParent
The parent window.
Locate polygons - button.
stop placed over a charging station (used in netedit)
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
long onCmdUpdateFrameAreaWidth(FXObject *, FXSelector, void *)
Called when user change the splitter between FrameArea and ViewNet.
GNEStopFrame * stopFrame
frame for GNE_DMODE_STOP
std::string makeSnapshot(const std::string &destFile, const int width=-1, const int height=-1)
Takes a snapshots and writes it into the given file.
GNEDialogACChooser * ACChooserRoutes
pointer to ACChooser dialog used for locate routes
GNEDialogACChooser * ACChooserStops
pointer to ACChooser dialog used for locate stops
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
GNEVehicleFrame * getVehicleFrame() const
get frame for GNE_DMODE_VEHICLE
stop placed over a containerStop (used in netedit)
stop placed over a busStop (used in netedit)
GNEDialogACChooser * ACChooserProhibition
pointer to ACChooser dialog used for locate Prohibitions
GNEDialogACChooser * ACChooserEdges
pointer to ACChooser dialog used for locate edges
FXDEFMAP(GNEViewParent) GNEViewParentMap[]
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for GNE_DMODE_PERSONFRAME
void setFrameWidth(int newWidth)
set width of GNEFrame
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for GNE_NMODE_CREATEEDGE
GNEDialogACChooser * ACChooserPolygon
pointer to ACChooser dialog used for locate Polygons
GNECrossingFrame * crossingFrame
frame for GNE_NMODE_CROSSING
GNEPolygonFrame * polygonFrame
frame for GNE_NMODE_POLYGON
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
GNEFrame * getCurrentShownFrame() const
get current frame show
GNEInspectorFrame * inspectorFrame
frame for GNE_NMODE_INSPECT
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
FXMenuButton * myLocatorButton
The locator button.
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_NMODE_CONNECT
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_NMODE_CROSSING
GUISUMOAbstractView * myView
The view.
GNERouteFrame * routeFrame
frame for GNE_DMODE_ROUTE
GNEDialogACChooser * ACChooserJunction
pointer to ACChooser dialog used for locate junctions
virtual void hide()
hide Frame
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_NMODE_DELETE
GNENet * getNet() const
get the net object
void hideAllFrames()
hide all frames
GNEDialogACChooser * ACChooserVehicles
pointer to ACChooser dialog used for locate vehicles
GNEDialogACChooser * ACChooserTLS
pointer to ACChooser dialog used for locate TLSs
a single trip definition (used by router)
GNERouteFrame * getRouteFrame() const
get frame for GNE_DMODE_ROUTE
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
virtual void create()
create GUIGlChildWindow
GNESelectorFrame * selectorFrame
frame for GNE_NMODE_SELECT
GNETAZFrame * TAZFrame
frame for GNE_NMODE_TAZ
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
GNEDialogACChooser * ACChooserPOI
pointer to ACChooser dialog used for locate POIs
Size of frame area updated.
void hide()
hide prohibition frame
GNEDeleteFrame * deleteFrame
frame for GNE_NMODE_DELETE
void removeGLChild(GUIGlChildWindow *child)
removes the given child window from the list
void setWidth(int frameWidth)
set new width in all frames
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
void hideFrames()
hide frames
void hide()
hide delete frame
GNEDialogACChooser * ACChooserAdditional
pointer to ACChooser dialog used for locate additional
const POIs & getPOIs() const
Returns all pois.