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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // A single child window which contains a view of the edited network (adapted
16 // from GUISUMOViewParent)
17 // While we don't actually need MDI for netedit it is easier to adapt existing
18 // structures than to write everything from scratch.
19 /****************************************************************************/
20 #ifndef GNEViewParent_h
21 #define GNEViewParent_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #include <config.h>
28 
29 #include <string>
30 #include <vector>
31 #include <fx.h>
32 #include <utils/geom/Position.h>
33 #include <utils/geom/Boundary.h>
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
41 class GNEDialogACChooser;
42 class GNENet;
43 class GNEUndoList;
45 class GNEDialogACChooser;
46 class GNEFrame;
47 class GNEInspectorFrame;
48 class GNESelectorFrame;
49 class GNEConnectorFrame;
50 class GNETLSEditorFrame;
51 class GNEAdditionalFrame;
52 class GNECrossingFrame;
53 class GNEDeleteFrame;
54 class GNEPolygonFrame;
56 
57 // ===========================================================================
58 // class declarations
59 // ===========================================================================
72  FXDECLARE(GNEViewParent)
73 
74 public:
91  GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
92  const FXString& name, GNEApplicationWindow* parentWindow,
93  FXGLCanvas* share, GNENet* net, GNEUndoList* undoList,
94  FXIcon* ic = nullptr, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
95 
98 
100  void hideAllFrames();
101 
104 
107 
110 
113 
116 
119 
122 
125 
128 
131  void showFramesArea();
132 
135  void hideFramesArea();
136 
139 
142 
144  void eraseACChooserDialog(GNEDialogACChooser* chooserDialog);
145 
149  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
150 
152  long onCmdClose(FXObject*, FXSelector, void*);
153 
155  long onCmdLocate(FXObject*, FXSelector, void*);
156 
158  long onKeyPress(FXObject* o, FXSelector sel, void* data);
159 
161  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
162 
164  long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
166 
168  bool isSelected(GUIGlObject* o) const;
169 
170 protected:
173 
174 private:
177 
179  FXHorizontalFrame* myViewArea;
180 
182  FXHorizontalFrame* myFramesArea;
183 
185  FXSplitter* myFramesSplitter;
186 
189 
192 
195 
198 
201 
204 
207 
209  std::map<int, GNEFrame*> myGNEFrames;
210 };
211 
212 
213 #endif
214 
215 /****************************************************************************/
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:80
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_MODE_PROHIBITION
GNEDialogACChooser * myACChooserAdditional
pointer to ACChooser dialog
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_MODE_POLYGON
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:70
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) ...
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
GNEDialogACChooser * myACChooserPolygon
pointer to ACChooser dialog
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT
GNEDialogACChooser * myACChooserEdges
pointer to ACChooser dialog
GNEDialogACChooser * myACChooserPOI
pointer to ACChooser dialog
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
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
GNEDialogACChooser * myACChooserProhibition
pointer to ACChooser dialog
GNEDialogACChooser * myACChooserJunction
pointer to ACChooser dialog
void hideAllFrames()
hide all frames
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
GNEDialogACChooser * myACChooserTLS
pointer to ACChooser dialog
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)