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 /****************************************************************************/
GNEViewParent::getVehicleTypeFrame
GNEVehicleTypeFrame * getVehicleTypeFrame() const
get frame for GNE_DMODE_VEHICLETYPE
Definition: GNEViewParent.cpp:257
GNEViewParent::getStopFrame
GNEStopFrame * getStopFrame() const
get frame for GNE_DMODE_STOP
Definition: GNEViewParent.cpp:263
GNEViewParent::ACChoosers::ACChooserStops
GNEDialogACChooser * ACChooserStops
pointer to ACChooser dialog used for locate stops
Definition: GNEViewParent.h:297
GNEViewParent::Frames::vehicleFrame
GNEVehicleFrame * vehicleFrame
frame for GNE_DMODE_VEHICLE
Definition: GNEViewParent.h:258
GNEViewParent::getSelectorFrame
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
Definition: GNEViewParent.cpp:185
GNEAdditionalFrame
Definition: GNEAdditionalFrame.h:34
GNEViewParent::Frames::selectorFrame
GNESelectorFrame * selectorFrame
frame for GNE_NMODE_SELECT
Definition: GNEViewParent.h:225
GNEViewParent::Frames::isFrameShown
bool isFrameShown() const
return true if at least there is a frame shown
Definition: GNEViewParent.cpp:676
GNEViewParent::eraseACChooserDialog
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
Definition: GNEViewParent.cpp:319
GNEProhibitionFrame
Definition: GNEProhibitionFrame.h:39
GNEDeleteFrame
Definition: GNEDeleteFrame.h:32
GNEViewParent::getCreateEdgeFrame
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for GNE_NMODE_CREATEEDGE
Definition: GNEViewParent.cpp:239
GNEViewParent::Frames::connectorFrame
GNEConnectorFrame * connectorFrame
frame for GNE_NMODE_CONNECT
Definition: GNEViewParent.h:228
GNEViewParent::getPolygonFrame
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_NMODE_POLYGON
Definition: GNEViewParent.cpp:227
GNEViewParent::getProhibitionFrame
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_NMODE_PROHIBITION
Definition: GNEViewParent.cpp:233
GNECrossingFrame
Definition: GNECrossingFrame.h:33
GNEViewParent::getGUIMainWindow
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
Definition: GNEViewParent.cpp:307
GNEViewParent::onCmdMakeSnapshot
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
Definition: GNEViewParent.cpp:349
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:78
GNEViewParent::ACChoosers::ACChooserAdditional
GNEDialogACChooser * ACChooserAdditional
pointer to ACChooser dialog used for locate additional
Definition: GNEViewParent.h:303
GNEViewParent::ACChoosers::ACChooserPOI
GNEDialogACChooser * ACChooserPOI
pointer to ACChooser dialog used for locate POIs
Definition: GNEViewParent.h:306
GNEViewParent::Frames::vehicleTypeFrame
GNEVehicleTypeFrame * vehicleTypeFrame
frame for GNE_DMODE_VEHICLETYPE
Definition: GNEViewParent.h:261
GNEViewParent::Frames::getCurrentShownFrame
GNEFrame * getCurrentShownFrame() const
get current frame show
Definition: GNEViewParent.cpp:723
GNEViewParent::myFramesArea
FXHorizontalFrame * myFramesArea
frame to hold GNEFrames
Definition: GNEViewParent.h:322
GNEViewParent::onCmdClose
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
Definition: GNEViewParent.cpp:383
GNEViewParent::ACChoosers::ACChoosers
ACChoosers()
constructor
Definition: GNEViewParent.cpp:772
GNEViewParent::Frames::TLSEditorFrame
GNETLSEditorFrame * TLSEditorFrame
frame for GNE_NMODE_TLS
Definition: GNEViewParent.h:231
GNEViewParent::myACChoosers
ACChoosers myACChoosers
struct for ACChoosers
Definition: GNEViewParent.h:331
GNETAZFrame
Definition: GNETAZFrame.h:39
GNEVehicleTypeFrame
Definition: GNEVehicleTypeFrame.h:38
GNEFrame
Definition: GNEFrame.h:35
GNEViewParent::getConnectorFrame
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_NMODE_CONNECT
Definition: GNEViewParent.cpp:191
GNEViewParent::getTAZFrame
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
Definition: GNEViewParent.cpp:215
GNEViewParent::myFramesSplitter
FXSplitter * myFramesSplitter
Splitter to divide ViewNet und GNEFrames.
Definition: GNEViewParent.h:325
GNEViewParent::Frames::inspectorFrame
GNEInspectorFrame * inspectorFrame
frame for GNE_NMODE_INSPECT
Definition: GNEViewParent.h:222
GNEApplicationWindow
The main window of the Netedit.
Definition: GNEApplicationWindow.h:59
GNEViewParent::getDeleteFrame
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_NMODE_DELETE
Definition: GNEViewParent.cpp:221
GNEViewParent::myGNEAppWindows
GNEApplicationWindow * myGNEAppWindows
pointer to GNEApplicationWindow
Definition: GNEViewParent.h:316
GNEViewParent::Frames::routeFrame
GNERouteFrame * routeFrame
frame for GNE_DMODE_ROUTE
Definition: GNEViewParent.h:255
GNEViewParent::onKeyPress
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
Definition: GNEViewParent.cpp:578
GNEViewParent::Frames::additionalFrame
GNEAdditionalFrame * additionalFrame
frame for GNE_NMODE_ADDITIONAL
Definition: GNEViewParent.h:234
GNEViewParent::hideFramesArea
void hideFramesArea()
hide frames area if all GNEFrames are hidden
Definition: GNEViewParent.cpp:297
GNEViewParent::Frames::deleteFrame
GNEDeleteFrame * deleteFrame
frame for GNE_NMODE_DELETE
Definition: GNEViewParent.h:243
GNEViewParent::ACChoosers::~ACChoosers
~ACChoosers()
destructor
Definition: GNEViewParent.cpp:786
GNEViewParent::Frames::prohibitionFrame
GNEProhibitionFrame * prohibitionFrame
frame for GNE_NMODE_PROHIBITION
Definition: GNEViewParent.h:249
GNEViewParent::ACChoosers::ACChooserVehicles
GNEDialogACChooser * ACChooserVehicles
pointer to ACChooser dialog used for locate vehicles
Definition: GNEViewParent.h:291
GNEViewParent::myFrames
Frames myFrames
struct for frames
Definition: GNEViewParent.h:328
GNEViewParent::ACChoosers::ACChooserTLS
GNEDialogACChooser * ACChooserTLS
pointer to ACChooser dialog used for locate TLSs
Definition: GNEViewParent.h:300
GNEViewParent::onCmdUpdateFrameAreaWidth
long onCmdUpdateFrameAreaWidth(FXObject *, FXSelector, void *)
Called when user change the splitter between FrameArea and ViewNet.
Definition: GNEViewParent.cpp:592
GNEViewParent::GNEViewParent
GNEViewParent()
FOX needs this.
Definition: GNEViewParent.h:201
GNEViewParent
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:72
GNEConnectorFrame
Definition: GNEConnectorFrame.h:33
GNESelectorFrame
Definition: GNESelectorFrame.h:33
GNEViewParent::Frames::polygonFrame
GNEPolygonFrame * polygonFrame
frame for GNE_NMODE_POLYGON
Definition: GNEViewParent.h:246
GNEViewParent::ACChoosers::ACChooserEdges
GNEDialogACChooser * ACChooserEdges
pointer to ACChooser dialog used for locate edges
Definition: GNEViewParent.h:288
GNEViewParent::showFramesArea
void showFramesArea()
show frames area if at least a GNEFrame is showed
Definition: GNEViewParent.cpp:287
GNEPersonTypeFrame
Definition: GNEPersonTypeFrame.h:38
GNEViewParent::myViewArea
FXHorizontalFrame * myViewArea
frame to hold myView and myAttributePanel
Definition: GNEViewParent.h:319
GNEViewParent::Frames::crossingFrame
GNECrossingFrame * crossingFrame
frame for GNE_NMODE_CROSSING
Definition: GNEViewParent.h:237
GNEViewParent::ACChoosers::ACChooserProhibition
GNEDialogACChooser * ACChooserProhibition
pointer to ACChooser dialog used for locate Prohibitions
Definition: GNEViewParent.h:312
GNEViewParent::onKeyRelease
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
Definition: GNEViewParent.cpp:585
GNEPersonFrame
Definition: GNEPersonFrame.h:33
GNEViewParent::Frames::personPlanFrame
GNEPersonPlanFrame * personPlanFrame
frame for GNE_DMODE_PERSONPLAN
Definition: GNEViewParent.h:273
GNEViewParent::getPersonPlanFrame
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for GNE_DMODE_PERSONFRAME
Definition: GNEViewParent.cpp:281
GNEViewParent::ACChoosers::ACChooserPolygon
GNEDialogACChooser * ACChooserPolygon
pointer to ACChooser dialog used for locate Polygons
Definition: GNEViewParent.h:309
GNEViewParent::Frames::createEdgeFrame
GNECreateEdgeFrame * createEdgeFrame
frame for GNE_NMODE_CREATEDGE
Definition: GNEViewParent.h:252
GNERouteFrame
Definition: GNERouteFrame.h:32
GNEViewParent::getInspectorFrame
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_NMODE_INSPECT
Definition: GNEViewParent.cpp:179
GNEViewParent::getAdditionalFrame
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_NMODE_ADDITIONAL
Definition: GNEViewParent.cpp:203
GNEVehicleFrame
Definition: GNEVehicleFrame.h:33
GNEViewParent::~GNEViewParent
~GNEViewParent()
Destructor.
Definition: GNEViewParent.cpp:158
GNEViewParent::Frames
struct for Frames
Definition: GNEViewParent.h:205
GNEViewParent::ACChoosers::ACChooserJunction
GNEDialogACChooser * ACChooserJunction
pointer to ACChooser dialog used for locate junctions
Definition: GNEViewParent.h:285
GNEStopFrame
Definition: GNEStopFrame.h:34
GNEViewParent::Frames::personFrame
GNEPersonFrame * personFrame
frame for GNE_DMODE_PERSON
Definition: GNEViewParent.h:267
GNEViewParent::ACChoosers::ACChooserRoutes
GNEDialogACChooser * ACChooserRoutes
pointer to ACChooser dialog used for locate routes
Definition: GNEViewParent.h:294
GNEViewParent::Frames::hideFrames
void hideFrames()
hide frames
Definition: GNEViewParent.cpp:625
GNEViewParent::getCurrentShownFrame
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
Definition: GNEViewParent.cpp:173
GNEViewParent::getGNEAppWindows
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
Definition: GNEViewParent.cpp:313
GUIMainWindow
Definition: GUIMainWindow.h:47
GNEViewParent::hideAllFrames
void hideAllFrames()
hide all frames
Definition: GNEViewParent.cpp:167
GNEPolygonFrame
Definition: GNEPolygonFrame.h:34
GNEViewParent::getRouteFrame
GNERouteFrame * getRouteFrame() const
get frame for GNE_DMODE_ROUTE
Definition: GNEViewParent.cpp:245
GNEViewParent::Frames::stopFrame
GNEStopFrame * stopFrame
frame for GNE_DMODE_STOP
Definition: GNEViewParent.h:264
GUIGlChildWindow.h
GNEViewParent::getPersonFrame
GNEPersonFrame * getPersonFrame() const
get frame for GNE_DMODE_PERSON
Definition: GNEViewParent.cpp:275
GNEViewParent::Frames::personTypeFrame
GNEPersonTypeFrame * personTypeFrame
frame for GNE_DMODE_PERSONTYPE
Definition: GNEViewParent.h:270
GNEViewParent::getTLSEditorFrame
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
Definition: GNEViewParent.cpp:197
GNEViewParent::onCmdLocate
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
Definition: GNEViewParent.cpp:390
GNEViewParent::ACChoosers
struct for ACChoosers dialog
Definition: GNEViewParent.h:277
GNEViewParent::getPersonTypeFrame
GNEPersonTypeFrame * getPersonTypeFrame() const
get frame for GNE_DMODE_PERSONTYPE
Definition: GNEViewParent.cpp:269
config.h
GNEViewParent::Frames::Frames
Frames()
constructor
Definition: GNEViewParent.cpp:602
GNETLSEditorFrame
Definition: GNETLSEditorFrame.h:41
GNEViewParent::Frames::setWidth
void setWidth(int frameWidth)
set new width in all frames
Definition: GNEViewParent.cpp:650
GNEUndoList
Definition: GNEUndoList.h:49
GUIGlChildWindow
Definition: GUIGlChildWindow.h:41
GNEPersonPlanFrame
Definition: GNEPersonPlanFrame.h:33
GNEInspectorFrame
Definition: GNEInspectorFrame.h:34
GNECreateEdgeFrame
Definition: GNECreateEdgeFrame.h:33
GNEViewParent::getVehicleFrame
GNEVehicleFrame * getVehicleFrame() const
get frame for GNE_DMODE_VEHICLE
Definition: GNEViewParent.cpp:251
GNEDialogACChooser
Definition: GNEDialogACChooser.h:50
GNEViewParent::Frames::TAZFrame
GNETAZFrame * TAZFrame
frame for GNE_NMODE_TAZ
Definition: GNEViewParent.h:240
GNEViewParent::getCrossingFrame
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_NMODE_CROSSING
Definition: GNEViewParent.cpp:209