93 FXGLCanvas* share,
GNENet* net,
GNEUndoList* undoList, FXIcon* ic, FXuint opts, FXint x, FXint y, FXint w, FXint h) :
94 GUIGlChildWindow(p, parentWindow, mdimenu, name, ic, opts, x, y, w, h),
95 myGNEAppWindows(parentWindow),
96 myACChooserJunction(
nullptr),
97 myACChooserEdges(
nullptr),
98 myACChooserTLS(
nullptr),
99 myACChooserAdditional(
nullptr),
100 myACChooserPOI(
nullptr),
101 myACChooserPolygon(
nullptr),
102 myACChooserProhibition(
nullptr) {
104 myParent->addChild(
this,
false);
125 myFramesArea->setWidth(220);
131 FXComposite* tmp =
new FXComposite(
this);
134 GNEViewNet* viewNet =
new GNEViewNet(tmp, myViewArea, *myParent,
this, net, undoList, myParent->getGLVisual(), share, myNavigationToolBar);
151 onCmdUpdateFrameAreaWidth(0, 0, 0);
253 bool showFlag =
false;
257 if (i->second->shown()) {
271 bool hideFlag =
true;
275 if (i->second->shown()) {
301 if (chooserDialog ==
nullptr) {
326 FXFileDialog opendialog(
this,
"Save Snapshot");
328 opendialog.setSelectMode(SELECTFILE_ANY);
329 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" 330 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n" 331 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n" 332 "JPEG Image (*.jpg, *.jpeg)\nTIFF Image (*.tif, *.tiff)\n" 333 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n" 334 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n" 343 std::string file = opendialog.getFilename().text();
347 WRITE_DEBUG(
"Opening FXMessageBox 'error saving snapshot'");
349 FXMessageBox::error(
this, MBOX_OK,
"Saving failed.",
"%s", error.c_str());
351 WRITE_DEBUG(
"Closed FXMessageBox 'error saving snapshot' with 'OK'");
368 std::vector<GNEAttributeCarrier*> ACsToLocate;
369 switch (FXSELID(sel)) {
377 ACsToLocate.reserve(junctions.size());
378 for (
auto i : junctions) {
379 ACsToLocate.push_back(i);
392 ACsToLocate.reserve(edges.size());
393 for (
auto i : edges) {
394 ACsToLocate.push_back(i);
407 ACsToLocate.reserve(junctions.size());
408 for (
auto i : junctions) {
409 if (i->getNBNode()->getControllingTLS().size() > 0) {
410 ACsToLocate.push_back(i);
424 ACsToLocate.reserve(additionals.size());
425 for (
auto i : additionals) {
426 ACsToLocate.push_back(i);
439 ACsToLocate.push_back(dynamic_cast<GNEAttributeCarrier*>(i.second));
452 ACsToLocate.push_back(dynamic_cast<GNEAttributeCarrier*>(i.second));
459 throw ProcessError(
"Unknown Message ID in onCmdLocate");
Locate junction - button.
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_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.
The main window of the Netedit.
#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
mode for connecting lanes
mode for inspecting object attributes
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
mode for editing additional
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.
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_MODE_PROHIBITION
FXPopup * myLocatorPopup
The locator menu.
#define GUIDesignFrameArea
GNEDialogACChooser * myACChooserAdditional
pointer to ACChooser dialog
#define GUIDesignViewnArea
design for viewn area
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_MODE_POLYGON
A single child window which contains a view of the simulation area.
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
GUIMainWindow * myParent
The parent window.
mode for editing connection prohibitions
Locate polygons - button.
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.
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.
virtual bool isAttributeCarrierSelected() const =0
check if attribute carrier is selected
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
std::map< int, GNEFrame * > myGNEFrames
map with the Frames
FXDEFMAP(GNEViewParent) GNEViewParentMap[]
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected) ...
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
GNEDialogACChooser * myACChooserPolygon
pointer to ACChooser dialog
void removeChild(FXMDIChild *child)
removes the given child window from the list
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT
mode for creating polygons
GNEDialogACChooser * myACChooserEdges
pointer to ACChooser dialog
GNEDialogACChooser * myACChooserPOI
pointer to ACChooser dialog
mode for editing crossing
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
FXMenuButton * myLocatorButton
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_MODE_CONNECT
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_MODE_CROSSING
GUISUMOAbstractView * myView
the view
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_MODE_DELETE
GNENet * getNet() const
get the net object
GNEDialogACChooser * myACChooserProhibition
pointer to ACChooser dialog
GNEDialogACChooser * myACChooserJunction
pointer to ACChooser dialog
void hideAllFrames()
hide all frames
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
mode for selecting objects
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Size of frame area updated.
GNEDialogACChooser * myACChooserTLS
pointer to ACChooser dialog
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
const POIs & getPOIs() const
Returns all pois.