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-2022 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// A single child window which contains a view of the edited network (adapted
19// from GUISUMOViewParent)
20// While we don't actually need MDI for netedit it is easier to adapt existing
21// structures than to write everything from scratch.
22/****************************************************************************/
23#pragma once
24#include <config.h>
25
28
29
30// ===========================================================================
31// class declarations
32// ===========================================================================
33
36class GNEFrame;
37class GNEViewNet;
38class GNENet;
39class GNEUndoList;
40// common frames
41class GNEDeleteFrame;
44class GNEMoveFrame;
45// network frames
50class GNEShapeFrame;
52class GNEWireFrame;
53class GNETAZFrame;
55// demand frames
56class GNEPersonFrame;
60class GNERouteFrame;
61class GNEStopFrame;
62class GNEVehicleFrame;
63class GNETypeFrame;
64// data frames
69
70
71// ===========================================================================
72// class declarations
73// ===========================================================================
86 FXDECLARE(GNEViewParent)
87
88public:
106 GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu, const FXString& name, GNEApplicationWindow* parentWindow,
107 FXGLCanvas* share, GNENet* net, const bool newNet, GNEUndoList* undoList, FXIcon* ic = nullptr,
108 FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
109
112
114 void hideAllFrames();
115
118
121
124
127
129 GNEMoveFrame* getMoveFrame() const;
130
133
136
139
142
144 GNETAZFrame* getTAZFrame() const;
145
148
151
153 GNEWireFrame* getWireFrame() const;
154
157
160
163
165 GNETypeFrame* getTypeFrame() const;
166
168 GNEStopFrame* getStopFrame() const;
169
172
175
178
181
184
187
190
193 void showFramesArea();
194
197 void hideFramesArea();
198
201
204
206 void eraseACChooserDialog(GNEDialogACChooser* chooserDialog);
207
210
212 FXVerticalFrame* getFramesArea() const;
213
215 int getFrameAreaWidth() const;
216
218 void setFrameAreaWidth(const int frameAreaWith);
219
223 long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
224
226 long onCmdClose(FXObject*, FXSelector, void*);
227
229 long onCmdLocate(FXObject*, FXSelector, void*);
230
232 long onKeyPress(FXObject* o, FXSelector sel, void* data);
233
235 long onKeyRelease(FXObject* o, FXSelector sel, void* data);
236
238 long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
240
241protected:
242 FOX_CONSTRUCTOR(GNEViewParent)
243
244
246
247 public:
249 CommonFrames();
250
252 void buildCommonFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
253
255 void hideCommonFrames();
256
258 void setCommonFramesWidth(int frameWidth);
259
261 bool isCommonFrameShown() const;
262
265
268
271
274
277 };
278
281
282 public:
285
287 void buildNetworkFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
288
290 void hideNetworkFrames();
291
293 void setNetworkFramesWidth(int frameWidth);
294
296 bool isNetworkFrameShown() const;
297
300
303
306
309
312
315
318
321
324
327 };
328
331
332 public:
334 DemandFrames();
335
337 void buildDemandFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
338
340 void hideDemandFrames();
341
343 void setDemandFramesWidth(int frameWidth);
344
346 bool isDemandFrameShown() const;
347
350
353
356
359
362
365
368
371
374 };
375
378
379 public:
381 DataFrames();
382
384 void buildDataFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
385
387 void hideDataFrames();
388
390 void setDataFramesWidth(int frameWidth);
391
393 bool isDataFrameShown() const;
394
397
400
403
406 };
407
410
411 public:
413 ACChoosers();
414
416 ~ACChoosers();
417
420
423
426
429
432
435
438
441
444
447
450
453
456 };
457
458private:
461
463 FXHorizontalFrame* myViewArea;
464
466 FXVerticalFrame* myFramesArea;
467
470
473
476
478 FXSplitter* myFramesSplitter;
479
482
485
488
491
494};
The main window of the Netedit.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:42
struct for ACChoosers dialog
GNEDialogACChooser * ACChooserWalkingAreas
pointer to ACChooser dialog used for locate walkingareas
GNEDialogACChooser * ACChooserStops
pointer to ACChooser dialog used for locate stops
GNEDialogACChooser * ACChooserEdges
pointer to ACChooser dialog used for locate edges
GNEDialogACChooser * ACChooserPolygon
pointer to ACChooser dialog used for locate Polygons
GNEDialogACChooser * ACChooserPOI
pointer to ACChooser dialog used for locate POIs
GNEDialogACChooser * ACChooserRoutes
pointer to ACChooser dialog used for locate routes
GNEDialogACChooser * ACChooserJunction
pointer to ACChooser dialog used for locate junctions
GNEDialogACChooser * ACChooserWire
pointer to ACChooser dialog used for locate Wires
GNEDialogACChooser * ACChooserVehicles
pointer to ACChooser dialog used for locate vehicles
GNEDialogACChooser * ACChooserTLS
pointer to ACChooser dialog used for locate TLSs
GNEDialogACChooser * ACChooserProhibition
pointer to ACChooser dialog used for locate Prohibitions
GNEDialogACChooser * ACChooserPersons
pointer to ACChooser dialog used for locate persons
GNEDialogACChooser * ACChooserAdditional
pointer to ACChooser dialog used for locate additional
class for common frames
GNEMoveFrame * moveFrame
frame for move elements
GNEDeleteFrame * deleteFrame
frame for delete elements
GNESelectorFrame * selectorFrame
frame for select elements
GNEInspectorFrame * inspectorFrame
frame for inspect elements
class for data frames
GNEEdgeDataFrame * edgeDataFrame
frame for DATA_EDGEDATA
void setDataFramesWidth(int frameWidth)
set new width in all data frames
GNEFrame * getCurrentShownFrame() const
get current data frame show
GNETAZRelDataFrame * TAZRelDataFrame
frame for DATA_TAZRELDATA
GNEEdgeRelDataFrame * edgeRelDataFrame
frame for DATA_EDGERELDATA
bool isDataFrameShown() const
return true if at least there is a data frame shown
void hideDataFrames()
hide data frames
void buildDataFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build data frames
class for demand frames
GNEPersonFrame * personFrame
frame for DEMAND_PERSON
GNEStopFrame * stopFrame
frame for DEMAND_STOP
GNERouteFrame * routeFrame
frame for DEMAND_ROUTE
GNEContainerFrame * containerFrame
frame for DEMAND_CONTAINER
GNEContainerPlanFrame * containerPlanFrame
frame for DEMAND_CONTAINERPLAN
GNEVehicleFrame * vehicleFrame
frame for DEMAND_VEHICLE
GNEFrame * getCurrentShownFrame() const
get current demand frame show
void setDemandFramesWidth(int frameWidth)
set new width in all demand frames
void buildDemandFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build demand frames
GNEPersonPlanFrame * personPlanFrame
frame for DEMAND_PERSONPLAN
bool isDemandFrameShown() const
return true if at least there is a demand frame shown
GNETypeFrame * vehicleTypeFrame
frame for DEMAND_VEHICLETYPE
void hideDemandFrames()
hide demand frames
class for network frames
GNEAdditionalFrame * additionalFrame
frame for NETWORK_ADDITIONAL
bool isNetworkFrameShown() const
return true if at least there is a network frame shown
GNECrossingFrame * crossingFrame
frame for NETWORK_CROSSING
GNEConnectorFrame * connectorFrame
frame for NETWORK_CONNECT
GNECreateEdgeFrame * createEdgeFrame
frame for NETWORK_CREATEDGE
GNEProhibitionFrame * prohibitionFrame
frame for NETWORK_PROHIBITION
GNEShapeFrame * polygonFrame
frame for NETWORK_SHAPE
GNETAZFrame * TAZFrame
frame for NETWORK_TAZ
GNETLSEditorFrame * TLSEditorFrame
frame for NETWORK_TLS
GNEFrame * getCurrentShownFrame() const
get current network frame show
GNEWireFrame * wireFrame
frame for NETWORK_WIRE
void hideNetworkFrames()
hide network frames
void setNetworkFramesWidth(int frameWidth)
set new width in all network frames
void buildNetworkFrames(GNEViewParent *viewParent, GNEViewNet *viewNet)
build network frames
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:84
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
GNECrossingFrame * getCrossingFrame() const
get frame for NETWORK_CROSSING
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
GNEConnectorFrame * getConnectorFrame() const
get frame for NETWORK_CONNECT
GNEStopFrame * getStopFrame() const
get frame for DEMAND_STOP
void updateUndoRedoButtons()
update toolbar undo/redo buttons (called when user press Ctrl+Z/Y)
long onCmdUpdateFrameAreaWidth(FXObject *, FXSelector, void *)
Called when user change the splitter between FrameArea and ViewNet.
GNEProhibitionFrame * getProhibitionFrame() const
get frame for NETWORK_PROHIBITION
long onKeyPress(FXObject *o, FXSelector sel, void *data)
Called when user press a key.
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for DEMAND_PERSONFRAME
DemandFrames myDemandFrames
struct for demand frames
MFXButtonTooltip * myUndoButton
toolbar undo button
GNEShapeFrame * getShapeFrame() const
get frame for NETWORK_SHAPE
void setFrameAreaWidth(const int frameAreaWith)
set frame area width
GNETAZRelDataFrame * getTAZRelDataFrame() const
get frame for DATA_TAZRELDATA
GNEMoveFrame * getMoveFrame() const
get frame for move elements
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user hits the close button (x)
GNESelectorFrame * getSelectorFrame() const
get frame for select elements
GNEContainerPlanFrame * getContainerPlanFrame() const
get frame for DEMAND_CONTAINERFRAME
void hideFramesArea()
hide frames area if all GNEFrames are hidden
FXHorizontalFrame * myViewArea
frame to hold myView and myAttributePanel
GNEEdgeDataFrame * getEdgeDataFrame() const
get frame for DATA_EDGEDATA
GNEDeleteFrame * getDeleteFrame() const
get frame for delete elements
MFXButtonTooltip * myComputePathManagerButton
compute Path manager button
NetworkFrames myNetworkFrames
struct for network frames
ACChoosers myACChoosers
struct for ACChoosers
GNEVehicleFrame * getVehicleFrame() const
get frame for DEMAND_VEHICLE
void showFramesArea()
show frames area if at least a GNEFrame is showed
void hideAllFrames()
hide all frames
GNETypeFrame * getTypeFrame() const
get frame for DEMAND_VEHICLETYPE
FXVerticalFrame * myFramesArea
frame to hold GNEFrames
GNETAZFrame * getTAZFrame() const
get frame for NETWORK_TAZ
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for NETWORK_TLS
CommonFrames myCommonFrames
struct for common frames
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
DataFrames myDataFrames
struct for data frames
GNEContainerFrame * getContainerFrame() const
get frame for DEMAND_CONTAINER
GNEAdditionalFrame * getAdditionalFrame() const
get frame for NETWORK_ADDITIONAL
GNEWireFrame * getWireFrame() const
get frame for NETWORK_WIRE
FXVerticalFrame * getFramesArea() const
get frame area
GNEPersonFrame * getPersonFrame() const
get frame for DEMAND_PERSON
FXSplitter * myFramesSplitter
Splitter to divide ViewNet und GNEFrames.
void eraseACChooserDialog(GNEDialogACChooser *chooserDialog)
remove created chooser dialog
GNEInspectorFrame * getInspectorFrame() const
get frame for inspect elements
GNEApplicationWindow * myGNEAppWindows
pointer to GNEApplicationWindow
GNEEdgeRelDataFrame * getEdgeRelDataFrame() const
get frame for DATA_EDGERELDATA
MFXButtonTooltip * myRedoButton
toolbar redo button
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for NETWORK_CREATEEDGE
GNEViewParent(FXMDIClient *p, FXMDIMenu *mdimenu, const FXString &name, GNEApplicationWindow *parentWindow, FXGLCanvas *share, GNENet *net, const bool newNet, GNEUndoList *undoList, FXIcon *ic=nullptr, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
FOX-declaration.
int getFrameAreaWidth() const
get frame area width
GNERouteFrame * getRouteFrame() const
get frame for DEMAND_ROUTE
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
~GNEViewParent()
Destructor.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Called when user releases a key.
every row value