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 /****************************************************************************/
14 // A single child window which contains a view of the edited network (adapted
15 // from GUISUMOViewParent)
16 // While we don't actually need MDI for netedit it is easier to adapt existing
17 // structures than to write everything from scratch.
18 /****************************************************************************/
19 #ifndef GNEViewParent_h
20 #define GNEViewParent_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
29 
30 
31 // ===========================================================================
32 // class declarations
33 // ===========================================================================
34 class GNEAdditionalFrame;
36 class GNEConnectorFrame;
37 class GNECreateEdgeFrame;
38 class GNECrossingFrame;
39 class GNEDeleteFrame;
40 class GNEDialogACChooser;
41 class GNEInspectorFrame;
42 class GNENet;
43 class GNEFrame;
44 class GNEPolygonFrame;
46 class GNERouteFrame;
47 class GNESelectorFrame;
48 class GNETAZFrame;
49 class GNETLSEditorFrame;
50 class GNEUndoList;
51 class GNEVehicleFrame;
53 class GNEStopFrame;
54 class GNEPersonTypeFrame;
55 class GNEPersonFrame;
56 class GNEPersonPlanFrame;
57 
58 // ===========================================================================
59 // class declarations
60 // ===========================================================================
73  FXDECLARE(GNEViewParent)
74 
75 public:
92  GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
93  const FXString& name, GNEApplicationWindow* parentWindow,
94  FXGLCanvas* share, GNENet* net, GNEUndoList* undoList,
95  FXIcon* ic = nullptr, FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
96 
99 
101  void hideAllFrames();
102 
105 
108 
111 
114 
117 
120 
123 
125  GNETAZFrame* getTAZFrame() const;
126 
129 
132 
135 
138 
140  GNERouteFrame* getRouteFrame() const;
141 
144 
147 
149  GNEStopFrame* getStopFrame() const;
150 
153 
156 
159 
162  void showFramesArea();
163 
166  void hideFramesArea();
167 
170 
173 
175  void eraseACChooserDialog(GNEDialogACChooser* chooserDialog);
176 
178  void updateUndoRedoButtons();
179 
183  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
184 
186  long onCmdClose(FXObject*, FXSelector, void*);
187 
189  long onCmdLocate(FXObject*, FXSelector, void*);
190 
192  long onKeyPress(FXObject* o, FXSelector sel, void* data);
193 
195  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
196 
198  long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
200 
201 protected:
203 
204 private:
206  struct Frames {
208  Frames();
209 
211  void hideFrames();
212 
214  void setWidth(int frameWidth);
215 
217  bool isFrameShown() const;
218 
221 
224 
227 
230 
233 
236 
239 
242 
245 
248 
251 
254 
257 
260 
263 
266 
269 
272 
275  };
276 
278  struct ACChoosers {
280  ACChoosers();
281 
283  ~ACChoosers();
284 
287 
290 
293 
296 
299 
302 
305 
308 
311 
314 
317  };
318 
321 
323  FXHorizontalFrame* myViewArea;
324 
326  FXHorizontalFrame* myFramesArea;
327 
329  FXButton* myUndoButton;
330 
332  FXButton* myRedoButton;
333 
335  FXSplitter* myFramesSplitter;
336 
339 
342 };
343 
344 
345 #endif
346 
347 /****************************************************************************/
GNEViewParent::getVehicleTypeFrame
GNEVehicleTypeFrame * getVehicleTypeFrame() const
get frame for GNE_DMODE_VEHICLETYPE
Definition: GNEViewParent.cpp:258
GNEViewParent::getStopFrame
GNEStopFrame * getStopFrame() const
get frame for GNE_DMODE_STOP
Definition: GNEViewParent.cpp:264
GNEViewParent::ACChoosers::ACChooserStops
GNEDialogACChooser * ACChooserStops
pointer to ACChooser dialog used for locate stops
Definition: GNEViewParent.h:301
GNEViewParent::Frames::vehicleFrame
GNEVehicleFrame * vehicleFrame
frame for GNE_DMODE_VEHICLE
Definition: GNEViewParent.h:259
GNEViewParent::getSelectorFrame
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
Definition: GNEViewParent.cpp:186
GNEAdditionalFrame
Definition: GNEAdditionalFrame.h:34
GNEViewParent::Frames::selectorFrame
GNESelectorFrame * selectorFrame
frame for GNE_NMODE_SELECT
Definition: GNEViewParent.h:226
GNEViewParent::Frames::isFrameShown
bool isFrameShown() const
return true if at least there is a frame shown
Definition: GNEViewParent.cpp:706
GNEViewParent::eraseACChooserDialog
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
Definition: GNEViewParent.cpp:320
GNEProhibitionFrame
Definition: GNEProhibitionFrame.h:38
GNEDeleteFrame
Definition: GNEDeleteFrame.h:31
GNEViewParent::getCreateEdgeFrame
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for GNE_NMODE_CREATEEDGE
Definition: GNEViewParent.cpp:240
GNEViewParent::updateUndoRedoButtons
void updateUndoRedoButtons()
update toolbar undo/redo buttons (called when user press Ctrl+Z/Y)
Definition: GNEViewParent.cpp:352
GNEViewParent::Frames::connectorFrame
GNEConnectorFrame * connectorFrame
frame for GNE_NMODE_CONNECT
Definition: GNEViewParent.h:229
GNEViewParent::getPolygonFrame
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_NMODE_POLYGON
Definition: GNEViewParent.cpp:228
GNEViewParent::getProhibitionFrame
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_NMODE_PROHIBITION
Definition: GNEViewParent.cpp:234
GNECrossingFrame
Definition: GNECrossingFrame.h:32
GNEViewParent::getGUIMainWindow
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
Definition: GNEViewParent.cpp:308
GNEViewParent::onCmdMakeSnapshot
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
Definition: GNEViewParent.cpp:359
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:77
GNEViewParent::ACChoosers::ACChooserAdditional
GNEDialogACChooser * ACChooserAdditional
pointer to ACChooser dialog used for locate additional
Definition: GNEViewParent.h:307
GNEViewParent::ACChoosers::ACChooserPOI
GNEDialogACChooser * ACChooserPOI
pointer to ACChooser dialog used for locate POIs
Definition: GNEViewParent.h:310
GNEViewParent::Frames::vehicleTypeFrame
GNEVehicleTypeFrame * vehicleTypeFrame
frame for GNE_DMODE_VEHICLETYPE
Definition: GNEViewParent.h:262
GNEViewParent::Frames::getCurrentShownFrame
GNEFrame * getCurrentShownFrame() const
get current frame show
Definition: GNEViewParent.cpp:753
GNEViewParent::myFramesArea
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
Definition: GNEViewParent.h:326
GNEViewParent::onCmdClose
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
Definition: GNEViewParent.cpp:393
GNEViewParent::ACChoosers::ACChoosers
ACChoosers()
constructor
Definition: GNEViewParent.cpp:802
GNEViewParent::Frames::TLSEditorFrame
GNETLSEditorFrame * TLSEditorFrame
frame for GNE_NMODE_TLS
Definition: GNEViewParent.h:232
GNEViewParent::myACChoosers
ACChoosers myACChoosers
struct for ACChoosers
Definition: GNEViewParent.h:341
GNETAZFrame
Definition: GNETAZFrame.h:40
GNEVehicleTypeFrame
Definition: GNEVehicleTypeFrame.h:37
GNEFrame
Definition: GNEFrame.h:34
GNEViewParent::getConnectorFrame
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_NMODE_CONNECT
Definition: GNEViewParent.cpp:192
GNEViewParent::getTAZFrame
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
Definition: GNEViewParent.cpp:216
GNEViewParent::myFramesSplitter
FXSplitter * myFramesSplitter
Splitter to divide ViewNet und GNEFrames.
Definition: GNEViewParent.h:335
GNEViewParent::Frames::inspectorFrame
GNEInspectorFrame * inspectorFrame
frame for GNE_NMODE_INSPECT
Definition: GNEViewParent.h:223
GNEApplicationWindow
The main window of the Netedit.
Definition: GNEApplicationWindow.h:58
GNEViewParent::getDeleteFrame
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_NMODE_DELETE
Definition: GNEViewParent.cpp:222
GNEViewParent::myGNEAppWindows
GNEApplicationWindow * myGNEAppWindows
pointer to GNEApplicationWindow
Definition: GNEViewParent.h:320
GNEViewParent::Frames::routeFrame
GNERouteFrame * routeFrame
frame for GNE_DMODE_ROUTE
Definition: GNEViewParent.h:256
GNEViewParent::onKeyPress
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
Definition: GNEViewParent.cpp:608
GNEViewParent::Frames::additionalFrame
GNEAdditionalFrame * additionalFrame
frame for GNE_NMODE_ADDITIONAL
Definition: GNEViewParent.h:235
GNEViewParent::hideFramesArea
void hideFramesArea()
hide frames area if all GNEFrames are hidden
Definition: GNEViewParent.cpp:298
GNEViewParent::Frames::deleteFrame
GNEDeleteFrame * deleteFrame
frame for GNE_NMODE_DELETE
Definition: GNEViewParent.h:244
GNEViewParent::ACChoosers::~ACChoosers
~ACChoosers()
destructor
Definition: GNEViewParent.cpp:817
GNEViewParent::Frames::prohibitionFrame
GNEProhibitionFrame * prohibitionFrame
frame for GNE_NMODE_PROHIBITION
Definition: GNEViewParent.h:250
GNEViewParent::ACChoosers::ACChooserVehicles
GNEDialogACChooser * ACChooserVehicles
pointer to ACChooser dialog used for locate vehicles
Definition: GNEViewParent.h:292
GNEViewParent::myFrames
Frames myFrames
struct for frames
Definition: GNEViewParent.h:338
GNEViewParent::myUndoButton
FXButton * myUndoButton
toolbar undo button
Definition: GNEViewParent.h:329
GNEViewParent::ACChoosers::ACChooserTLS
GNEDialogACChooser * ACChooserTLS
pointer to ACChooser dialog used for locate TLSs
Definition: GNEViewParent.h:304
GNEViewParent::onCmdUpdateFrameAreaWidth
long onCmdUpdateFrameAreaWidth(FXObject *, FXSelector, void *)
Called when user change the splitter between FrameArea and ViewNet.
Definition: GNEViewParent.cpp:622
GNEViewParent
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:71
GNEConnectorFrame
Definition: GNEConnectorFrame.h:34
GNEViewParent::myRedoButton
FXButton * myRedoButton
toolbar redo button
Definition: GNEViewParent.h:332
GNESelectorFrame
Definition: GNESelectorFrame.h:32
GNEViewParent::Frames::polygonFrame
GNEPolygonFrame * polygonFrame
frame for GNE_NMODE_POLYGON
Definition: GNEViewParent.h:247
GNEViewParent::ACChoosers::ACChooserEdges
GNEDialogACChooser * ACChooserEdges
pointer to ACChooser dialog used for locate edges
Definition: GNEViewParent.h:289
GNEViewParent::showFramesArea
void showFramesArea()
show frames area if at least a GNEFrame is showed
Definition: GNEViewParent.cpp:288
GNEPersonTypeFrame
Definition: GNEPersonTypeFrame.h:37
GNEViewParent::myViewArea
FXHorizontalFrame * myViewArea
frame to hold myView and myAttributePanel
Definition: GNEViewParent.h:323
GNEViewParent::Frames::crossingFrame
GNECrossingFrame * crossingFrame
frame for GNE_NMODE_CROSSING
Definition: GNEViewParent.h:238
GNEViewParent::ACChoosers::ACChooserProhibition
GNEDialogACChooser * ACChooserProhibition
pointer to ACChooser dialog used for locate Prohibitions
Definition: GNEViewParent.h:316
GNEViewParent::onKeyRelease
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
Definition: GNEViewParent.cpp:615
GNEPersonFrame
Definition: GNEPersonFrame.h:32
GNEViewParent::Frames::personPlanFrame
GNEPersonPlanFrame * personPlanFrame
frame for GNE_DMODE_PERSONPLAN
Definition: GNEViewParent.h:274
GNEViewParent::getPersonPlanFrame
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for GNE_DMODE_PERSONFRAME
Definition: GNEViewParent.cpp:282
GNEViewParent::ACChoosers::ACChooserPolygon
GNEDialogACChooser * ACChooserPolygon
pointer to ACChooser dialog used for locate Polygons
Definition: GNEViewParent.h:313
GNEViewParent::Frames::createEdgeFrame
GNECreateEdgeFrame * createEdgeFrame
frame for GNE_NMODE_CREATEDGE
Definition: GNEViewParent.h:253
GNERouteFrame
Definition: GNERouteFrame.h:31
GNEViewParent::GNEViewParent
GNEViewParent(FXMDIClient *p, FXMDIMenu *mdimenu, const FXString &name, GNEApplicationWindow *parentWindow, FXGLCanvas *share, GNENet *net, GNEUndoList *undoList, FXIcon *ic=nullptr, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
FOX-declaration.
Definition: GNEViewParent.cpp:85
FOX_CONSTRUCTOR
#define FOX_CONSTRUCTOR(classname)
Definition: config.h:13
GNEViewParent::getInspectorFrame
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_NMODE_INSPECT
Definition: GNEViewParent.cpp:180
GNEViewParent::getAdditionalFrame
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_NMODE_ADDITIONAL
Definition: GNEViewParent.cpp:204
GNEVehicleFrame
Definition: GNEVehicleFrame.h:32
GNEViewParent::~GNEViewParent
~GNEViewParent()
Destructor.
Definition: GNEViewParent.cpp:159
GNEViewParent::Frames
struct for Frames
Definition: GNEViewParent.h:206
GNEViewParent::ACChoosers::ACChooserJunction
GNEDialogACChooser * ACChooserJunction
pointer to ACChooser dialog used for locate junctions
Definition: GNEViewParent.h:286
GNEStopFrame
Definition: GNEStopFrame.h:33
GNEViewParent::Frames::personFrame
GNEPersonFrame * personFrame
frame for GNE_DMODE_PERSON
Definition: GNEViewParent.h:268
GNEViewParent::ACChoosers::ACChooserRoutes
GNEDialogACChooser * ACChooserRoutes
pointer to ACChooser dialog used for locate routes
Definition: GNEViewParent.h:298
GNEViewParent::Frames::hideFrames
void hideFrames()
hide frames
Definition: GNEViewParent.cpp:655
GNEViewParent::getCurrentShownFrame
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
Definition: GNEViewParent.cpp:174
GNEViewParent::getGNEAppWindows
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
Definition: GNEViewParent.cpp:314
GUIMainWindow
Definition: GUIMainWindow.h:46
GNEViewParent::hideAllFrames
void hideAllFrames()
hide all frames
Definition: GNEViewParent.cpp:168
GNEPolygonFrame
Definition: GNEPolygonFrame.h:33
GNEViewParent::getRouteFrame
GNERouteFrame * getRouteFrame() const
get frame for GNE_DMODE_ROUTE
Definition: GNEViewParent.cpp:246
GNEViewParent::Frames::stopFrame
GNEStopFrame * stopFrame
frame for GNE_DMODE_STOP
Definition: GNEViewParent.h:265
GUIGlChildWindow.h
GNEViewParent::getPersonFrame
GNEPersonFrame * getPersonFrame() const
get frame for GNE_DMODE_PERSON
Definition: GNEViewParent.cpp:276
GNEViewParent::ACChoosers::ACChooserPersons
GNEDialogACChooser * ACChooserPersons
pointer to ACChooser dialog used for locate persons
Definition: GNEViewParent.h:295
GNEViewParent::Frames::personTypeFrame
GNEPersonTypeFrame * personTypeFrame
frame for GNE_DMODE_PERSONTYPE
Definition: GNEViewParent.h:271
GNEViewParent::getTLSEditorFrame
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
Definition: GNEViewParent.cpp:198
GNEViewParent::onCmdLocate
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
Definition: GNEViewParent.cpp:400
GNEViewParent::ACChoosers
struct for ACChoosers dialog
Definition: GNEViewParent.h:278
GNEViewParent::getPersonTypeFrame
GNEPersonTypeFrame * getPersonTypeFrame() const
get frame for GNE_DMODE_PERSONTYPE
Definition: GNEViewParent.cpp:270
config.h
GNEViewParent::Frames::Frames
Frames()
constructor
Definition: GNEViewParent.cpp:632
GNETLSEditorFrame
Definition: GNETLSEditorFrame.h:40
GNEViewParent::Frames::setWidth
void setWidth(int frameWidth)
set new width in all frames
Definition: GNEViewParent.cpp:680
GNEUndoList
Definition: GNEUndoList.h:48
GUIGlChildWindow
Definition: GUIGlChildWindow.h:40
GNEPersonPlanFrame
Definition: GNEPersonPlanFrame.h:32
GNEInspectorFrame
Definition: GNEInspectorFrame.h:33
GNECreateEdgeFrame
Definition: GNECreateEdgeFrame.h:32
GNEViewParent::getVehicleFrame
GNEVehicleFrame * getVehicleFrame() const
get frame for GNE_DMODE_VEHICLE
Definition: GNEViewParent.cpp:252
GNEDialogACChooser
Definition: GNEDialogACChooser.h:49
GNEViewParent::Frames::TAZFrame
GNETAZFrame * TAZFrame
frame for GNE_NMODE_TAZ
Definition: GNEViewParent.h:241
GNEViewParent::getCrossingFrame
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_NMODE_CROSSING
Definition: GNEViewParent.cpp:210