Eclipse 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-2019 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 GNEAdditionalFrame;
37 class GNEConnectorFrame;
38 class GNECreateEdgeFrame;
39 class GNECrossingFrame;
40 class GNEDeleteFrame;
41 class GNEDialogACChooser;
42 class GNEInspectorFrame;
43 class GNENet;
44 class GNEFrame;
45 class GNEPolygonFrame;
47 class GNERouteFrame;
48 class GNESelectorFrame;
49 class GNETAZFrame;
50 class GNETLSEditorFrame;
51 class GNEUndoList;
52 class GNEVehicleFrame;
54 class GNEStopFrame;
55 class GNEPersonTypeFrame;
56 class GNEPersonFrame;
57 class GNEPersonPlanFrame;
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 = nullptr, 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 
126  GNETAZFrame* getTAZFrame() const;
127 
130 
133 
136 
139 
141  GNERouteFrame* getRouteFrame() const;
142 
145 
148 
150  GNEStopFrame* getStopFrame() const;
151 
154 
157 
160 
163  void showFramesArea();
164 
167  void hideFramesArea();
168 
171 
174 
176  void eraseACChooserDialog(GNEDialogACChooser* chooserDialog);
177 
181  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
182 
184  long onCmdClose(FXObject*, FXSelector, void*);
185 
187  long onCmdLocate(FXObject*, FXSelector, void*);
188 
190  long onKeyPress(FXObject* o, FXSelector sel, void* data);
191 
193  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
194 
196  long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
198 
199 protected:
202 
203 private:
205  struct Frames {
207  Frames();
208 
210  void hideFrames();
211 
213  void setWidth(int frameWidth);
214 
216  bool isFrameShown() const;
217 
220 
223 
226 
229 
232 
235 
238 
241 
244 
247 
250 
253 
256 
259 
262 
265 
268 
271 
274  };
275 
277  struct ACChoosers {
279  ACChoosers();
280 
282  ~ACChoosers();
283 
286 
289 
292 
295 
298 
301 
304 
307 
310 
313  };
314 
317 
319  FXHorizontalFrame* myViewArea;
320 
322  FXHorizontalFrame* myFramesArea;
323 
325  FXSplitter* myFramesSplitter;
326 
329 
332 };
333 
334 
335 #endif
336 
337 /****************************************************************************/
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
GNEConnectorFrame * connectorFrame
frame for GNE_NMODE_CONNECT
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_NMODE_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_NMODE_TLS
GNEVehicleFrame * vehicleFrame
frame for GNE_DMODE_VEHICLE
The main window of the Netedit.
GNEVehicleTypeFrame * getVehicleTypeFrame() const
get frame for GNE_DMODE_VEHICLETYPE
GNEAdditionalFrame * additionalFrame
frame for GNE_NMODE_ADDITIONAL
GNEProhibitionFrame * prohibitionFrame
frame for GNE_NMODE_PROHIBITION
GNEPersonFrame * getPersonFrame() const
get frame for GNE_DMODE_PERSON
bool isFrameShown() const
return true if at least there is a frame shown
GNEPersonFrame * personFrame
frame for GNE_DMODE_PERSON
void showFramesArea()
show frames area if at least a GNEFrame is showed
GNEStopFrame * getStopFrame() const
get frame for GNE_DMODE_STOP
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:78
GNEVehicleTypeFrame * vehicleTypeFrame
frame for GNE_DMODE_VEHICLETYPE
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_NMODE_PROHIBITION
GNEPersonTypeFrame * getPersonTypeFrame() const
get frame for GNE_DMODE_PERSONTYPE
GNEPersonTypeFrame * personTypeFrame
frame for GNE_DMODE_PERSONTYPE
GNEPersonPlanFrame * personPlanFrame
frame for GNE_DMODE_PERSONPLAN
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_NMODE_POLYGON
GNECreateEdgeFrame * createEdgeFrame
frame for GNE_NMODE_CREATEDGE
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:72
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
ACChoosers myACChoosers
struct for ACChoosers
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_NMODE_ADDITIONAL
FXSplitter * myFramesSplitter
Splitter to divide ViewNet und GNEFrames.
long onCmdUpdateFrameAreaWidth(FXObject *, FXSelector, void *)
Called when user change the splitter between FrameArea and ViewNet.
GNEStopFrame * stopFrame
frame for GNE_DMODE_STOP
GNEDialogACChooser * ACChooserRoutes
pointer to ACChooser dialog used for locate routes
GNEViewParent()
FOX needs this.
GNEDialogACChooser * ACChooserStops
pointer to ACChooser dialog used for locate stops
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
GNEVehicleFrame * getVehicleFrame() const
get frame for GNE_DMODE_VEHICLE
GNEDialogACChooser * ACChooserProhibition
pointer to ACChooser dialog used for locate Prohibitions
GNEDialogACChooser * ACChooserEdges
pointer to ACChooser dialog used for locate edges
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for GNE_DMODE_PERSONFRAME
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for GNE_NMODE_CREATEEDGE
GNEDialogACChooser * ACChooserPolygon
pointer to ACChooser dialog used for locate Polygons
GNECrossingFrame * crossingFrame
frame for GNE_NMODE_CROSSING
GNEPolygonFrame * polygonFrame
frame for GNE_NMODE_POLYGON
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
GNEFrame * getCurrentShownFrame() const
get current frame show
GNEInspectorFrame * inspectorFrame
frame for GNE_NMODE_INSPECT
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_NMODE_CONNECT
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_NMODE_CROSSING
GNERouteFrame * routeFrame
frame for GNE_DMODE_ROUTE
GNEDialogACChooser * ACChooserJunction
pointer to ACChooser dialog used for locate junctions
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_NMODE_DELETE
struct for ACChoosers dialog
void hideAllFrames()
hide all frames
GNEDialogACChooser * ACChooserVehicles
pointer to ACChooser dialog used for locate vehicles
GNEDialogACChooser * ACChooserTLS
pointer to ACChooser dialog used for locate TLSs
GNERouteFrame * getRouteFrame() const
get frame for GNE_DMODE_ROUTE
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
struct for Frames
GNESelectorFrame * selectorFrame
frame for GNE_NMODE_SELECT
GNETAZFrame * TAZFrame
frame for GNE_NMODE_TAZ
GNEDialogACChooser * ACChooserPOI
pointer to ACChooser dialog used for locate POIs
GNEDeleteFrame * deleteFrame
frame for GNE_NMODE_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 used for locate additional