Eclipse SUMO - Simulation of Urban MObility
GNEApplicationWindowHelper.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-2020 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 // Functions from main window of NETEDIT
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
23 #include <utils/common/SUMOTime.h>
27 #include <utils/geom/Position.h>
31 
32 #include "GNEViewNetHelper.h"
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
39 class GNELoadThread;
40 class GNEUndoList;
41 class GNENet;
42 class GNEViewNet;
43 class GUIEvent;
44 
45 
46 // ===========================================================================
47 // class definition
48 // ===========================================================================
49 
51 
53  struct ToolbarsGrip {
54 
57 
59  void buildMenuToolbarsGrip();
60 
63 
66 
68  FXMenuBar* menu;
69 
71  FXMenuBar* superModes;
72 
74  FXMenuBar* saveElements;
75 
77  FXMenuBar* navigation;
78 
80  FXMenuBar* modes;
81 
83  FXMenuBar* intervalBar;
84 
85  private:
88 
90  FXToolBarShell* myToolBarShellMenu;
91 
93  FXToolBarShell* myToolBarShellSuperModes;
94 
96  FXToolBarShell* myToolBarShellSaveElements;
97 
99  FXToolBarShell* myToolBarShellNavigation;
100 
102  FXToolBarShell* myToolBarShellModes;
103 
105  FXToolBarShell* myToolBarShellIntervalBar;
106  };
107 
109  struct MenuBarFile {
110 
113 
115  void buildRecentFiles(FXMenuPane* fileMenu);
116 
118  FXRecentFiles myRecentConfigs;
119 
121  FXRecentFiles myRecentNets;
122 
123  private:
126  };
127 
130 
133 
135  void buildFileMenuCommands(FXMenuPane* fileMenu, FXMenuPane* fileMenuTLS, FXMenuPane* fileMenuEdgeTypes, FXMenuPane* fileMenuAdditionals,
136  FXMenuPane* fileMenuDemandElements, FXMenuPane* fileMenuDataElements);
137 
139  FXMenuCommand* saveAdditionals;
140 
142  FXMenuCommand* saveAdditionalsAs;
143 
145  FXMenuCommand* saveTLSPrograms;
146 
148  FXMenuCommand* saveEdgeTypes;
149 
151  FXMenuCommand* saveDemandElements;
152 
154  FXMenuCommand* saveDemandElementsAs;
155 
157  FXMenuCommand* saveDataElements;
158 
160  FXMenuCommand* saveDataElementsAs;
161 
162  private:
165  };
166 
169 
172 
174  NetworkMenuCommands(const EditMenuCommands* editMenuCommandsParent);
175 
177  void buildNetworkMenuCommands(FXMenuPane* editMenu);
178 
181 
184 
186  FXMenuCommand* createEdgeMode;
187 
189  FXMenuCommand* moveMode;
190 
192  FXMenuCommand* deleteMode;
193 
195  FXMenuCommand* inspectMode;
196 
198  FXMenuCommand* selectMode;
199 
201  FXMenuCommand* connectMode;
202 
204  FXMenuCommand* prohibitionMode;
205 
207  FXMenuCommand* TLSMode;
208 
210  FXMenuCommand* additionalMode;
211 
213  FXMenuCommand* crossingMode;
214 
216  FXMenuCommand* TAZMode;
217 
219  FXMenuCommand* shapeMode;
220 
221  private:
224 
226  FXMenuSeparator* myHorizontalSeparator;
227  };
228 
231 
233  DemandMenuCommands(const EditMenuCommands* editMenuCommandsParent);
234 
236  void buildDemandMenuCommands(FXMenuPane* editMenu);
237 
239  void showDemandMenuCommands();
240 
242  void hideDemandMenuCommands();
243 
245  FXMenuCommand* routeMode;
246 
248  FXMenuCommand* vehicleMode;
249 
251  FXMenuCommand* vehicleTypeMode;
252 
254  FXMenuCommand* stopMode;
255 
257  FXMenuCommand* personTypeMode;
258 
260  FXMenuCommand* personMode;
261 
263  FXMenuCommand* personPlanMode;
264 
265  private:
268 
270  FXMenuSeparator* myHorizontalSeparator;
271  };
272 
273 
276 
278  DataMenuCommands(const EditMenuCommands* editMenuCommandsParent);
279 
281  void buildDataMenuCommands(FXMenuPane* editMenu);
282 
284  void showDataMenuCommands();
285 
287  void hideDataMenuCommands();
288 
290  FXMenuCommand* edgeData;
291 
293  FXMenuCommand* edgeRelData;
294 
296  FXMenuCommand* TAZRelData;
297 
298  private:
301 
303  FXMenuSeparator* myHorizontalSeparator;
304  };
305 
308 
310  void buildEditMenuCommands(FXMenuPane* editMenu);
311 
312  private:
315 
316  public:
319 
322 
325 
327  FXMenuCommand* undoLastChange;
328 
330  FXMenuCommand* redoLastChange;
331 
333  FXMenuCommand* editViewScheme;
334 
336  FXMenuCommand* editViewPort;
337 
339  FXMenuCommand* toogleGrid;
340 
342  FXMenuCommand* clearFrontElement;
343 
346 
348  FXMenuCheck* loadDemandInSUMOGUI;
349 
351  FXMenuCommand* openInSUMOGUI;
352  };
353 
356 
359 
361  void buildProcessingMenuCommands(FXMenuPane* editMenu);
362 
365 
368 
371 
374 
377 
380 
384  FXMenuCommand* computeNetwork;
385 
387  FXMenuCommand* computeNetworkVolatile;
388 
390  FXMenuCommand* cleanJunctions;
391 
393  FXMenuCommand* joinJunctions;
394 
396  FXMenuCommand* clearInvalidCrossings;
398 
402  FXMenuCommand* computeDemand;
403 
405  FXMenuCommand* cleanRoutes;
406 
408  FXMenuCommand* joinRoutes;
409 
413 
416 
418 
420  FXMenuCommand* optionMenus;
421 
422  private:
425  };
426 
429 
432 
434  void buildLocateMenuCommands(FXMenuPane* locateMenu);
435 
436  private:
439  };
440 
443 
446 
448  void buildWindowsMenuCommands(FXMenuPane* windowsMenu, FXStatusBar* statusbar, GUIMessageWindow* messageWindow);
449 
450  private:
453  };
454 
457 
460 
462  void buildSupermodeCommands(FXMenuPane* editMenu);
463 
465  void showSupermodeCommands();
466 
468  void hideSupermodeCommands();
469 
471  FXMenuCommand* networkMode;
472 
474  FXMenuCommand* demandMode;
475 
477  FXMenuCommand* dataMode;
478 
479  private:
482 
484  FXMenuSeparator* myHorizontalSeparator;
485  };
486 
488  static bool toogleEditOptionsNetwork(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,
489  const int numericalKeyPressed, FXObject* obj, FXSelector sel);
490 
492  static bool toogleEditOptionsDemand(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,
493  const int numericalKeyPressed, FXObject* obj, FXSelector sel);
494 
496  static bool toogleEditOptionsData(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck,
497  const int numericalKeyPressed, FXObject* obj, FXSelector sel);
498 };
The main window of the Netedit.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:40
A logging window for the gui.
const EditMenuCommands * myEditMenuCommandsParent
reference to EditMenuCommands
DataMenuCommands(const EditMenuCommands *editMenuCommandsParent)
constructor
FXMenuSeparator * myHorizontalSeparator
separator between sets of FXMenuCommand
const EditMenuCommands * myEditMenuCommandsParent
reference to EditMenuCommands
FXMenuSeparator * myHorizontalSeparator
separator between sets of FXMenuCommand
FXMenuCommand * personPlanMode
menu command for person plan mode
FXMenuCommand * vehicleTypeMode
menu command for vehicle type mode
DemandMenuCommands(const EditMenuCommands *editMenuCommandsParent)
constructor
FXMenuCommand * personTypeMode
menu command for person type mode
FXMenuSeparator * myHorizontalSeparator
separator between sets of FXMenuCommand
const EditMenuCommands * myEditMenuCommandsParent
reference to EditMenuCommands
FXMenuCommand * prohibitionMode
menu command for prohibition mode
NetworkMenuCommands(const EditMenuCommands *editMenuCommandsParent)
constructor
DataMenuCommands dataMenuCommands
Data Menu Commands.
EditMenuCommands(GNEApplicationWindow *GNEApp)
constructor
FXMenuCommand * openInSUMOGUI
FXMenuCommand for open in SUMO GUI.
FXMenuCommand * editViewScheme
FXMenuCommand for edit view scheme.
void buildEditMenuCommands(FXMenuPane *editMenu)
build edit menu commands
FXMenuCommand * toogleGrid
FXMenuCommand for toogle grid.
DemandMenuCommands demandMenuCommands
Demand Menu Commands.
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
FXMenuCheck * loadAdditionalsInSUMOGUI
menu check for load additionals in SUMO GUI
FXMenuCommand * undoLastChange
FXMenuCommand for undo last change.
FXMenuCheck * loadDemandInSUMOGUI
menu check for load demand in SUMO GUI
FXMenuCommand * redoLastChange
FXMenuCommand for redo last change.
NetworkMenuCommands networkMenuCommands
Network Menu Commands.
FXMenuCommand * editViewPort
FXMenuCommand for edit view port.
FXMenuCommand * clearFrontElement
FXMenuCommand for clear Front element.
FXMenuCommand * saveTLSPrograms
FXMenuCommand for enable or disable save additionals.
FileMenuCommands(GNEApplicationWindow *GNEApp)
constructor
FXMenuCommand * saveEdgeTypes
FXMenuCommand for enable or disable save edgeTypes.
FXMenuCommand * saveDemandElementsAs
FXMenuCommand for enable or disable save demand elements as.
FXMenuCommand * saveDataElementsAs
FXMenuCommand for enable or disable save data elements as.
FXMenuCommand * saveAdditionals
FXMenuCommand for enable or disable save additionals.
FXMenuCommand * saveDemandElements
FXMenuCommand for enable or disable save demand elements.
FXMenuCommand * saveDataElements
FXMenuCommand for enable or disable save data elements.
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
void buildFileMenuCommands(FXMenuPane *fileMenu, FXMenuPane *fileMenuTLS, FXMenuPane *fileMenuEdgeTypes, FXMenuPane *fileMenuAdditionals, FXMenuPane *fileMenuDemandElements, FXMenuPane *fileMenuDataElements)
build menu commands
FXMenuCommand * saveAdditionalsAs
FXMenuCommand for enable or disable save additionals As.
void buildLocateMenuCommands(FXMenuPane *locateMenu)
build menu commands
LocateMenuCommands(GNEApplicationWindow *GNEApp)
constructor
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
void buildRecentFiles(FXMenuPane *fileMenu)
build recent files
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindow
FXRecentFiles myRecentConfigs
List of recent config files.
MenuBarFile(GNEApplicationWindow *GNEApp)
constructor
FXRecentFiles myRecentNets
List of recent nets.
void showDataProcessingMenuCommands()
show data processing menu commands
FXMenuCommand * cleanRoutes
FXMenuCommand for clean routes without vehicles.
FXMenuCommand * joinJunctions
FXMenuCommand for join selected junctions.
FXMenuCommand * clearInvalidDemandElements
FXMenuCommand for clear invalid demand elements.
void showDemandProcessingMenuCommands()
show demand processing menu commands
FXMenuCommand * cleanJunctions
FXMenuCommand for clean junctions without edges.
void hideDemandProcessingMenuCommands()
show demand processing menu commands
void hideDataProcessingMenuCommands()
show data processing menu commands
FXMenuCommand * joinRoutes
FXMenuCommand for join routes.
FXMenuCommand * computeNetworkVolatile
FXMenuCommand for compute network with volatile options.
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
FXMenuCommand * optionMenus
FXMenuCommand for open option menus.
FXMenuCommand * clearInvalidCrossings
FXMenuCommand for clear invalid crosings.
void showNetworkProcessingMenuCommands()
show network processing menu commands
void buildProcessingMenuCommands(FXMenuPane *editMenu)
build menu commands
ProcessingMenuCommands(GNEApplicationWindow *GNEApp)
constructor
void hideNetworkProcessingMenuCommands()
show network processing menu commands
FXMenuCommand * dataMode
FXMenuCommand for data supermode.
FXMenuSeparator * myHorizontalSeparator
separator between sets of FXMenuCommand
FXMenuCommand * demandMode
FXMenuCommand for demand supermode.
void buildSupermodeCommands(FXMenuPane *editMenu)
build menu commands
SupermodeCommands(GNEApplicationWindow *GNEApp)
constructor
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
FXMenuCommand * networkMode
FXMenuCommand for network supermode.
FXToolBarShell * myToolBarShellSuperModes
menu bar drag for modes (network and demand)
FXToolBarShell * myToolBarShellIntervalBar
menu bar drag for interval bar
void buildMenuToolbarsGrip()
build menu toolbar grips
ToolbarsGrip(GNEApplicationWindow *GNEApp)
constructor
FXMenuBar * saveElements
The application menu bar for save elements (NetworkElements, additionals and demand elements)
FXMenuBar * modes
The application menu bar (for select, inspect...)
FXMenuBar * navigation
The application menu bar for navigation (zoom, coloring...)
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindow
FXToolBarShell * myToolBarShellSaveElements
menu bar drag for save elements (NetworkElements, additionals and demand elements)
FXMenuBar * superModes
The application menu bar for supermodes (network and demand)
FXMenuBar * intervalBar
The application menu bar for mode options (show connections, select edges...)
FXToolBarShell * myToolBarShellNavigation
menu bar drag for navigation (Zoom, coloring...)
FXMenuBar * menu
The application menu bar (for file, edit, processing...)
FXToolBarShell * myToolBarShellModes
menu bar drag for modes (select, inspect, delete...)
FXToolBarShell * myToolBarShellMenu
menu bar drag (for file, edit, processing...)
WindowsMenuCommands(GNEApplicationWindow *GNEApp)
constructor
GNEApplicationWindow * myGNEApp
pointer to current GNEApplicationWindows
void buildWindowsMenuCommands(FXMenuPane *windowsMenu, FXStatusBar *statusbar, GUIMessageWindow *messageWindow)
build menu commands
static bool toogleEditOptionsNetwork(GNEViewNet *viewNet, const MFXCheckableButton *menuCheck, const int numericalKeyPressed, FXObject *obj, FXSelector sel)
toogle edit options Network menu commands (called in GNEApplicationWindow::onCmdToogleEditOptions)
static bool toogleEditOptionsData(GNEViewNet *viewNet, const MFXCheckableButton *menuCheck, const int numericalKeyPressed, FXObject *obj, FXSelector sel)
toogle edit options Data menu commands (called in GNEApplicationWindow::onCmdToogleEditOptions)
static bool toogleEditOptionsDemand(GNEViewNet *viewNet, const MFXCheckableButton *menuCheck, const int numericalKeyPressed, FXObject *obj, FXSelector sel)
toogle edit options Demand menu commands (called in GNEApplicationWindow::onCmdToogleEditOptions)