Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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-2026 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 GNEDecalFrame;
54class GNETAZFrame;
56// demand frames
57class GNEPersonFrame;
61class GNERouteFrame;
63class GNEStopFrame;
64class GNEVehicleFrame;
65class GNETypeFrame;
67// data frames
73
74
75// ===========================================================================
76// class declarations
77// ===========================================================================
90 FXDECLARE(GNEViewParent)
91
92public:
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
115
117 void hideAllFrames();
118
121
124
127
130
132 GNEMoveFrame* getMoveFrame() const;
133
136
139
142
145
147 GNETAZFrame* getTAZFrame() const;
148
151
154
156 GNEWireFrame* getWireFrame() const;
157
160
163
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(GNEACChooserDialog* chooserDialog);
222
224 std::vector<GUIGlID> getObjectIDs(int messageId) const;
225
228
230 FXVerticalFrame* getFramesArea() const;
231
233 int getFrameAreaWidth() const;
234
236 void setFrameAreaWidth(const int frameAreaWith);
237
241 long onCmdMakeSnapshot(FXObject* sender, FXSelector, void*);
242
244 long onCmdClose(FXObject*, FXSelector, void*);
245
247 long onCmdLocate(FXObject*, FXSelector, void*);
248
250 long onKeyPress(FXObject* o, FXSelector sel, void* data);
251
253 long onKeyRelease(FXObject* o, FXSelector sel, void* data);
254
256 long onCmdUpdateFrameAreaWidth(FXObject*, FXSelector, void*);
258
259protected:
260 FOX_CONSTRUCTOR(GNEViewParent)
261
262
264
265 public:
267 CommonFrames();
268
270 void buildCommonFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
271
273 void hideCommonFrames();
274
276 void setCommonFramesWidth(int frameWidth);
277
279 bool isCommonFrameShown() const;
280
283
285 GNEInspectorFrame* inspectorFrame = nullptr;
286
288 GNEDeleteFrame* deleteFrame = nullptr;
289
291 GNESelectorFrame* selectorFrame = nullptr;
292
294 GNEMoveFrame* moveFrame = nullptr;
295 };
296
299
300 public:
303
305 void buildNetworkFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
306
308 void hideNetworkFrames();
309
311 void setNetworkFramesWidth(int frameWidth);
312
314 bool isNetworkFrameShown() const;
315
318
321
324
327
330
333
336
339
342
345
348 };
349
352
353 public:
355 DemandFrames();
356
358 void buildDemandFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
359
361 void hideDemandFrames();
362
364 void setDemandFramesWidth(int frameWidth);
365
367 bool isDemandFrameShown() const;
368
371
374
377
380
383
386
389
392
395
398
401 };
402
405
406 public:
408 DataFrames();
409
411 void buildDataFrames(GNEViewParent* viewParent, GNEViewNet* viewNet);
412
414 void hideDataFrames();
415
417 void setDataFramesWidth(int frameWidth);
418
420 bool isDataFrameShown() const;
421
424
427
430
433
436 };
437
490
491private:
494
496 FXHorizontalFrame* myViewArea;
497
499 FXVerticalFrame* myFramesArea;
500
503
506
509
511 FXSplitter* myFramesSplitter;
512
515
518
521
524
527};
struct for ACChoosers dialog
GNEACChooserDialog * ACChooserPOI
pointer to ACChooser dialog used for locate POIs
GNEACChooserDialog * ACChooserPersons
pointer to ACChooser dialog used for locate persons
GNEACChooserDialog * ACChooserAdditional
pointer to ACChooser dialog used for locate additional
GNEACChooserDialog * ACChooserWire
pointer to ACChooser dialog used for locate Wires
GNEACChooserDialog * ACChooserTLS
pointer to ACChooser dialog used for locate TLSs
GNEACChooserDialog * ACChooserJunction
pointer to ACChooser dialog used for locate junctions
GNEACChooserDialog * ACChooserProhibition
pointer to ACChooser dialog used for locate Prohibitions
GNEACChooserDialog * ACChooserWalkingAreas
pointer to ACChooser dialog used for locate walkingareas
GNEACChooserDialog * ACChooserEdges
pointer to ACChooser dialog used for locate edges
GNEACChooserDialog * ACChooserVehicles
pointer to ACChooser dialog used for locate vehicles
GNEACChooserDialog * ACChooserStops
pointer to ACChooser dialog used for locate stops
GNEACChooserDialog * ACChooserContainers
pointer to ACChooser dialog used for locate containers
GNEACChooserDialog * ACChooserPolygon
pointer to ACChooser dialog used for locate Polygons
GNEACChooserDialog * ACChooserRoutes
pointer to ACChooser dialog used for locate routes
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.
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
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.
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
void eraseACChooserDialog(GNEACChooserDialog *chooserDialog)
remove created chooser dialog
GNEFrame * getCurrentShownFrame() const
get current frame (note: it can be null)
std::vector< GUIGlID > getObjectIDs(int messageId) const
get object IDs
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