75 FXGLCanvas* share,
GNENet* net,
GNEUndoList* undoList, FXIcon* ic, FXuint opts, FXint x, FXint y, FXint w, FXint h) :
76 GUIGlChildWindow(p, parentWindow, mdimenu, name, ic, opts, x, y, w, h),
77 myGNEAppWindows(parentWindow) {
79 myParent->addGLChild(
this);
95 myFramesArea->setWidth(220);
101 FXComposite* tmp =
new FXComposite(
this);
104 GNEViewNet* viewNet =
new GNEViewNet(tmp, myViewArea, *myParent,
this, net, undoList, myParent->getGLVisual(), share, myNavigationToolBar);
117 myFrames.TAZFrame =
new GNETAZFrame(myFramesArea, viewNet);
122 onCmdUpdateFrameAreaWidth(
nullptr, 0,
nullptr);
240 if (chooserDialog ==
nullptr) {
265 FXFileDialog opendialog(
this,
"Save Snapshot");
267 opendialog.setSelectMode(SELECTFILE_ANY);
268 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" 269 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n" 270 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n" 271 "JPEG Image (*.jpg, *.jpeg)\nTIFF Image (*.tif, *.tiff)\n" 272 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n" 273 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n" 282 std::string file = opendialog.getFilename().text();
286 WRITE_DEBUG(
"Opening FXMessageBox 'error saving snapshot'");
288 FXMessageBox::error(
this, MBOX_OK,
"Saving failed.",
"%s", error.c_str());
290 WRITE_DEBUG(
"Closed FXMessageBox 'error saving snapshot' with 'OK'");
307 std::vector<GNEAttributeCarrier*> ACsToLocate;
308 switch (FXSELID(sel)) {
316 ACsToLocate.reserve(junctions.size());
317 for (
auto i : junctions) {
318 ACsToLocate.push_back(i);
331 ACsToLocate.reserve(edges.size());
332 for (
auto i : edges) {
333 ACsToLocate.push_back(i);
346 ACsToLocate.reserve(junctions.size());
347 for (
auto i : junctions) {
348 if (i->getNBNode()->getControllingTLS().size() > 0) {
349 ACsToLocate.push_back(i);
363 ACsToLocate.reserve(additionals.size());
364 for (
auto i : additionals) {
365 ACsToLocate.push_back(i);
378 ACsToLocate.push_back(dynamic_cast<GNEAttributeCarrier*>(i.second));
391 ACsToLocate.push_back(dynamic_cast<GNEAttributeCarrier*>(i.second));
398 throw ProcessError(
"Unknown Message ID in onCmdLocate");
441 inspectorFrame(nullptr),
442 selectorFrame(nullptr),
443 connectorFrame(nullptr),
444 TLSEditorFrame(nullptr),
445 additionalFrame(nullptr),
446 crossingFrame(nullptr),
448 deleteFrame(nullptr),
449 polygonFrame(nullptr),
450 prohibitionFrame(nullptr) {
518 ACChooserJunction(nullptr),
519 ACChooserEdges(nullptr),
520 ACChooserTLS(nullptr),
521 ACChooserAdditional(nullptr),
522 ACChooserPOI(nullptr),
523 ACChooserPolygon(nullptr),
524 ACChooserProhibition(nullptr) {
Locate junction - button.
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
GNETAZFrame * getTAZFrame() const
get frame for GNE_MODE_TAZ
GNEConnectorFrame * connectorFrame
frame for GNE_MODE_CONNECT
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.
Frames myFrames
struct for frames
void hide()
hide delete frame
void hide()
hide TAZ frame
GNETLSEditorFrame * TLSEditorFrame
frame for GNE_MODE_TLS
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
GNEAdditionalFrame * additionalFrame
frame for GNE_MODE_ADDITIONAL
GNEProhibitionFrame * prohibitionFrame
frame for GNE_MODE_PROHIBITION
bool isFrameShown() const
return true if at least there is a frame shown
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
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
#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
void hide()
hide crossing frame
ACChoosers myACChoosers
struct for ACChoosers
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
void hide()
hide inspector frame
GUIMainWindow * myParent
The parent window.
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
GNEDialogACChooser * ACChooserProhibition
pointer to ACChooser dialog
GNEDialogACChooser * ACChooserEdges
pointer to ACChooser dialog
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
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT
void setFrameWidth(int newWidth)
set width of GNEFrame
GNEDialogACChooser * ACChooserPolygon
pointer to ACChooser dialog
GNECrossingFrame * crossingFrame
frame for GNE_MODE_CROSSING
GNEPolygonFrame * polygonFrame
frame for GNE_MODE_POLYGON
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
GNEInspectorFrame * inspectorFrame
frame for GNE_MODE_INSPECT
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
GNEDialogACChooser * ACChooserJunction
pointer to ACChooser dialog
virtual void hide()
hide Frame
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_MODE_DELETE
GNENet * getNet() const
get the net object
void hideAllFrames()
hide all frames
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
GNEDialogACChooser * ACChooserTLS
pointer to ACChooser dialog
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
GNESelectorFrame * selectorFrame
frame for GNE_MODE_SELECT
GNETAZFrame * TAZFrame
frame for GNE_MODE_TAZ
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
GNEDialogACChooser * ACChooserPOI
pointer to ACChooser dialog
Size of frame area updated.
void hide()
hide prohibition frame
GNEDeleteFrame * deleteFrame
frame for GNE_MODE_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
GNEDialogACChooser * ACChooserAdditional
pointer to ACChooser dialog
const POIs & getPOIs() const
Returns all pois.