59 #ifdef CHECK_MEMORY_LEAKS 61 #endif // CHECK_MEMORY_LEAKS 83 FXMDIClient* p, FXMDIMenu* mdimenu,
86 FXGLCanvas* share,
GNENet* net,
87 FXIcon* ic, FXuint opts,
88 FXint x, FXint y, FXint w, FXint h):
90 myParent->addChild(
this,
false);
98 new FXButton(myNavigationToolBar,
99 "\tUndo\tUndo the last Change.",
101 ICON_BEFORE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
102 new FXButton(myNavigationToolBar,
103 "\tRedo\tRedo the last Change.",
105 ICON_BEFORE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
106 new FXToolBarGrip(myNavigationToolBar, NULL, 0, TOOLBARGRIP_SINGLE | FRAME_SUNKEN);
108 myViewArea =
new FXHorizontalFrame(myContentFrame,
109 FRAME_SUNKEN | LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y,
110 0, 0, 0, 0, 0, 0, 0, 0);
113 FXComposite* tmp =
new FXComposite(
this);
115 *myParent,
this, net,
116 myParent->getGLVisual(), share,
117 myNavigationToolBar);
134 FXFileDialog opendialog(
this,
"Save Snapshot");
136 opendialog.setSelectMode(SELECTFILE_ANY);
137 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" 138 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n" 139 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n" 140 "JPEG Image (*.jpg, *.jpeg)\nTIFF Image (*.tif, *.tiff)\n" 141 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n" 142 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n" 151 std::string file = opendialog.getFilename().text();
154 FXMessageBox::error(
this, MBOX_OK,
"Saving failed.",
"%s", error.c_str());
174 switch (FXSELID(sel)) {
178 title =
"Junction Chooser";
183 title =
"Edge Chooser";
188 title =
"Traffic-Light-Junctions Chooser";
191 throw ProcessError(
"Unknown Message ID in onCmdLocate");
194 std::vector<GUIGlID> ids(idSet.begin(), idSet.end());
215 for (std::set<GUIGlID>::const_iterator it = laneIDs.begin(); it != laneIDs.end(); it++) {
void show()
sets the focus after the window is created to work-around bug in libfox
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
~GNEViewParent()
Destructor.
The main window of the Netedit.
GUIIcon
An enumeration of icons used by the gui applications.
std::set< GUIGlID > getLaneGlIDs()
std::set< GUIGlID > getGlIDs(GUIGlObjectType type=GLO_MAX)
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...
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
A NBNetBuilder extended by visualisation and editing capabilities.
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
FXString gCurrentFolder
The folder used as last.
FXPopup * myLocatorPopup
The locator menu.
GUIGlID getGlID() const
Returns the numerical id of the object.
A single child window which contains a view of the simulation area.
GUIMainWindow * myParent
The parent window.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
FXDEFMAP(GNEViewParent) GNEViewParentMap[]
Locate junction - button.
void removeChild(FXMDIChild *child)
removes the given child window from the list
std::string makeSnapshot(const std::string &destFile)
Takes a snapshots and writes it into the given file.
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected) ...
A road/street connecting two junctions (netedit-version)
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
FXMenuButton * myLocatorButton
GUISUMOAbstractView * myView
the view
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
GUISelectedStorage gSelected
A global holder of selected objects.
static FXIcon * getIcon(GUIIcon which)
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
Called if the user wants to make a snapshot (screenshot)