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.dev/sumo
3 // Copyright (C) 2001-2024 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 
35 class GNEDialogACChooser;
36 class GNEFrame;
37 class GNEViewNet;
38 class GNENet;
39 class GNEUndoList;
40 // common frames
41 class GNEDeleteFrame;
42 class GNEInspectorFrame;
43 class GNESelectorFrame;
44 class GNEMoveFrame;
45 // network frames
46 class GNEAdditionalFrame;
47 class GNEConnectorFrame;
48 class GNECreateEdgeFrame;
49 class GNECrossingFrame;
50 class GNEShapeFrame;
52 class GNEWireFrame;
53 class GNEDecalFrame;
54 class GNETAZFrame;
55 class GNETLSEditorFrame;
56 // demand frames
57 class GNEPersonFrame;
58 class GNEPersonPlanFrame;
59 class GNEContainerFrame;
61 class GNERouteFrame;
63 class GNEStopFrame;
64 class GNEVehicleFrame;
65 class GNETypeFrame;
67 // data frames
69 class GNEEdgeDataFrame;
71 class GNETAZRelDataFrame;
72 class GNEMeanDataFrame;
73 
74 
75 // ===========================================================================
76 // class declarations
77 // ===========================================================================
90  FXDECLARE(GNEViewParent)
91 
92 public:
109  GNEViewParent(FXMDIClient* p, FXMDIMenu* mdimenu, const FXString& name, GNEApplicationWindow* parentWindow,
110  FXGLCanvas* share, GNENet* net, GNEUndoList* undoList, FXIcon* ic = nullptr,
111  FXuint opts = 0, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0);
112 
114  ~GNEViewParent();
115 
117  void hideAllFrames();
118 
121 
124 
127 
130 
132  GNEMoveFrame* getMoveFrame() const;
133 
136 
139 
142 
145 
147  GNETAZFrame* getTAZFrame() const;
148 
150  GNEShapeFrame* getShapeFrame() const;
151 
154 
156  GNEWireFrame* getWireFrame() const;
157 
159  GNEDecalFrame* getDecalFrame() const;
160 
163 
165  GNERouteFrame* getRouteFrame() const;
166 
169 
172 
174  GNETypeFrame* getTypeFrame() const;
175 
178 
180  GNEStopFrame* getStopFrame() const;
181 
184 
187 
190 
193 
196 
199 
202 
205 
208  void showFramesArea();
209 
212  void hideFramesArea();
213 
216 
219 
221  void eraseACChooserDialog(GNEDialogACChooser* chooserDialog);
222 
224  void updateUndoRedoButtons();
225 
227  FXVerticalFrame* getFramesArea() const;
228 
230  int getFrameAreaWidth() const;
231 
233  void setFrameAreaWidth(const int frameAreaWith);
234 
238  long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
239 
241  long onCmdClose(FXObject*, FXSelector, void*);
242 
244  long onCmdLocate(FXObject*, FXSelector, void*);
245 
247  long onKeyPress(FXObject* o, FXSelector sel, void* data);
248 
250  long onKeyRelease(FXObject* o, FXSelector sel, void* data);
251 
253  long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
255 
256 protected:
257  FOX_CONSTRUCTOR(GNEViewParent)
258 
259 
261 
262  public:
264  CommonFrames();
265 
267  void buildCommonFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
268 
270  void hideCommonFrames();
271 
273  void setCommonFramesWidth(int frameWidth);
274 
276  bool isCommonFrameShown() const;
277 
280 
282  GNEInspectorFrame* inspectorFrame = nullptr;
283 
285  GNEDeleteFrame* deleteFrame = nullptr;
286 
288  GNESelectorFrame* selectorFrame = nullptr;
289 
291  GNEMoveFrame* moveFrame = nullptr;
292  };
293 
296 
297  public:
299  NetworkFrames();
300 
302  void buildNetworkFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
303 
305  void hideNetworkFrames();
306 
308  void setNetworkFramesWidth(int frameWidth);
309 
311  bool isNetworkFrameShown() const;
312 
315 
318 
321 
324 
327 
329  GNETAZFrame* TAZFrame = nullptr;
330 
333 
336 
339 
342 
345  };
346 
348  class DemandFrames {
349 
350  public:
352  DemandFrames();
353 
355  void buildDemandFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
356 
358  void hideDemandFrames();
359 
361  void setDemandFramesWidth(int frameWidth);
362 
364  bool isDemandFrameShown() const;
365 
368 
371 
374 
377 
380 
383 
386 
389 
392 
395 
398  };
399 
401  class DataFrames {
402 
403  public:
405  DataFrames();
406 
408  void buildDataFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
409 
411  void hideDataFrames();
412 
414  void setDataFramesWidth(int frameWidth);
415 
417  bool isDataFrameShown() const;
418 
421 
424 
427 
430 
433  };
434 
436  class ACChoosers {
437 
438  public:
440  ACChoosers();
441 
443  ~ACChoosers();
444 
447 
450 
453 
456 
459 
462 
465 
468 
471 
474 
477 
480 
483 
486  };
487 
488 private:
491 
493  FXHorizontalFrame* myViewArea;
494 
496  FXVerticalFrame* myFramesArea;
497 
500 
503 
506 
508  FXSplitter* myFramesSplitter;
509 
512 
515 
518 
521 
524 };
The main window of 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 * ACChooserContainers
pointer to ACChooser dialog used for locate containers
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
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
GNEMeanDataFrame * meanDataFrame
frame for DATA_MEANDATA
class for demand frames
GNEPersonFrame * personFrame
frame for DEMAND_PERSON
GNERouteDistributionFrame * routeDistributionFrame
frame for DEMAND_ROUTEDISTRIBUTION
GNEStopFrame * stopFrame
frame for DEMAND_STOP
GNERouteFrame * routeFrame
frame for DEMAND_ROUTE
GNEContainerFrame * containerFrame
frame for DEMAND_CONTAINER
GNETypeDistributionFrame * typeDistributionFrame
frame for DEMAND_TYPEDISTRIBUTION
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
GNETypeFrame * typeFrame
frame for DEMAND_TYPE
bool isDemandFrameShown() const
return true if at least there is a demand frame shown
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
GNEDecalFrame * decalFrame
frame for NETWORK_DECAL
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:88
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.
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.
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for DEMAND_PERSONFRAME
DemandFrames myDemandFrames
struct for demand frames
MFXButtonTooltip * myUndoButton
toolbar undo button
GNEMeanDataFrame * getMeanDataFrame() const
get frame for DATA_TAZRELDATA
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
GNETypeDistributionFrame * getTypeDistributionFrame() const
get frame for DEMAND_TYPEDISTRIBUTION
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
GNEDecalFrame * getDecalFrame() const
get frame for NETWORK_DECAL
void hideAllFrames()
hide all frames
GNETypeFrame * getTypeFrame() const
get frame for DEMAND_TYPE
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
GNERouteDistributionFrame * getRouteDistributionFrame() const
get frame for DEMAND_ROUTEDISTRIBUTION
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
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