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 class GNEPolygonFrame;
59 
60 // ===========================================================================
61 // class declarations
62 // ===========================================================================
75  FXDECLARE(GNEViewParent)
76 
77 public:
94  GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
95  const FXString& name, GNEApplicationWindow* parentWindow,
96  FXGLCanvas* share, GNENet* net, GNEUndoList* undoList,
97  FXIcon* ic = NULL, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
98 
100  ~GNEViewParent();
101 
103  void hideAllFrames();
104 
107 
110 
113 
116 
119 
122 
125 
128 
131  void showFramesArea();
132 
135  void hideFramesArea();
136 
138  GUIMainWindow* getApp() const;
139 
142 
146  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
147 
149  long onCmdClose(FXObject*, FXSelector, void*);
150 
152  long onCmdLocate(FXObject*, FXSelector, void*);
153 
155  long onKeyPress(FXObject* o, FXSelector sel, void* data);
156 
158  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
159 
161  long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
163 
165  bool isSelected(GUIGlObject* o) const;
166 
167 protected:
170 
171 private:
174 
176  FXHorizontalFrame* myViewArea;
177 
179  FXHorizontalFrame* myFramesArea;
180 
182  FXSplitter* myFramesSplitter;
183 
185  std::map<int, GNEFrame*> myGNEFrames;
186 };
187 
188 
189 #endif
190 
191 /****************************************************************************/
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.
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_MODE_DELETE
The main window of the Netedit.
void showFramesArea()
show frames area if at least a GNEFrame is showed
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
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:92
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:73
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
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_MODE_CROSSING
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_MODE_CONNECT
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected) ...
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)
void hideAllFrames()
hide all frames
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_MODE_POLYGON
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT