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 
30 
31 
32 // ===========================================================================
33 // class declarations
34 // ===========================================================================
35 class GNEDialogACChooser;
36 class GNENet;
37 class GNEUndoList;
39 class GNEInspectorFrame;
40 class GNESelectorFrame;
41 class GNEConnectorFrame;
42 class GNETLSEditorFrame;
43 class GNEAdditionalFrame;
44 class GNECrossingFrame;
45 class GNETAZFrame;
46 class GNEDeleteFrame;
47 class GNEPolygonFrame;
49 
50 // ===========================================================================
51 // class declarations
52 // ===========================================================================
65  FXDECLARE(GNEViewParent)
66 
67 public:
84  GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
85  const FXString& name, GNEApplicationWindow* parentWindow,
86  FXGLCanvas* share, GNENet* net, GNEUndoList* undoList,
87  FXIcon* ic = nullptr, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
88 
91 
93  void hideAllFrames();
94 
97 
100 
103 
106 
109 
112 
114  GNETAZFrame* getTAZFrame() const;
115 
118 
121 
124 
127  void showFramesArea();
128 
131  void hideFramesArea();
132 
135 
138 
140  void eraseACChooserDialog(GNEDialogACChooser* chooserDialog);
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:
172  struct Frames {
174  Frames();
175 
177  void hideFrames();
178 
180  void setWidth(int frameWidth);
181 
183  bool isFrameShown() const;
184 
187 
190 
193 
196 
199 
202 
205 
208 
211 
214  };
215 
217  struct ACChoosers {
219  ACChoosers();
220 
222  ~ACChoosers();
223 
226 
229 
232 
235 
238 
241 
244  };
245 
248 
250  FXHorizontalFrame* myViewArea;
251 
253  FXHorizontalFrame* myFramesArea;
254 
256  FXSplitter* myFramesSplitter;
257 
260 
263 };
264 
265 
266 #endif
267 
268 /****************************************************************************/
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
GNETLSEditorFrame * TLSEditorFrame
frame for GNE_MODE_TLS
The main window of the Netedit.
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
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:77
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_MODE_PROHIBITION
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_MODE_POLYGON
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:63
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
ACChoosers myACChoosers
struct for ACChoosers
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
GNEDialogACChooser * ACChooserProhibition
pointer to ACChooser dialog
GNEDialogACChooser * ACChooserEdges
pointer to ACChooser dialog
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
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
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_MODE_CONNECT
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_MODE_CROSSING
GNEDialogACChooser * ACChooserJunction
pointer to ACChooser dialog
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_MODE_DELETE
struct for ACChoosers dialog
void hideAllFrames()
hide all frames
GNEDialogACChooser * ACChooserTLS
pointer to ACChooser dialog
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
struct for Frames
GNESelectorFrame * selectorFrame
frame for GNE_MODE_SELECT
GNETAZFrame * TAZFrame
frame for GNE_MODE_TAZ
GNEDialogACChooser * ACChooserPOI
pointer to ACChooser dialog
GNEDeleteFrame * deleteFrame
frame for GNE_MODE_DELETE
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