SUMO - Simulation of Urban MObility
GNEViewParent.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // A single child window which contains a view of the edited network (adapted
18 // from GUISUMOViewParent)
19 // While we don't actually need MDI for netedit it is easier to adapt existing
20 // structures than to write everything from scratch.
21 /****************************************************************************/
22 #ifndef GNEViewParent_h
23 #define GNEViewParent_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <string>
36 #include <vector>
37 #include <fx.h>
38 #include <utils/geom/Position.h>
39 #include <utils/geom/Boundary.h>
42 
43 // ===========================================================================
44 // class declarations
45 // ===========================================================================
47 class GNENet;
49 class GNEFrame;
50 class GNEInspectorFrame;
51 class GNESelectorFrame;
52 class GNEConnectorFrame;
53 class GNETLSEditorFrame;
54 class GNEAdditionalFrame;
55 class GNECrossingFrame;
56 class GNEDeleteFrame;
57 class GNEPolygonFrame;
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 
130  void showFramesArea();
131 
134  void hideFramesArea();
135 
137  GUIMainWindow* getApp() const;
138 
141 
145  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
146 
148  long onCmdClose(FXObject*, FXSelector, void*);
149 
151  long onCmdLocate(FXObject*, FXSelector, void*);
152 
154  long onKeyPress(FXObject* o, FXSelector sel, void* data);
155 
157  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
158 
160  long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
162 
164  bool isSelected(GUIGlObject* o) const;
165 
166 protected:
169 
170 private:
173 
175  FXHorizontalFrame* myViewArea;
176 
178  FXHorizontalFrame* myFramesArea;
179 
181  FXSplitter* myFramesSplitter;
182 
184  std::map<int, GNEFrame*> myGNEFrames;
185 };
186 
187 
188 #endif
189 
190 /****************************************************************************/
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.
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:91
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_MODE_POLYGON
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.
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
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 *)