Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEViewNet.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 view on the network being edited (adapted from GUIViewTraffic)
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25#include "GNEViewNetHelper.h"
26
27
28// ===========================================================================
29// class declaration
30// ===========================================================================
31class GNEFrame;
32class GNENet;
33class GNEUndoList;
34class GNEViewParent;
35
36// ===========================================================================
37// class definitions
38// ===========================================================================
45 FXDECLARE(GNEViewNet)
46
47
48 friend struct GNEViewNetHelper;
49
50public:
51 /* @brief constructor
52 * @param[in] tmpParent temporal FXFrame parent so that we can add items to view area in the desired order
53 * @param[in] actualParent FXFrame parent of GNEViewNet
54 * @param[in] app main windows
55 * @param[in] viewParent viewParent of this viewNet
56 * @param[in] net traffic net
57 * @param[in] undoList pointer to UndoList module
58 * @param[in] glVis a reference to GLVisuals
59 * @param[in] share a reference to FXCanvas
60 */
61 GNEViewNet(FXComposite* tmpParent, FXComposite* actualParent, GUIMainWindow& app,
62 GNEViewParent* viewParent, GNENet* net, GNEUndoList* undoList,
63 FXGLVisual* glVis, FXGLCanvas* share);
64
66 ~GNEViewNet();
67
70
73
75 void updateViewNet(const bool ignoreViewUpdater = true) const;
76
79
81 void viewUpdated();
82
84 const GNEViewNetHelper::ViewObjectsSelector& getViewObjectsSelector() const;
85
87 const GNEViewNetHelper::MoveSingleElementModul& getMoveSingleElementValues() const;
88
90 const GNEViewNetHelper::MoveMultipleElementModul& getMoveMultipleElementValues() const;
91
93 void updateObjectsInBoundary(const Boundary& boundary);
94
96 void updateObjectsInPosition(const Position& pos);
97
100
106
108 bool setColorScheme(const std::string& name);
109
111 void buildColorRainbow(const GUIVisualizationSettings& s, GUIColorScheme& scheme, int active, GUIGlObjectType objectType,
113
115 std::vector<std::string> getEdgeLaneParamKeys(bool edgeKeys) const;
116
118 std::vector<std::string> getEdgeDataAttrs() const;
119
121 std::vector<std::string> getRelDataAttrs() const;
122
124 int getDrawingToggle() const;
125
127 bool checkSelectEdges() const;
128
130 void openObjectDialogAtCursor(const FXEvent* ev);
131
133 void openDeleteDialogAtCursor(const std::vector<GUIGlObject*>& GLObjects);
134
136 void openSelectDialogAtCursor(const std::vector<GUIGlObject*>& GLObjects);
137
138 // save visualization settings
139 void saveVisualizationSettings() const;
140
142 const GNEViewNetHelper::EditModes& getEditModes() const;
143
145 const GNEViewNetHelper::TestingMode& getTestingMode() const;
146
148 const GNEViewNetHelper::NetworkViewOptions& getNetworkViewOptions() const;
149
151 const GNEViewNetHelper::DemandViewOptions& getDemandViewOptions() const;
152
154 const GNEViewNetHelper::DataViewOptions& getDataViewOptions() const;
155
157 const GNEViewNetHelper::MouseButtonKeyPressed& getMouseButtonKeyPressed() const;
158
160 const GNEViewNetHelper::EditNetworkElementShapes& getEditNetworkElementShapes() const;
161
165 long onLeftBtnPress(FXObject*, FXSelector, void*);
166
168 long onLeftBtnRelease(FXObject*, FXSelector, void*);
169
171 long onMiddleBtnPress(FXObject*, FXSelector, void*);
172
174 long onMiddleBtnRelease(FXObject*, FXSelector, void*);
175
177 long onRightBtnPress(FXObject*, FXSelector, void*);
178
180 long onRightBtnRelease(FXObject*, FXSelector, void*);
181
183 long onMouseMove(FXObject*, FXSelector, void*);
184
186 long onKeyPress(FXObject* o, FXSelector sel, void* data);
187
189 long onKeyRelease(FXObject* o, FXSelector sel, void* data);
191
195 long onCmdSetSupermode(FXObject*, FXSelector sel, void*);
196
198 long onCmdSetMode(FXObject*, FXSelector sel, void*);
199
201
203 long onCmdSplitEdge(FXObject*, FXSelector, void*);
204
206 long onCmdSplitEdgeBidi(FXObject*, FXSelector, void*);
207
209 long onCmdReverseEdge(FXObject*, FXSelector, void*);
210
212 long onCmdAddReversedEdge(FXObject*, FXSelector, void*);
213
215 long onCmdAddReversedEdgeDisconnected(FXObject*, FXSelector, void*);
216
218 long onCmdEditEdgeEndpoint(FXObject*, FXSelector, void*);
219
221 long onCmdResetEdgeEndpoint(FXObject*, FXSelector, void*);
222
224 long onCmdStraightenEdges(FXObject*, FXSelector, void*);
225
227 long onCmdSmoothEdges(FXObject*, FXSelector, void*);
228
230 long onCmdStraightenEdgesElevation(FXObject*, FXSelector, void*);
231
233 long onCmdSmoothEdgesElevation(FXObject*, FXSelector, void*);
234
236 long onCmdResetLength(FXObject*, FXSelector, void*);
237
239 long onCmdEdgeUseAsTemplate(FXObject*, FXSelector, void*);
240
242 long onCmdEgeApplyTemplate(FXObject*, FXSelector, void*);
243
246
248 long onCmdSimplifyShape(FXObject*, FXSelector, void*);
249
251 long onCmdDeleteGeometryPoint(FXObject*, FXSelector, void*);
252
254 long onCmdClosePolygon(FXObject*, FXSelector, void*);
255
257 long onCmdOpenPolygon(FXObject*, FXSelector, void*);
258
260 long onCmdSelectPolygonElements(FXObject*, FXSelector, void*);
261
263 long onCmdSetFirstGeometryPoint(FXObject*, FXSelector, void*);
264
266
270 long onCmdSimplifyShapeEdited(FXObject*, FXSelector, void*);
271
273 long onCmdStraightenShapeEdited(FXObject*, FXSelector, void*);
274
276 long onCmdCloseShapeEdited(FXObject*, FXSelector, void*);
277
279 long onCmdOpenShapeEdited(FXObject*, FXSelector, void*);
280
282 long onCmdSetFirstGeometryPointShapeEdited(FXObject*, FXSelector, void*);
283
285 long onCmdDeleteGeometryPointShapeEdited(FXObject*, FXSelector, void*);
286
288 long onCmdResetShapeEdited(FXObject*, FXSelector, void*);
289
291 long onCmdFinishShapeEdited(FXObject*, FXSelector, void*);
292
294
296 long onCmdTransformPOI(FXObject*, FXSelector, void*);
297
299 long onCmdReverse(FXObject*, FXSelector, void*);
300
302 long onCmdAddReverse(FXObject*, FXSelector, void*);
303
305 long onCmdSetCustomGeometryPoint(FXObject*, FXSelector, void*);
306
308 long onCmdResetEndPoints(FXObject*, FXSelector, void*);
309
311 long onCmdDuplicateLane(FXObject*, FXSelector, void*);
312
314 long onCmdEditLaneShape(FXObject*, FXSelector, void*);
315
317 long onCmdResetLaneCustomShape(FXObject*, FXSelector, void*);
318
320 long onCmdResetOppositeLane(FXObject*, FXSelector, void*);
321
323 long onCmdLaneOperation(FXObject*, FXSelector sel, void*);
324
326 long onCmdLaneReachability(FXObject*, FXSelector sel, void*);
327
329 long onCmdOpenAdditionalDialog(FXObject*, FXSelector, void*);
330
332 long onCmdResetEdgeEndPoints(FXObject*, FXSelector, void*);
333
335 long onCmdEditJunctionShape(FXObject*, FXSelector, void*);
336
338 long onCmdResetJunctionShape(FXObject*, FXSelector, void*);
339
341 long onCmdReplaceJunction(FXObject*, FXSelector, void*);
342
344 long onCmdSplitJunction(FXObject*, FXSelector, void*);
345
347 long onCmdSplitJunctionReconnect(FXObject*, FXSelector, void*);
348
350 long onCmdSelectRoundabout(FXObject*, FXSelector, void*);
351
353 long onCmdConvertRoundabout(FXObject*, FXSelector, void*);
354
356 long onEnterConvertRoundabout(FXObject*, FXSelector, void*);
357
359 long onLeaveConvertRoundabout(FXObject*, FXSelector, void*);
360
362 long onCmdClearConnections(FXObject*, FXSelector, void*);
363
365 long onCmdResetConnections(FXObject*, FXSelector, void*);
366
368 long onCmdAddTLS(FXObject*, FXSelector, void*);
369
371 long onCmdAddJoinTLS(FXObject*, FXSelector, void*);
372
374 long onCmdEditConnectionShape(FXObject*, FXSelector, void*);
375
377 long onCmdSmoothConnectionShape(FXObject*, FXSelector, void*);
378
380 long onCmdEditCrossingShape(FXObject*, FXSelector, void*);
381
383 long onCmdEditWalkingAreaShape(FXObject*, FXSelector, void*);
384
387
389 long onCmdToggleSelectEdges(FXObject*, FXSelector, void*);
390
392 long onCmdToggleShowConnections(FXObject*, FXSelector, void*);
393
395 long onCmdToggleHideConnections(FXObject*, FXSelector, void*);
396
398 long onCmdToggleShowAdditionalSubElements(FXObject*, FXSelector, void*);
399
401 long onCmdToggleShowTAZElements(FXObject*, FXSelector, void*);
402
404 long onCmdToggleExtendSelection(FXObject*, FXSelector, void*);
405
407 long onCmdToggleChangeAllPhases(FXObject*, FXSelector, void*);
408
410 long onCmdToggleShowGrid(FXObject*, FXSelector, void*);
411
413 long onCmdToggleDrawJunctionShape(FXObject*, FXSelector, void*);
414
416 long onCmdToggleDrawSpreadVehicles(FXObject*, FXSelector, void*);
417
419 long onCmdToggleWarnAboutMerge(FXObject*, FXSelector, void*);
420
422 long onCmdToggleShowJunctionBubbles(FXObject*, FXSelector, void*);
423
425 long onCmdToggleMoveElevation(FXObject*, FXSelector, void*);
426
428 long onCmdToggleChainEdges(FXObject*, FXSelector, void*);
429
431 long onCmdToggleAutoOppositeEdge(FXObject*, FXSelector, void*);
432
434 long onCmdToggleHideNonInspecteDemandElements(FXObject*, FXSelector, void*);
435
437 long onCmdToggleShowOverlappedRoutes(FXObject*, FXSelector, void*);
438
440 long onCmdToggleHideShapes(FXObject*, FXSelector, void*);
441
443 long onCmdToggleShowTrips(FXObject*, FXSelector, void*);
444
446 long onCmdToggleShowAllPersonPlans(FXObject*, FXSelector, void*);
447
449 long onCmdToggleLockPerson(FXObject*, FXSelector, void*);
450
452 long onCmdToggleShowAllContainerPlans(FXObject*, FXSelector, void*);
453
455 long onCmdToggleLockContainer(FXObject*, FXSelector, void*);
456
458 long onCmdToggleShowAdditionals(FXObject*, FXSelector, void*);
459
461 long onCmdToggleShowShapes(FXObject*, FXSelector, void*);
462
464 long onCmdToggleShowDemandElementsNetwork(FXObject*, FXSelector, void*);
465
467 long onCmdToggleShowDemandElementsData(FXObject*, FXSelector, void*);
468
470 long onCmdToggleTAZRelDrawing(FXObject*, FXSelector, void*);
471
473 long onCmdToggleTAZDrawFill(FXObject*, FXSelector, void*);
474
476 long onCmdToggleTAZRelOnlyFrom(FXObject*, FXSelector, void*);
477
479 long onCmdToggleTAZRelOnlyTo(FXObject*, FXSelector, void*);
480
482
485
487 long onCmdIntervalBarGenericDataType(FXObject*, FXSelector, void*);
488
490 long onCmdIntervalBarDataSet(FXObject*, FXSelector, void*);
491
493 long onCmdIntervalBarLimit(FXObject*, FXSelector, void*);
494
496 long onCmdIntervalBarSetBegin(FXObject*, FXSelector, void*);
497
499 long onCmdIntervalBarSetEnd(FXObject*, FXSelector, void*);
500
502 long onCmdIntervalBarSetParameter(FXObject*, FXSelector, void*);
503
505
507 long onCmdAddSelected(FXObject*, FXSelector, void*);
508
510 long onCmdRemoveSelected(FXObject*, FXSelector, void*);
511
513 long onCmdAddEdgeSelected(FXObject*, FXSelector, void*);
514
516 long onCmdRemoveEdgeSelected(FXObject*, FXSelector, void*);
517
519 long onCmdSetNeteditView(FXObject*, FXSelector sel, void*);
520
522 void abortOperation(bool clearSelection = true);
523
525 void hotkeyDel();
526
528 void hotkeyEnter();
529
531 void hotkeyBackSpace();
532
534 void hotkeyFocusFrame();
535
538
540 GNENet* getNet() const;
541
543 GNEUndoList* getUndoList() const;
544
546 GNEViewNetHelper::IntervalBar& getIntervalBar();
547
549 GNEViewNetHelper::LockManager& getLockManager();
550
552 GNEViewNetHelper::InspectedElements& getInspectedElements();
553
556
558 const GUIGlObject* getFrontGLObject() const;
559
562
564 void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier* AC, double typeOrLayer, const double extraOffset = 0);
565
567 bool isCurrentlyMovingElements() const;
568
570 bool checkOverLockedElement(const GUIGlObject* GLObject, const bool isSelected) const;
571
574
576 void setLastCreatedRoute(GNEDemandElement* lastCreatedRoute);
577
579 void setStatusBarText(const std::string& text);
580
583
585 bool autoSelectNodes();
586
588 void setSelectorFrameScale(double selectionScale);
589
591 void updateControls();
592
594 bool changeAllPhases() const;
595
597 bool showJunctionAsBubbles() const;
598
600 bool checkMergeJunctions();
601
603 bool askMergeJunctions(const GNEJunction* movedJunction, const GNEJunction* targetJunction);
604
606 bool aksChangeSupermode(const std::string& operation, Supermode expectedSupermode);
607
609 bool selectingDetectorsTLSMode() const;
610
612 bool selectingJunctionsTLSMode() const;
613
615 GNEViewNetHelper::SaveElements& getSaveElements();
616
618 GNEViewNetHelper::TimeFormat& getTimeFormat();
619
621 bool restrictLane(GNELane* lane, SUMOVehicleClass vclass);
622
624 bool addRestrictedLane(GNELane* lane, SUMOVehicleClass vclass, const bool insertAtFront);
625
628
629protected:
631 GNEViewNet();
632
634 int doPaintGL(int mode, const Boundary& drawingBoundary);
635
637 void doInit();
638
641
642private:
645
648
651
654
656
659
662
664
667
670
673
676
679
681
684
687
690
693
695
698
701
703 GNEViewNetHelper::MoveSingleElementModul myMoveSingleElement;
704
706 GNEViewNetHelper::MoveMultipleElementModul myMoveMultipleElements;
707
708 // @}
709
712
715
718
719 // @}
720
723
726
729
732
735
738
741
743 GNENet* myNet = nullptr;
744
747
750
753
756
759
762
764 bool myCreatedPopup = false;
765
768
771
774
777
780
783
786
789
792
795
798
801
804
807
810
813
816
819
822
825
827 void processClick(void* eventData);
828
830 void updateCursor();
831
834
836 int drawGLElements(const Boundary& bound);
837
839 void drawGrid() const;
840
842 void drawTemporalDrawingShape() const;
843
845 void drawTemporalJunction() const;
846
848 void drawTemporalSplitJunction() const;
849
851 void drawTemporalRoundabout() const;
852
854 void drawTemporalE1TLSLines() const;
855
857 void drawTemporalJunctionTLSLines() const;
858
861
863 void drawTestsCircle() const;
864
866
869
871 void processLeftButtonPressNetwork(void* eventData);
872
875
877 void processMoveMouseNetwork(const bool mouseLeftButtonPressed);
878
880 void processLeftButtonPressDemand(void* eventData);
881
884
886 void processMoveMouseDemand(const bool mouseLeftButtonPressed);
887
889 void processLeftButtonPressData(void* eventData);
890
893
895 void processMoveMouseData(const bool mouseLeftButtonPressed);
896
898 GNEViewNet(const GNEViewNet&) = delete;
899
901 GNEViewNet& operator=(const GNEViewNet&) = delete;
902};
Supermode
@brie enum for supermodes
unsigned int GUIGlID
Definition GUIGlObject.h:43
GUIGlObjectType
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
An Element which don't belong to GNENet but has influence in the simulation.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition GNECrossing.h:44
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
GNEViewNetHelper::EditNetworkElementShapes myEditNetworkElementShapes
struct for grouping all variables related with edit shapes
Definition GNEViewNet.h:731
long onCmdToggleShowDemandElementsNetwork(FXObject *, FXSelector, void *)
toggle show demand elements (network)
long onCmdClosePolygon(FXObject *, FXSelector, void *)
close opened polygon
bool isCurrentlyMovingElements() const
check if an element is being moved
long onCmdEditCrossingShape(FXObject *, FXSelector, void *)
edit crossing shape
void processMoveMouseNetwork(const bool mouseLeftButtonPressed)
process move mouse function in Supermode Network
const GNEViewNetHelper::DataViewOptions & getDataViewOptions() const
get data view options
GNENet * getNet() const
get the net object
long onCmdSetFirstGeometryPoint(FXObject *, FXSelector, void *)
set as first geometry point the closes geometry point
long onCmdEdgeUseAsTemplate(FXObject *, FXSelector, void *)
use edge as template
long onCmdSmoothConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
GNEViewNetHelper::CommonCheckableButtons myCommonCheckableButtons
variable used to save checkable buttons for common supermodes
Definition GNEViewNet.h:669
long onMouseMove(FXObject *, FXSelector, void *)
called when user moves mouse
const GNEAttributeCarrier * getFrontAttributeCarrier() const
get front attributeCarrier
void hotkeyBackSpace()
handle backspace keypress
GNEDemandElement * myLastCreatedRoute
last created route
Definition GNEViewNet.h:755
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
long onCmdAddSelected(FXObject *, FXSelector, void *)
select AC under cursor
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
void setFrontAttributeCarrier(GNEAttributeCarrier *AC)
set front attributeCarrier
GNECrossing * getCrossingAtPopupPosition()
try to retrieve a crossing at popup position
void buildViewToolBars(GUIGlChildWindow *v)
builds the view toolbars
void updateNetworkModeSpecificControls()
updates Network mode specific controls
long onCmdAddTLS(FXObject *, FXSelector, void *)
add TLS
long onCmdSmoothEdges(FXObject *, FXSelector, void *)
smooth geometry
long onCmdStraightenEdges(FXObject *, FXSelector, void *)
makes selected edges straight
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed module
void updateCursor()
update cursor after every click/key press/release
void updateDataModeSpecificControls()
updates Data mode specific controls
GNEEdge * getEdgeAtPopupPosition()
try to retrieve an edge at popup position
long onCmdToggleShowDemandElementsData(FXObject *, FXSelector, void *)
toggle show demand elements (data)
GNEViewNetHelper::EditModes myEditModes
variable used to save variables related with edit moves modes
Definition GNEViewNet.h:650
long onCmdReplaceJunction(FXObject *, FXSelector, void *)
replace node by geometry
bool restrictLane(GNELane *lane, SUMOVehicleClass vclass)
restrict lane
long onCmdSplitJunction(FXObject *, FXSelector, void *)
split junction into multiple junctions
void drawGrid() const
draw grid and update grid button
void deleteDemandAttributeCarrier(const GNEAttributeCarrier *AC)
delete given demand attribute carriers
long onCmdClearConnections(FXObject *, FXSelector, void *)
clear junction connections
void abortOperation(bool clearSelection=true)
abort current edition operation
long onCmdToggleTAZDrawFill(FXObject *, FXSelector, void *)
toggle TAZdrawFill
long onCmdResetEndPoints(FXObject *, FXSelector, void *)
reset edge end points
void updateObjectsInPosition(const Position &pos)
update objects and boundaries in position
GNEViewNetHelper::TestingMode myTestingMode
variable used to save variables related with testing mode
Definition GNEViewNet.h:653
GNEDemandElement * getLastCreatedRoute() const
get last created route
GNEViewNetHelper::InspectedElements & getInspectedElements()
get inspected elements
long onCmdToggleWarnAboutMerge(FXObject *, FXSelector, void *)
toggle warn for merge
long onCmdToggleDrawSpreadVehicles(FXObject *, FXSelector, void *)
toggle draw vehicles in begin position or spread in lane
GNEPOI * getPOIAtPopupPosition()
try to retrieve a POILane at popup position
GNEViewNetHelper::SelectingArea mySelectingArea
variable used for grouping all variables related with selecting areas
Definition GNEViewNet.h:728
GNENetworkElement * getShapeEditedAtPopupPosition()
try to retreive a edited shape at popup position
const GNEViewNetHelper::MoveSingleElementModul & getMoveSingleElementValues() const
get move single element values
long onCmdToggleShowConnections(FXObject *, FXSelector, void *)
toggle show connections
void updateObjectsInBoundary(const Boundary &boundary)
get objects in the given boundary
long onCmdLaneReachability(FXObject *, FXSelector sel, void *)
show lane reachability
long onCmdToggleShowTAZElements(FXObject *, FXSelector, void *)
toggle show TAZ elements
GNEViewNetHelper::VehicleOptions myVehicleOptions
variable used to save variables related with vehicle options
Definition GNEViewNet.h:714
GNEViewNetHelper::NetworkCheckableButtons myNetworkCheckableButtons
variable used to save checkable buttons for Supermode Network
Definition GNEViewNet.h:672
long onCmdCloseShapeEdited(FXObject *, FXSelector, void *)
close opened shape edited
std::vector< std::string > getEdgeDataAttrs() const
return list of loaded edgeData attributes
bool myCreatedPopup
flag for mark if during this frame a popup was created (needed to avoid problems in linux with Cursor...
Definition GNEViewNet.h:764
void openSelectDialogAtCursor(const std::vector< GUIGlObject * > &GLObjects)
open select dialog at cursor
long onCmdSimplifyShapeEdited(FXObject *, FXSelector, void *)
void openObjectDialogAtCursor(const FXEvent *ev)
open object dialog
void processClick(void *eventData)
Auxiliary function used by onLeftBtnPress(...)
void drawNeteditAttributesReferences()
draw circle in testing mode (needed for grid)
long onCmdSimplifyShape(FXObject *, FXSelector, void *)
simply shape of current polygon
GNELane * getLaneAtPopupPosition()
try to retrieve a lane at popup position
GNEAttributeCarrier * myFrontAttributeCarrier
front attribute carrier
Definition GNEViewNet.h:752
GNEViewNetHelper::MouseButtonKeyPressed myMouseButtonKeyPressed
variable used to save key status after certain events
Definition GNEViewNet.h:661
void recalculateBoundaries()
recalculate boundaries
GNEViewNetHelper::IntervalBar myIntervalBar
variable used to save IntervalBar
Definition GNEViewNet.h:697
GNEViewParent * myViewParent
view parent
Definition GNEViewNet.h:740
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
bool changeAllPhases() const
change all phases
long onCmdEditJunctionShape(FXObject *, FXSelector, void *)
edit junction shape
long onCmdToggleMoveElevation(FXObject *, FXSelector, void *)
toggle move elevation
GNEWalkingArea * getWalkingAreaAtPopupPosition()
try to retrieve a walkingArea at popup position
long onCmdToggleShowAllPersonPlans(FXObject *, FXSelector, void *)
toggle show all person plans in super mode demand
bool setColorScheme(const std::string &name)
set color scheme
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
open additional dialog
long onCmdToggleTAZRelOnlyTo(FXObject *, FXSelector, void *)
toggle TAZRez only to
long onCmdEgeApplyTemplate(FXObject *, FXSelector, void *)
apply template to edge
long onCmdSetNeteditView(FXObject *, FXSelector sel, void *)
called when a new view is set
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
void hotkeyFocusFrame()
handle focus frame keypress
long onCmdToggleChainEdges(FXObject *, FXSelector, void *)
toggle chain edges
GNEViewNetHelper::DemandViewOptions myDemandViewOptions
variable used to save variables related with view options in supermode Demand
Definition GNEViewNet.h:689
void drawTemporalJunctionTLSLines() const
draw temporal Junction TLS Lines
std::vector< std::string > getEdgeLaneParamKeys(bool edgeKeys) const
return list of available edge parameters
long onCmdLaneOperation(FXObject *, FXSelector sel, void *)
add/remove/restrict lane
void processMoveMouseData(const bool mouseLeftButtonPressed)
process move mouse function in Supermode Data
GNEFrame * myCurrentFrame
the current frame
Definition GNEViewNet.h:746
bool autoSelectNodes()
whether to autoselect nodes or to lanes
void drawTemporalRoundabout() const
draw temporal roundabout
void deleteDataAttributeCarrier(const GNEAttributeCarrier *AC)
delete data attribute carriers
long onCmdToggleLockContainer(FXObject *, FXSelector, void *)
toggle lock container in super mode demand
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
Definition GNEViewNet.h:749
void drawTranslateFrontAttributeCarrier(const GNEAttributeCarrier *AC, double typeOrLayer, const double extraOffset=0)
draw front attributeCarrier
GNEViewNetHelper::NetworkViewOptions myNetworkViewOptions
variable used to save variables related with view options in supermode Network
Definition GNEViewNet.h:686
void doInit()
called after some features are already initialized
long onCmdResetEdgeEndPoints(FXObject *, FXSelector, void *)
edit junction shape
void buildEditModeControls()
create edit mode buttons and elements
GNEViewNetHelper::MoveSingleElementModul myMoveSingleElement
modul used for moving single element
Definition GNEViewNet.h:703
long onMiddleBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
int getDrawingToggle() const
get draw toggle (used to avoid drawing junctions twice)
GNEViewNetHelper::DataCheckableButtons myDataCheckableButtons
variable used to save checkable buttons for Supermode Data
Definition GNEViewNet.h:678
long onCmdToggleShowGrid(FXObject *, FXSelector, void *)
toggle show grid
void processLeftButtonPressDemand(void *eventData)
process left button press function in Supermode Demand
GNEDemandElement * getDemandElementAtPopupPosition()
try to retrieve a demand element at popup position
GNEViewNetHelper::TimeFormat myTimeFormat
variable used for grouping all variables related with switch time
Definition GNEViewNet.h:725
long onLeaveConvertRoundabout(FXObject *, FXSelector, void *)
leave to convert junction to roundabout
GNEViewNetHelper::IntervalBar & getIntervalBar()
get interval bar
long onCmdEditLaneShape(FXObject *, FXSelector, void *)
edit lane shape
long onCmdToggleHideNonInspecteDemandElements(FXObject *, FXSelector, void *)
toggle hide non inspected demand elements
GNEViewParent * getViewParent() const
get the net object
long onCmdToggleDrawJunctionShape(FXObject *, FXSelector, void *)
toggle draw junction shape
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
long onCmdStraightenShapeEdited(FXObject *, FXSelector, void *)
straight shape edited
long onCmdAddReversedEdge(FXObject *, FXSelector, void *)
add reversed edge
void processLeftButtonReleaseNetwork()
process left button release function in Supermode Network
long onCmdDeleteGeometryPointShapeEdited(FXObject *, FXSelector, void *)
delete the closes geometry point in shape edited
bool checkSelectEdges() const
check if select edges (toggle using button or shift)
long onMiddleBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's left button
long onCmdAddReversedEdgeDisconnected(FXObject *, FXSelector, void *)
add reversed edge disconnected
long onCmdIntervalBarGenericDataType(FXObject *, FXSelector, void *)
change generic data type in interval bar
long onCmdConvertRoundabout(FXObject *, FXSelector, void *)
convert junction to roundabout
long onCmdRemoveEdgeSelected(FXObject *, FXSelector, void *)
unselect Edge under cursor
long onCmdAddReverse(FXObject *, FXSelector, void *)
add a reverse demand element
long onCmdToggleShowShapes(FXObject *, FXSelector, void *)
toggle show shapes in super mode data
long onRightBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's right button
long onCmdOpenPolygon(FXObject *, FXSelector, void *)
open closed polygon
GNEViewNetHelper::InspectedElements myInspectedElements
inspected element
Definition GNEViewNet.h:737
long onCmdSetCustomGeometryPoint(FXObject *, FXSelector, void *)
set custom geometry point
bool removeRestrictedLane(GNELane *lane, SUMOVehicleClass vclass)
remove restricted lane
long onCmdIntervalBarDataSet(FXObject *, FXSelector, void *)
change data set in interval bar
GNEViewNetHelper::SaveElements & getSaveElements()
get variable used to save elements
void processLeftButtonReleaseDemand()
process left button release function in Supermode Demand
void resetLastClickedPosition()
reset last clicked position
const GNEViewNetHelper::TestingMode & getTestingMode() const
get testing mode
GNEUndoList * getUndoList() const
get the undoList object
void processLeftButtonPressData(void *eventData)
process left button press function in Supermode Data
long onCmdTransformPOI(FXObject *, FXSelector, void *)
transform POI to POILane, and vice versa
void saveVisualizationSettings() const
GNEViewNetHelper::SaveElements mySaveElements
variable used for grouping all variables related with salve elements
Definition GNEViewNet.h:722
const GNEViewNetHelper::MoveMultipleElementModul & getMoveMultipleElementValues() const
get move multiple element values
void deleteNetworkAttributeCarrier(const GNEAttributeCarrier *AC)
delete given network attribute carriers
GNEViewNetHelper::LockManager myLockManager
lock manager
Definition GNEViewNet.h:734
long onCmdAddEdgeSelected(FXObject *, FXSelector, void *)
select Edge under cursor
long onCmdIntervalBarSetEnd(FXObject *, FXSelector, void *)
change end in interval bar
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
void drawTemporalDrawingShape() const
draw temporal polygon shape in Polygon Mode
void setLastCreatedRoute(GNEDemandElement *lastCreatedRoute)
set last created route
void drawTestsCircle() const
draw circle in testing mode (needed for grid)
long onCmdSplitEdgeBidi(FXObject *, FXSelector, void *)
split edge at cursor position
long onCmdAddJoinTLS(FXObject *, FXSelector, void *)
add Join TLS
GUIGlID getToolTipID()
returns the id of object under cursor to show their tooltip
GNEJunction * getJunctionAtPopupPosition()
try to retrieve a junction at popup position
void drawTemporalSplitJunction() const
draw temporal split junction in create edge mode
long onCmdSetSupermode(FXObject *, FXSelector sel, void *)
long onCmdToggleExtendSelection(FXObject *, FXSelector, void *)
toggle extend selection
GNEViewNetHelper::DemandCheckableButtons myDemandCheckableButtons
variable used to save checkable buttons for Supermode Demand
Definition GNEViewNet.h:675
const GUIGlObject * getFrontGLObject() const
get front glObject
bool checkMergeJunctions()
try to merge moved junction with another junction in that spot return true if merging did take place
bool aksChangeSupermode(const std::string &operation, Supermode expectedSupermode)
ask about change supermode
GNETAZ * getTAZAtPopupPosition()
try to retrieve a TAZ at popup position
long onCmdSetMode(FXObject *, FXSelector sel, void *)
called when user press a mode button (Network or demand)
long onCmdResetEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
bool askMergeJunctions(const GNEJunction *movedJunction, const GNEJunction *targetJunction)
ask merge junctions
long onCmdIntervalBarSetBegin(FXObject *, FXSelector, void *)
change begin in interval bar
long onCmdResetLength(FXObject *, FXSelector, void *)
reset custom edge lengths
Position myLastClickedPosition
last clicked position
Definition GNEViewNet.h:761
long onCmdSelectPolygonElements(FXObject *, FXSelector, void *)
select elements within polygon boundary
long onCmdSetFirstGeometryPointShapeEdited(FXObject *, FXSelector, void *)
set first geometry point in shape edited
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
unselect AC under cursor
long onCmdDeleteGeometryPoint(FXObject *, FXSelector, void *)
delete the closes geometry point
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
void processLeftButtonPressNetwork(void *eventData)
mouse process functions
void hotkeyEnter()
handle enter keypress
GNEConnection * getConnectionAtPopupPosition()
try to retrieve a connection at popup position
long onCmdOpenShapeEdited(FXObject *, FXSelector, void *)
open closed shape edited
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when user press a key
long onCmdToggleShowOverlappedRoutes(FXObject *, FXSelector, void *)
toggle hide non inspected demand elements
long onCmdToggleAutoOppositeEdge(FXObject *, FXSelector, void *)
toggle autoOpposite edge
long onCmdSplitEdge(FXObject *, FXSelector, void *)
split edge at cursor position
GNEViewNetHelper::LockManager & getLockManager()
get lock manager
long onCmdStraightenEdgesElevation(FXObject *, FXSelector, void *)
interpolate z values linear between junctions
void updateControls()
update control contents after undo/redo or recompute
GNEViewNetHelper::MoveMultipleElementModul myMoveMultipleElements
modul used for moving multiple elements
Definition GNEViewNet.h:706
long onCmdSplitJunctionReconnect(FXObject *, FXSelector, void *)
split junction into multiple junctions and reconnect them
long onCmdFinishShapeEdited(FXObject *, FXSelector, void *)
finish shape edited
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
void hotkeyDel()
handle del keypress
long onCmdToggleChangeAllPhases(FXObject *, FXSelector, void *)
toggle change all phases
long onEnterConvertRoundabout(FXObject *, FXSelector, void *)
enter to convert junction to roundabout
bool myDrawPreviewRoundabout
draw preview roundabout
Definition GNEViewNet.h:758
void redrawPathElementContours()
redraw elements only for calculating boundary
long onCmdToggleTAZRelDrawing(FXObject *, FXSelector, void *)
toggle TAZRel drawing
long onCmdToggleShowJunctionBubbles(FXObject *, FXSelector, void *)
toggle show junction bubbles
bool selectingDetectorsTLSMode() const
check if we're selecting detectors in TLS mode
bool selectingJunctionsTLSMode() const
check if we're selecting junctions in TLS mode
long onCmdToggleShowAdditionalSubElements(FXObject *, FXSelector, void *)
toggle show additional sub-elements
long onCmdSmoothEdgesElevation(FXObject *, FXSelector, void *)
smooth elevation with regard to adjoining edges
long onCmdToggleShowAllContainerPlans(FXObject *, FXSelector, void *)
toggle show all container plans in super mode demand
GNEViewNetHelper::VehicleTypeOptions myVehicleTypeOptions
variable used to save variables related with vehicle type options
Definition GNEViewNet.h:717
long onCmdResetJunctionShape(FXObject *, FXSelector, void *)
reset junction shape
long onCmdToggleTAZRelOnlyFrom(FXObject *, FXSelector, void *)
toggle TAZRez only from
long onCmdResetShapeEdited(FXObject *, FXSelector, void *)
reset shape edited
long onRightBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's right button
void buildColorRainbow(const GUIVisualizationSettings &s, GUIColorScheme &scheme, int active, GUIGlObjectType objectType, const GUIVisualizationRainbowSettings &rs)
recalibrate color scheme according to the current value range
long onCmdIntervalBarSetParameter(FXObject *, FXSelector, void *)
change parameter in interval bar
void drawTemporalE1TLSLines() const
draw temporal E1 TLS Lines
long onCmdReverseEdge(FXObject *, FXSelector, void *)
reverse edge
void processLeftButtonReleaseData()
process left button release function in Supermode Data
long onCmdToggleShowAdditionals(FXObject *, FXSelector, void *)
toggle show additionals in super mode data
long onCmdToggleLockPerson(FXObject *, FXSelector, void *)
toggle lock person in super mode demand
GNEViewNetHelper::TimeFormat & getTimeFormat()
get variable used to switch between time formats
GNENet * myNet
Pointer to current net. (We are not responsible for deletion)
Definition GNEViewNet.h:743
GNEPoly * getPolygonAtPopupPosition()
try to retrieve a polygon at popup position
long onCmdToggleSelectEdges(FXObject *, FXSelector, void *)
toggle select edges
GNEViewNetHelper::DataViewOptions myDataViewOptions
variable used to save variables related with view options in supermode Data
Definition GNEViewNet.h:692
int myDrawingToggle
drawin toggle (used in drawGLElements to avoid draw elements twice)
Definition GNEViewNet.h:767
long onCmdToggleShowTrips(FXObject *, FXSelector, void *)
toggle show all trips in super mode demand
long onCmdToggleHideShapes(FXObject *, FXSelector, void *)
toggle hide shapes in super mode demand
long onCmdEditEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
long onCmdToggleHideConnections(FXObject *, FXSelector, void *)
toggle hide connections
void openDeleteDialogAtCursor(const std::vector< GUIGlObject * > &GLObjects)
open delete dialog at cursor
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when user release a key
long onCmdResetConnections(FXObject *, FXSelector, void *)
reset junction connections
long onCmdResetLaneCustomShape(FXObject *, FXSelector, void *)
reset custom shapes of selected lanes
bool addRestrictedLane(GNELane *lane, SUMOVehicleClass vclass, const bool insertAtFront)
add restricted lane
void setStatusBarText(const std::string &text)
set statusBar text
long onCmdEditWalkingAreaShape(FXObject *, FXSelector, void *)
edit walkingArea shape
void processMoveMouseDemand(const bool mouseLeftButtonPressed)
process move mouse function in Supermode Demand
long onCmdResetOppositeLane(FXObject *, FXSelector, void *)
reset oppositeLane of current lane
void setSelectorFrameScale(double selectionScale)
set selection scaling (in GNESelectorFrame)
void viewUpdated()
called when view is updated
long onCmdEditConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
void updateDemandModeSpecificControls()
updates Demand mode specific controls
void forceSupemodeNetwork()
force supermode network(used after load/create new network)
GNEAdditional * getAdditionalAtPopupPosition()
try to retrieve a additional at popup position
long onCmdReverse(FXObject *, FXSelector, void *)
reverse current demand element
void drawTemporalJunction() const
draw temporal junction in create edge mode
long onCmdSelectRoundabout(FXObject *, FXSelector, void *)
select all roundabout nodes and edges
long onLeftBtnPress(FXObject *, FXSelector, void *)
void updateViewNet(const bool ignoreViewUpdater=true) const
Mark the entire GNEViewNet to be repainted later.
int doPaintGL(int mode, const Boundary &drawingBoundary)
do paintGL
std::vector< std::string > getRelDataAttrs() const
return list of loaded edgeRelation and tazRelation attributes
int drawGLElements(const Boundary &bound)
draw functions
long onCmdIntervalBarLimit(FXObject *, FXSelector, void *)
change limit interval in interval bar
GNEViewNetHelper::ViewObjectsSelector myViewObjectsSelector
variable use to select objects in view
Definition GNEViewNet.h:644
A single child window which contains a view of the simulation area.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
The popup menu of a globject.
Stores the information about how to visualize structures.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
Definition json.hpp:4471