SUMO - Simulation of Urban MObility
GNEViewParent.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A single child window which contains a view of the edited network (adapted
8 // from GUISUMOViewParent)
9 // While we don't actually need MDI for netedit it is easier to adapt existing
10 // structures than to write everything from scratch.
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
13 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
14 /****************************************************************************/
15 //
16 // This file is part of SUMO.
17 // SUMO is free software: you can redistribute it and/or modify
18 // it under the terms of the GNU General Public License as published by
19 // the Free Software Foundation, either version 3 of the License, or
20 // (at your option) any later version.
21 //
22 /****************************************************************************/
23 #ifndef GNEViewParent_h
24 #define GNEViewParent_h
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #include <string>
37 #include <vector>
38 #include <fx.h>
39 #include <utils/geom/Position.h>
40 #include <utils/geom/Boundary.h>
43 
44 // ===========================================================================
45 // class declarations
46 // ===========================================================================
48 class GNENet;
50 class GNEFrame;
51 class GNEInspectorFrame;
52 class GNESelectorFrame;
53 class GNEConnectorFrame;
54 class GNETLSEditorFrame;
55 class GNEAdditionalFrame;
56 class GNECrossingFrame;
57 class GNEDeleteFrame;
58 
59 // ===========================================================================
60 // class declarations
61 // ===========================================================================
74  FXDECLARE(GNEViewParent)
75 
76 public:
93  GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
94  const FXString& name, GNEApplicationWindow* parentWindow,
95  FXGLCanvas* share, GNENet* net, GNEUndoList* undoList,
96  FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
97 
100 
102  void hideAllFrames();
103 
106 
109 
112 
115 
118 
121 
124 
127  void showFramesArea();
128 
131  void hideFramesArea();
132 
134  GUIMainWindow* getApp() const;
135 
139  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
140 
142  long onCmdClose(FXObject*, FXSelector, void*);
143 
145  long onCmdLocate(FXObject*, FXSelector, void*);
146 
148  long onKeyPress(FXObject* o, FXSelector sel, void* data);
149 
151  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
152 
154  long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
156 
158  bool isSelected(GUIGlObject* o) const;
159 
160 protected:
163 
164 private:
166  FXHorizontalFrame* myViewArea;
167 
169  FXHorizontalFrame* myFramesArea;
170 
172  FXSplitter* myFramesSplitter;
173 
175  std::map<int, GNEFrame*> myGNEFrames;
176 };
177 
178 
179 #endif
180 
181 /****************************************************************************/
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
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.
void showFramesArea()
show frames area if at least a GNEFrame is showed
FXHorizontalFrame * myViewArea
frame to hold myView and myAttributePanel
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:88
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:72
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
FXSplitter * myFramesSplitter
Splitter to divide ViewNet und GNEFrames.
long onCmdUpdateFrameAreaWidth(FXObject *, FXSelector, void *)
Called when user change the splitter between FrameArea and ViewNet.
GNEViewParent()
FOX needs this.
std::map< int, GNEFrame * > myGNEFrames
map with the Frames
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected) ...
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
GUIMainWindow * getApp() const
get App (GUIMainWindow)
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_MODE_CONNECT
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_MODE_CROSSING
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_MODE_DELETE
void hideAllFrames()
hide all frames
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)