64 #ifdef CHECK_MEMORY_LEAKS 66 #endif // CHECK_MEMORY_LEAKS 88 FXMDIClient* p, FXMDIMenu* mdimenu,
92 FXIcon* ic, FXuint opts,
93 FXint x, FXint y, FXint w, FXint h):
96 myParent->addChild(
this,
false);
104 new FXButton(myNavigationToolBar,
105 "\tUndo\tUndo the last Change.",
107 ICON_BEFORE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
108 new FXButton(myNavigationToolBar,
109 "\tRedo\tRedo the last Change.",
111 ICON_BEFORE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
114 new FXToolBarGrip(myNavigationToolBar, NULL, 0, TOOLBARGRIP_SINGLE | FRAME_SUNKEN);
117 myFramesSplitter =
new FXSplitter(myContentFrame, SPLITTER_HORIZONTAL | LAYOUT_FILL_X | LAYOUT_FILL_Y | SPLITTER_TRACKING | FRAME_RAISED | FRAME_THICK);
120 myFramesArea =
new FXHorizontalFrame(myFramesSplitter, FRAME_SUNKEN | LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0);
123 myFramesArea->setWidth(200);
126 myViewArea =
new FXHorizontalFrame(myFramesSplitter, FRAME_SUNKEN | LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0);
129 FXComposite* tmp =
new FXComposite(
this);
132 GNEViewNet* viewNet =
new GNEViewNet(tmp, myViewArea, *myParent,
this, net, undoList, myParent->getGLVisual(), share, myNavigationToolBar);
143 myAdditionalFrame->hide();
226 FXFileDialog opendialog(
this,
"Save Snapshot");
228 opendialog.setSelectMode(SELECTFILE_ANY);
229 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" 230 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n" 231 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n" 232 "JPEG Image (*.jpg, *.jpeg)\nTIFF Image (*.tif, *.tiff)\n" 233 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n" 234 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n" 243 std::string file = opendialog.getFilename().text();
246 FXMessageBox::error(
this, MBOX_OK,
"Saving failed.",
"%s", error.c_str());
266 switch (FXSELID(sel)) {
270 title =
"Junction Chooser";
275 title =
"Edge Chooser";
280 title =
"Traffic-Light-Junctions Chooser";
283 throw ProcessError(
"Unknown Message ID in onCmdLocate");
286 std::vector<GUIGlID> ids(idSet.begin(), idSet.end());
307 for (std::set<GUIGlID>::const_iterator it = laneIDs.begin(); it != laneIDs.end(); it++) {
GNESelectorFrame * mySelectorFrame
the panel for GNE_MODE_SELECT
void show()
sets the focus after the window is created to work-around bug in libfox
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.
GUIIcon
An enumeration of icons used by the gui applications.
int getFramesAreaWidth()
get width of the Frames Area
std::set< GUIGlID > getLaneGlIDs()
returns GLIDs of all lanes
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...
void showFramesArea()
show frames area if at least a GNEFrame is showed
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
GNETLSEditorFrame * myTLSEditorFrame
the panel for GNE_MODE_TLS
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
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)
keyboard functions
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
GNEAdditionalFrame * myAdditionalFrame
the panel for GNE_MODE_ADDITIONAL
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_MODE_CONNECT
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) ...
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
A road/street connecting two junctions (netedit-version)
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
FXMenuButton * myLocatorButton
GNEConnectorFrame * myConnectorFrame
the panel for GNE_MODE_CONNECT
GUISUMOAbstractView * myView
the view
GNENet * getNet() const
get the net object
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
GUISelectedStorage gSelected
A global holder of selected objects.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
GNEInspectorFrame * myInspectorFrame
the panel for GNE_MODE_INSPECT
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT