-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
GNEApplicationWindowHelper.h
1289 lines (893 loc) · 44.6 KB
/
GNEApplicationWindowHelper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/****************************************************************************/
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
// Copyright (C) 2001-2023 German Aerospace Center (DLR) and others.
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0/
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License 2.0 are satisfied: GNU General Public License, version 2
// or later which is available at
// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
/****************************************************************************/
/// @file GNEApplicationWindowHelper.h
/// @author Pablo Alvarez Lopez
/// @date mar 2020
///
// Functions from main window of netedit
/****************************************************************************/
#pragma once
#include <config.h>
#include <utils/common/SUMOTime.h>
#include <utils/foxtools/MFXSynchQue.h>
#include <utils/foxtools/MFXRecentNetworks.h>
#include <utils/foxtools/MFXThreadEvent.h>
#include <utils/foxtools/MFXInterThreadEventClient.h>
#include <utils/geom/Position.h>
#include <utils/gui/div/GUIMessageWindow.h>
#include <utils/gui/windows/GUIMainWindow.h>
#include <utils/shapes/ShapeHandler.h>
#include <utils/options/OptionsCont.h>
#include "GNEViewNetHelper.h"
// ===========================================================================
// class declarations
// ===========================================================================
class GNEApplicationWindow;
class GNELoadThread;
class GNENet;
class GNEPythonTool;
class GNEPythonToolDialog;
class GNENetgenerateDialog;
class GNERunPythonToolDialog;
class GNERunNetgenerateDialog;
class GNEUndoList;
class GNEUndoListDialog;
class GNEViewNet;
class GUIEvent;
class MFXMenuCheckIcon;
// ===========================================================================
// class definition
// ===========================================================================
struct GNEApplicationWindowHelper {
/// @brief struct for griped toolbars
struct ToolbarsGrip {
/// @brief constructor
ToolbarsGrip(GNEApplicationWindow* GNEApp);
/// @brief build menu toolbar grips
void buildMenuToolbarsGrip();
/// @brief build toolbars grips
void buildViewParentToolbarsGrips();
/// @brief build toolbars grips
void destroyParentToolbarsGrips();
/// @brief The application menu bar (for file, edit, processing...)
FXMenuBar* menu = nullptr;
/// @brief The application menu bar for supermodes (network, demand and data)
FXMenuBar* superModes = nullptr;
/// @brief The application menu bar for save elements
FXMenuBar* saveElements = nullptr;
/// @brief The application menu bar for time switch
FXMenuBar* timeSwitch = nullptr;
/// @brief The application menu bar for navigation (zoom, coloring...)
FXMenuBar* navigation = nullptr;
/// @brief The application menu bar (for select, inspect...)
FXMenuBar* modes = nullptr;
/// @brief The application menu bar for mode options (show connections, select edges...)
FXMenuBar* intervalBar = nullptr;
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief menu bar drag (for file, edit, processing...)
FXToolBarShell* myPythonToolBarShellMenu = nullptr;
/// @brief menu bar drag for super modes (network, demand and data)
FXToolBarShell* myPythonToolBarShellSuperModes = nullptr;
/// @brief menu bar drag for save elements
FXToolBarShell* myPythonToolBarShellSaveElements = nullptr;
/// @brief menu bar drag for time switch
FXToolBarShell* myPythonToolBarShellTimeFormat = nullptr;
/// @brief menu bar drag for navigation (Zoom, coloring...)
FXToolBarShell* myPythonToolBarShellNavigation = nullptr;
/// @brief menu bar drag for modes (select, inspect, delete...)
FXToolBarShell* myPythonToolBarShellModes = nullptr;
/// @brief menu bar drag for interval bar
FXToolBarShell* myPythonToolBarShellIntervalBar = nullptr;
/// @brief Invalidated copy constructor.
ToolbarsGrip(const ToolbarsGrip&) = delete;
/// @brief Invalidated assignment operator.
ToolbarsGrip& operator=(const ToolbarsGrip&) = delete;
};
/// @brief struct for menu bar file
struct MenuBarFile {
/// @brief constructor
MenuBarFile(GNEApplicationWindow* GNEApp);
/// @brief build recent network
void buildRecentNetworkFiles(FXMenuPane* fileMenu, FXMenuPane* fileMenuRecentNetworkFiles);
/// @brief build recent config
void buildRecentConfigFiles(FXMenuPane* fileMenu, FXMenuPane* fileMenuRecentConfigFiles);
/// @brief List of recent networks
MFXRecentNetworks myRecentNetworks;
/// @brief List of recent configs
MFXRecentNetworks myRecentConfigs;
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief Invalidated copy constructor.
MenuBarFile(const MenuBarFile&) = delete;
/// @brief Invalidated assignment operator.
MenuBarFile& operator=(const MenuBarFile&) = delete;
};
/// @brief struct for File menu commands
struct FileMenuCommands {
/// @brief constructor
FileMenuCommands(GNEApplicationWindow* GNEApp);
/// @brief build menu commands
void buildFileMenuCommands(FXMenuPane* fileMenu, FXMenuPane* fileMenuNEEDITConfig, FXMenuPane* fileMenuSumoConfig,
FXMenuPane* fileMenuTLS, FXMenuPane* fileMenuEdgeTypes, FXMenuPane* fileMenuAdditionals,
FXMenuPane* fileMenuDemandElements, FXMenuPane* fileMenuDataElements,
FXMenuPane* fileMenuMeanDataElements);
/// @brief enable menu cascades
void enableMenuCascades();
/// @brief disable menu cascades
void disableMenuCascades();
private:
/// @brief build netedit config section
void buildNeteditConfigSection(FXMenuPane* menuPane);
/// @brief build SUMO Config section
void buildSumoConfigSection(FXMenuPane* menuPane);
/// @brief build traffic light section
void buildTrafficLightSection(FXMenuPane* menuPane);
/// @brief build edge type section
void buildEdgeTypeSection(FXMenuPane* menuPane);
/// @brief build additional section
void buildAdditionalSection(FXMenuPane* menuPane);
/// @brief build demand section
void buildDemandSection(FXMenuPane* menuPane);
/// @brief build data section
void buildDataSection(FXMenuPane* menuPane);
/// @brief build meanData section
void buildMeanDataSection(FXMenuPane* menuPane);
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp = nullptr;
/// @brief FXMenuCascade for neteditConfig
FXMenuCascade* myNeteditConfigMenuCascade = nullptr;
/// @brief FXMenuCascade for SumoConfig
FXMenuCascade* mySumoConfigMenuCascade = nullptr;
/// @brief FXMenuCascade for TLS
FXMenuCascade* myTLSMenuCascade = nullptr;
/// @brief FXMenuCascade for edgeTypes
FXMenuCascade* myEdgeTypesMenuCascade = nullptr;
/// @brief FXMenuCascade for additional
FXMenuCascade* myAdditionalMenuCascade = nullptr;
/// @brief FXMenuCascade for demand
FXMenuCascade* myDemandMenuCascade = nullptr;
/// @brief FXMenuCascade for data
FXMenuCascade* myDataMenuCascade = nullptr;
/// @brief FXMenuCascade for mean datadata
FXMenuCascade* myMeanDataMenuCascade = nullptr;
/// @brief Invalidated copy constructor.
FileMenuCommands(const FileMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
FileMenuCommands& operator=(const FileMenuCommands&) = delete;
};
/// @brief struct for modes menu commands
struct ModesMenuCommands {
/// @brief struct for common menu commands
struct SupermodeMenuCommands {
/// @brief constructor
SupermodeMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);
/// @brief build menu commands
void buildSupermodeMenuCommands(FXMenuPane* modesMenu);
/// @brief menu command for network supermode
FXMenuCommand* networkSupermode = nullptr;
/// @brief menu command for demand supermode
FXMenuCommand* demandSupermode = nullptr;
/// @brief menu command for data supermode
FXMenuCommand* dataSupermode = nullptr;
private:
/// @brief reference to ModesMenuCommands
const ModesMenuCommands* myModesMenuCommandsParent;
/// @brief Invalidated copy constructor.
SupermodeMenuCommands(const SupermodeMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
SupermodeMenuCommands& operator=(const SupermodeMenuCommands&) = delete;
};
/// @brief struct for common menu commands
struct CommonMenuCommands {
/// @brief constructor
CommonMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);
/// @brief build menu commands
void buildCommonMenuCommands(FXMenuPane* modesMenu);
/// @brief menu command for delete mode
FXMenuCommand* deleteMode = nullptr;
/// @brief menu command for inspect mode
FXMenuCommand* inspectMode = nullptr;
/// @brief menu command for select mode
FXMenuCommand* selectMode = nullptr;
private:
/// @brief reference to ModesMenuCommands
const ModesMenuCommands* myModesMenuCommandsParent;
/// @brief Invalidated copy constructor.
CommonMenuCommands(const CommonMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
CommonMenuCommands& operator=(const CommonMenuCommands&) = delete;
};
/// @brief struct for network menu commands
struct NetworkMenuCommands {
/// @brief constructor
NetworkMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);
/// @brief build menu commands
void buildNetworkMenuCommands(FXMenuPane* modesMenu);
/// @brief show all menu commands
void showNetworkMenuCommands();
/// @brief hide all menu commands
void hideNetworkMenuCommands();
/// @brief menu command for create edge
FXMenuCommand* createEdgeMode = nullptr;
/// @brief menu command for move mode (network)
FXMenuCommand* moveMode = nullptr;
/// @brief menu command for connect mode
FXMenuCommand* connectMode = nullptr;
/// @brief menu command for prohibition mode
FXMenuCommand* prohibitionMode = nullptr;
/// @brief menu command for TLS Mode
FXMenuCommand* TLSMode = nullptr;
/// @brief menu command for additional mode
FXMenuCommand* additionalMode = nullptr;
/// @brief menu command for crossing mode
FXMenuCommand* crossingMode = nullptr;
/// @brief menu command for TAZ mode
FXMenuCommand* TAZMode = nullptr;
/// @brief menu command for shape mode
FXMenuCommand* shapeMode = nullptr;
/// @brief menu command for wire mode
FXMenuCommand* wireMode = nullptr;
/// @brief menu command for decal mode
FXMenuCommand* decalMode = nullptr;
private:
/// @brief reference to ModesMenuCommands
const ModesMenuCommands* myModesMenuCommandsParent;
/// @brief Invalidated copy constructor.
NetworkMenuCommands(const NetworkMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
NetworkMenuCommands& operator=(const NetworkMenuCommands&) = delete;
};
/// @brief struct for Demand menu commands
struct DemandMenuCommands {
/// @brief constructor
DemandMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);
/// @brief build menu commands
void buildDemandMenuCommands(FXMenuPane* modesMenu);
/// @brief show all menu commands
void showDemandMenuCommands();
/// @brief hide all menu commands
void hideDemandMenuCommands();
/// @brief menu command for move mode (demand)
FXMenuCommand* moveMode = nullptr;
/// @brief menu command for route mode
FXMenuCommand* routeMode = nullptr;
/// @brief menu command for route distribution mode
FXMenuCommand* routeDistributionMode = nullptr;
/// @brief menu command for vehicle mode
FXMenuCommand* vehicleMode = nullptr;
/// @brief menu command for type mode
FXMenuCommand* typeMode = nullptr;
/// @brief menu command for type distribution mode
FXMenuCommand* typeDistributionMode = nullptr;
/// @brief menu command for stop mode
FXMenuCommand* stopMode = nullptr;
/// @brief menu command for person mode
FXMenuCommand* personMode = nullptr;
/// @brief menu command for person plan mode
FXMenuCommand* personPlanMode = nullptr;
/// @brief menu command for container mode
FXMenuCommand* containerMode = nullptr;
/// @brief menu command for container plan mode
FXMenuCommand* containerPlanMode = nullptr;
private:
/// @brief reference to ModesMenuCommands
const ModesMenuCommands* myModesMenuCommandsParent;
/// @brief Invalidated copy constructor.
DemandMenuCommands(const DemandMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
DemandMenuCommands& operator=(const DemandMenuCommands&) = delete;
};
/// @brief struct for Data menu commands
struct DataMenuCommands {
/// @brief constructor
DataMenuCommands(const ModesMenuCommands* modesMenuCommandsParent);
/// @brief build menu commands
void buildDataMenuCommands(FXMenuPane* modesMenu);
/// @brief show all menu commands
void showDataMenuCommands();
/// @brief hide all menu commands
void hideDataMenuCommands();
/// @brief menu command for edge mode
FXMenuCommand* edgeData = nullptr;
/// @brief menu command for edge rel mode
FXMenuCommand* edgeRelData = nullptr;
/// @brief menu command for TAZ rel mode
FXMenuCommand* TAZRelData = nullptr;
/// @brief menu command for mean data
FXMenuCommand* meanData = nullptr;
private:
/// @brief reference to ModesMenuCommands
const ModesMenuCommands* myModesMenuCommandsParent;
/// @brief Invalidated copy constructor.
DataMenuCommands(const DataMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
DataMenuCommands& operator=(const DataMenuCommands&) = delete;
};
/// @brief constructor
ModesMenuCommands(GNEApplicationWindow* GNEApp);
/// @brief build modes menu commands
void buildModesMenuCommands(FXMenuPane* modesMenu);
/// @brief Supermodes Menu Commands
SupermodeMenuCommands supermodeMenuCommands;
/// @brief Common Menu Commands
CommonMenuCommands commonMenuCommands;
/// @brief Network Menu Commands
NetworkMenuCommands networkMenuCommands;
/// @brief Demand Menu Commands
DemandMenuCommands demandMenuCommands;
/// @brief Data Menu Commands
DataMenuCommands dataMenuCommands;
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief Invalidated copy constructor.
ModesMenuCommands(const ModesMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
ModesMenuCommands& operator=(const ModesMenuCommands&) = delete;
};
/// @brief struct for edit menu commands
struct EditMenuCommands {
/// @brief struct used to group all variables related to view options in supermode Network
struct NetworkViewOptions {
/// @brief default constructor
NetworkViewOptions(GNEApplicationWindow* GNEApp);
/// @brief build menu checks
void buildNetworkViewOptionsMenuChecks(FXMenuPane* editMenu);
/// @brief hide all options menu checks
void hideNetworkViewOptionsMenuChecks();
/// @brief update shortcuts (alt+X)
void updateShortcuts();
/// @brief menu check to show grid button
MFXMenuCheckIcon* menuCheckToggleGrid = nullptr;
/// @brief menu check to toggle draw junction shape
MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;
/// @brief menu check to draw vehicles in begin position or spread in lane
MFXMenuCheckIcon* menuCheckDrawSpreadVehicles = nullptr;
/// @brief menu check to show Demand Elements
MFXMenuCheckIcon* menuCheckShowDemandElements = nullptr;
/// @brief menu check to select only edges
MFXMenuCheckIcon* menuCheckSelectEdges = nullptr;
/// @brief menu check to show connections
MFXMenuCheckIcon* menuCheckShowConnections = nullptr;
/// @brief menu check to hide connections in connect mode
MFXMenuCheckIcon* menuCheckHideConnections = nullptr;
/// @brief menu check to show additional sub-elements
MFXMenuCheckIcon* menuCheckShowAdditionalSubElements = nullptr;
/// @brief menu check to show TAZ elements
MFXMenuCheckIcon* menuCheckShowTAZElements = nullptr;
/// @brief menu check to extend to edge nodes
MFXMenuCheckIcon* menuCheckExtendSelection = nullptr;
/// @brief menu check to set change all phases
MFXMenuCheckIcon* menuCheckChangeAllPhases = nullptr;
/// @brief menu check to we should warn about merging junctions
MFXMenuCheckIcon* menuCheckWarnAboutMerge = nullptr;
/// @brief menu check to show connection as bubble in "Move" mode.
MFXMenuCheckIcon* menuCheckShowJunctionBubble = nullptr;
/// @brief menu check to apply movement to elevation
MFXMenuCheckIcon* menuCheckMoveElevation = nullptr;
/// @brief menu check to the endpoint for a created edge should be set as the new source
MFXMenuCheckIcon* menuCheckChainEdges = nullptr;
/// @brief check checkable to create auto create opposite edge
MFXMenuCheckIcon* menuCheckAutoOppositeEdge = nullptr;
/// @brief separator
FXMenuSeparator* separator;
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief Invalidated copy constructor.
NetworkViewOptions(const NetworkViewOptions&) = delete;
/// @brief Invalidated assignment operator.
NetworkViewOptions& operator=(const NetworkViewOptions&) = delete;
};
/// @brief struct used to group all variables related to view options in supermode Demand
struct DemandViewOptions {
/// @brief default constructor
DemandViewOptions(GNEApplicationWindow* GNEApp);
/// @brief build menu checks
void buildDemandViewOptionsMenuChecks(FXMenuPane* editMenu);
/// @brief hide all options menu checks
void hideDemandViewOptionsMenuChecks();
/// @brief update shortcuts (alt+X)
void updateShortcuts();
/// @brief menu check to show grid button
MFXMenuCheckIcon* menuCheckToggleGrid = nullptr;
/// @brief menu check to toggle draw junction shape
MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;
/// @brief menu check to draw vehicles in begin position or spread in lane
MFXMenuCheckIcon* menuCheckDrawSpreadVehicles = nullptr;
/// @brief menu check for hide shapes (Polygons and POIs)
MFXMenuCheckIcon* menuCheckHideShapes = nullptr;
/// @brief menu check for show all trips plans
MFXMenuCheckIcon* menuCheckShowAllTrips = nullptr;
/// @brief menu check for hide non inspected demand elements
MFXMenuCheckIcon* menuCheckHideNonInspectedDemandElements = nullptr;
/// @brief menu check for show overlapped routes
MFXMenuCheckIcon* menuCheckShowOverlappedRoutes = nullptr;
/// @brief menu check for show all person plans
MFXMenuCheckIcon* menuCheckShowAllPersonPlans = nullptr;
/// @brief menu check for lock Person
MFXMenuCheckIcon* menuCheckLockPerson = nullptr;
/// @brief menu check for show all container plans
MFXMenuCheckIcon* menuCheckShowAllContainerPlans = nullptr;
/// @brief menu check for lock Container
MFXMenuCheckIcon* menuCheckLockContainer = nullptr;
/// @brief separator
FXMenuSeparator* separator;
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief Invalidated copy constructor.
DemandViewOptions(const DemandViewOptions&) = delete;
/// @brief Invalidated assignment operator.
DemandViewOptions& operator=(const DemandViewOptions&) = delete;
};
/// @brief struct used to group all variables related to view options in supermode Data
struct DataViewOptions {
/// @brief default constructor
DataViewOptions(GNEApplicationWindow* GNEApp);
/// @brief build menu checks
void buildDataViewOptionsMenuChecks(FXMenuPane* editMenu);
/// @brief hide all options menu checks
void hideDataViewOptionsMenuChecks();
/// @brief update shortcuts (alt+X)
void updateShortcuts();
/// @brief menu check to toggle draw junction shape
MFXMenuCheckIcon* menuCheckToggleDrawJunctionShape = nullptr;
/// @brief menu check to show Additionals
MFXMenuCheckIcon* menuCheckShowAdditionals = nullptr;
/// @brief menu check to show Shapes
MFXMenuCheckIcon* menuCheckShowShapes = nullptr;
/// @brief menu check to show Demand Elements
MFXMenuCheckIcon* menuCheckShowDemandElements = nullptr;
/// @brief menu check to toggle TAZRel drawing mode
MFXMenuCheckIcon* menuCheckToggleTAZRelDrawing = nullptr;
/// @brief menu check to toggle TAZ draw fill
MFXMenuCheckIcon* menuCheckToggleTAZDrawFill = nullptr;
/// @brief menu check to toggle TAZRel only from
MFXMenuCheckIcon* menuCheckToggleTAZRelOnlyFrom = nullptr;
/// @brief menu check to toggle TAZRel only to
MFXMenuCheckIcon* menuCheckToggleTAZRelOnlyTo = nullptr;
/// @brief separator
FXMenuSeparator* separator = nullptr;
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief Invalidated copy constructor.
DataViewOptions(const DataViewOptions&) = delete;
/// @brief Invalidated assignment operator.
DataViewOptions& operator=(const DataViewOptions&) = delete;
};
/// @brief constructor
EditMenuCommands(GNEApplicationWindow* GNEApp);
/// @brief build undo-redo menu commands
void buildUndoRedoMenuCommands(FXMenuPane* editMenu);
/// @brief build view menu commands
void buildViewMenuCommands(FXMenuPane* editMenu);
/// @brief build front element commands
void buildFrontElementMenuCommand(FXMenuPane* editMenu);
/// @brief build open sumo menu commands
void buildOpenSUMOMenuCommands(FXMenuPane* editMenu);
/// @brief FXMenuCommand for undo last change
FXMenuCommand* undoLastChange = nullptr;
/// @brief FXMenuCommand for redo last change
FXMenuCommand* redoLastChange = nullptr;
/// @brief FXMenuCommand for open undolist dialog
FXMenuCommand* openUndolistDialog = nullptr;
/// @brief network view options
NetworkViewOptions networkViewOptions;
/// @brief demand view options
DemandViewOptions demandViewOptions;
/// @brief data view options
DataViewOptions dataViewOptions;
/// @brief FXMenuCommand for edit view scheme
FXMenuCommand* editViewScheme = nullptr;
/// @brief FXMenuCommand for edit view port
FXMenuCommand* editViewPort = nullptr;
/// @brief FXMenuCommand for clear Front element
FXMenuCommand* clearFrontElement = nullptr;
/// @brief menu check for load additionals in SUMO GUI
FXMenuCheck* loadAdditionalsInSUMOGUI = nullptr;
/// @brief menu check for load demand in SUMO GUI
FXMenuCheck* loadDemandInSUMOGUI = nullptr;
/// @brief FXMenuCommand for open in SUMO GUI
FXMenuCommand* openInSUMOGUI = nullptr;
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief Invalidated copy constructor.
EditMenuCommands(const EditMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
EditMenuCommands& operator=(const EditMenuCommands&) = delete;
};
/// @brief struct for processing menu commands
struct LockMenuCommands {
/// @brief constructor
LockMenuCommands(GNEApplicationWindow* GNEApp);
/// @brief build menu commands
void buildLockMenuCommands(FXMenuPane* editMenu);
/// @brief remove hotkeys
void removeHotkeys();
/// @brief show network processing menu commands
void showNetworkLockMenuCommands();
/// @brief show network processing menu commands
void hideNetworkLockMenuCommands();
/// @brief show demand processing menu commands
void showDemandLockMenuCommands();
/// @brief show demand processing menu commands
void hideDemandLockMenuCommands();
/// @brief show data processing menu commands
void showDataLockMenuCommands();
/// @brief show data processing menu commands
void hideDataLockMenuCommands();
/// @brief lock all
void lockAll();
/// @brief unlock all
void unlockAll();
/// @brief lock or unlock object based in a tag property
void editLocking(const GNEAttributeCarrier* AC, const FXbool value);
/// @name Processing FXMenuCommands for Network mode
/// @{
/// @brief menu check to lock junction
MFXMenuCheckIcon* menuCheckLockJunction = nullptr;
/// @brief menu check to lock edges
MFXMenuCheckIcon* menuCheckLockEdges = nullptr;
/// @brief menu check to lock lanes
MFXMenuCheckIcon* menuCheckLockLanes = nullptr;
/// @brief menu check to lock connections
MFXMenuCheckIcon* menuCheckLockConnections = nullptr;
/// @brief menu check to lock crossings
MFXMenuCheckIcon* menuCheckLockCrossings = nullptr;
/// @brief menu check to lock walkingAreas
MFXMenuCheckIcon* menuCheckLockWalkingAreas = nullptr;
/// @brief menu check to lock additionals
MFXMenuCheckIcon* menuCheckLockAdditionals = nullptr;
/// @brief menu check to lock TAZs
MFXMenuCheckIcon* menuCheckLockTAZs = nullptr;
/// @brief menu check to lock Wires
MFXMenuCheckIcon* menuCheckLockWires = nullptr;
/// @brief menu check to lock polygons
MFXMenuCheckIcon* menuCheckLockPolygons = nullptr;
/// @brief menu check to lock POIs
MFXMenuCheckIcon* menuCheckLockPOIs = nullptr;
/// @brief menu check to lock jps walkableareas
MFXMenuCheckIcon* menuCheckLockJpsWalkableAreas = nullptr;
/// @brief menu check to lock jps obstacles
MFXMenuCheckIcon* menuCheckLockJpsObstacles = nullptr;
/// @brief menu check to lock jps waiting areas
MFXMenuCheckIcon* menuCheckLockJpsWaitingAreas = nullptr;
/// @brief menu check to lock jps sources
MFXMenuCheckIcon* menuCheckLockJpsSources = nullptr;
/// @brief menu check to lock jps sinks
MFXMenuCheckIcon* menuCheckLockJpsSinks = nullptr;
/// @brief menu check to lock jps waypoints
MFXMenuCheckIcon* menuCheckLockJpsWaypoints = nullptr;
/// @}
/// @name Processing FXMenuCommands for Demand mode
/// @{
/// @brief menu check to lock routes
MFXMenuCheckIcon* menuCheckLockRoutes = nullptr;
/// @brief menu check to lock vehicles
MFXMenuCheckIcon* menuCheckLockVehicles = nullptr;
/// @brief menu check to lock persons
MFXMenuCheckIcon* menuCheckLockPersons = nullptr;
/// @brief menu check to lock personTrips
MFXMenuCheckIcon* menuCheckLockPersonTrip = nullptr;
/// @brief menu check to lock walks
MFXMenuCheckIcon* menuCheckLockWalk = nullptr;
/// @brief menu check to lock rides
MFXMenuCheckIcon* menuCheckLockRides = nullptr;
/// @brief menu check to lock containers
MFXMenuCheckIcon* menuCheckLockContainers = nullptr;
/// @brief menu check to lock transports
MFXMenuCheckIcon* menuCheckLockTransports = nullptr;
/// @brief menu check to lock tranships
MFXMenuCheckIcon* menuCheckLockTranships = nullptr;
/// @brief menu check to lock stops
MFXMenuCheckIcon* menuCheckLockStops = nullptr;
/// @}
/// @name Processing FXMenuCommands for Data mode
/// @{
/// @brief menu check to lock edge datas
MFXMenuCheckIcon* menuCheckLockEdgeDatas = nullptr;
/// @brief menu check to lock edgeRelDatas
MFXMenuCheckIcon* menuCheckLockEdgeRelDatas = nullptr;
/// @brief menu check to lock edgeTAZRels
MFXMenuCheckIcon* menuCheckLockEdgeTAZRels = nullptr;
/// @}
/// @brief menu check for lock selected elements
MFXMenuCheckIcon* menuCheckLockSelectedElements = nullptr;
protected:
/// @brief Parse hot key from string
FXHotKey parseHotKey(const FXwchar character);
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief Invalidated copy constructor.
LockMenuCommands(const LockMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
LockMenuCommands& operator=(const LockMenuCommands&) = delete;
};
/// @brief struct for processing menu commands
struct ProcessingMenuCommands {
/// @brief constructor
ProcessingMenuCommands(GNEApplicationWindow* GNEApp);
/// @brief build menu commands
void buildProcessingMenuCommands(FXMenuPane* processingMenu);
/// @brief show network processing menu commands
void showNetworkProcessingMenuCommands();
/// @brief show network processing menu commands
void hideNetworkProcessingMenuCommands();
/// @brief show demand processing menu commands
void showDemandProcessingMenuCommands();
/// @brief show demand processing menu commands
void hideDemandProcessingMenuCommands();
/// @brief show data processing menu commands
void showDataProcessingMenuCommands();
/// @brief show data processing menu commands
void hideDataProcessingMenuCommands();
/// @brief show separator
void showSeparator();
/// @brief hide separator
void hideSeparator();
/// @name Processing FXMenuCommands for Network mode
/// @{
/// @brief FXMenuCommand for compute network
FXMenuCommand* computeNetwork = nullptr;
/// @brief FXMenuCommand for compute network with volatile options
FXMenuCommand* computeNetworkVolatile = nullptr;
/// @brief FXMenuCommand for clean junctions without edges
FXMenuCommand* cleanJunctions = nullptr;
/// @brief FXMenuCommand for join selected junctions
FXMenuCommand* joinJunctions = nullptr;
/// @brief FXMenuCommand for clear invalid crossings
FXMenuCommand* clearInvalidCrossings = nullptr;
/// @brief checkBox for recomputing when changing data mode
MFXMenuCheckIcon* menuCheckRecomputeDataMode = nullptr;
/// @}
/// @name Processing FXMenuCommands for Demand mode
/// @{
/// @brief FXMenuCommand for compute demand elements
FXMenuCommand* computeDemand = nullptr;
/// @brief FXMenuCommand for clean routes without vehicles
FXMenuCommand* cleanRoutes = nullptr;
/// @brief FXMenuCommand for join routes
FXMenuCommand* joinRoutes = nullptr;
/// @brief FXMenuCommand for adjust person plans
FXMenuCommand* adjustPersonPlans = nullptr;
/// @brief FXMenuCommand for clear invalid demand elements
FXMenuCommand* clearInvalidDemandElements = nullptr;
/// @}
/// @name Processing FXMenuCommands for Data mode
/// @{
/// @}
/// @brief FXMenuCommand for open option menus
FXMenuCommand* optionMenus = nullptr;
private:
/// @brief pointer to current GNEApplicationWindow
GNEApplicationWindow* myGNEApp;
/// @brief separator for optionsMenu
FXMenuSeparator* myOptionsSeparator = nullptr;
/// @brief separator for checkBox
FXMenuSeparator* mySeparatorCheckBox = nullptr;
/// @brief Invalidated copy constructor.
ProcessingMenuCommands(const ProcessingMenuCommands&) = delete;
/// @brief Invalidated assignment operator.
ProcessingMenuCommands& operator=(const ProcessingMenuCommands&) = delete;
};
/// @brief struct for locate menu commands
struct LocateMenuCommands {