Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEMoveFrame.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-2025 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// The Widget for move elements
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
26// ===========================================================================
27// class definitions
28// ===========================================================================
29
30class GNEMoveFrame : public GNEFrame {
31
32public:
33 // ===========================================================================
34 // class CommonMoveOptions
35 // ===========================================================================
36
38
39 public:
41 CommonMoveOptions(GNEMoveFrame* moveFrameParent);
42
45
47 bool getAllowChangeLane() const;
48
50 bool getMergeGeometryPoints() const;
51
52 private:
54 FXCheckButton* myAllowChangeLanes;
55
57 FXCheckButton* myMergeGeometryPoints;
58 };
59
60 // ===========================================================================
61 // class NetworkMoveOptions
62 // ===========================================================================
63
67
68 public:
70 NetworkMoveOptions(GNEMoveFrame* moveFrameParent);
71
74
77
80
82 bool getMoveWholePolygons() const;
83
85 bool getForceDrawGeometryPoints() const;
86
88 bool getMoveOnlyJunctionCenter() const;
89
93 long onCmdChangeOption(FXObject*, FXSelector, void*);
94
96
97 protected:
99 FOX_CONSTRUCTOR(NetworkMoveOptions)
100
101 private:
104
106 FXCheckButton* myMoveWholePolygons = nullptr;
107
109 FXCheckButton* myForceDrawGeometryPoints = nullptr;
110
112 FXCheckButton* myMoveOnlyJunctionCenter = nullptr;
113 };
114
115 // ===========================================================================
116 // class DemandMoveOptions
117 // ===========================================================================
118
120
121 public:
123 DemandMoveOptions(GNEMoveFrame* moveFrameParent);
124
127
130
133
135 bool getLeaveStopPersonsConnected() const;
136
137 private:
140
142 FXCheckButton* myLeaveStopPersonsConnected = nullptr;
143 };
144
145 // ===========================================================================
146 // class ShiftEdgeSelectedGeometry
147 // ===========================================================================
148
152
153 public:
155 ShiftEdgeSelectedGeometry(GNEMoveFrame* moveFrameParent);
156
159
162
165
169 long onCmdChangeShiftValue(FXObject*, FXSelector, void*);
170
172 long onCmdShiftEdgeGeometry(FXObject*, FXSelector, void*);
173
175
176 protected:
178 FOX_CONSTRUCTOR(ShiftEdgeSelectedGeometry)
179
180 private:
183
185 FXTextField* myShiftValueTextField = nullptr;
186
188 FXButton* myApplyZValue = nullptr;
189 };
190
191 // ===========================================================================
192 // class ChangeZInSelection
193 // ===========================================================================
194
198
199 public:
201 ChangeZInSelection(GNEMoveFrame* moveFrameParent);
202
205
208
211
215 long onCmdChangeZValue(FXObject*, FXSelector, void*);
216
218 long onCmdChangeZMode(FXObject*, FXSelector, void*);
219
221 long onCmdApplyZ(FXObject*, FXSelector, void*);
222
224
225 protected:
227 FOX_CONSTRUCTOR(ChangeZInSelection)
228
229
230 void updateInfoLabel();
231
232 private:
235
237 FXTextField* myZValueTextField = nullptr;
238
240 FXRadioButton* myAbsoluteValue = nullptr;
241
243 FXButton* myApplyButton = nullptr;
244
246 FXRadioButton* myRelativeValue = nullptr;
247
249 FXLabel* myInfoLabel = nullptr;
250 };
251
252 // ===========================================================================
253 // class ShiftShapeGeometry
254 // ===========================================================================
255
259
260 public:
262 ShiftShapeGeometry(GNEMoveFrame* moveFrameParent);
263
266
269
272
276 long onCmdChangeShiftValue(FXObject*, FXSelector, void*);
277
279 long onCmdShiftShapeGeometry(FXObject*, FXSelector, void*);
280
282
283 protected:
285 FOX_CONSTRUCTOR(ShiftShapeGeometry)
286
287 private:
290
292 FXTextField* myShiftValueXTextField = nullptr;
293
295 FXTextField* myShiftValueYTextField = nullptr;
296 };
297
298 // ===========================================================================
299 // class Information
300 // ===========================================================================
301
303
304 public:
306 Information(GNEMoveFrame* moveFrameParent);
307
309 ~Information();
310 };
311
316 GNEMoveFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
317
320
326 void processClick(const Position& clickedPosition,
327 const GNEViewNetHelper::ViewObjectsSelector& viewObjects,
328 const GNEViewNetHelper::ViewObjectsSelector& objectsUnderGrippedCursor);
329
331 void show();
332
334 void hide();
335
338
341
344
345private:
348
351
354
357
360
363
366};
void updateInfoLabel()
FOX need this.
GNEMoveFrame * myMoveFrameParent
pointer to move frame parent
void disableChangeZInSelection()
disable change Z in selection
FXRadioButton * myRelativeValue
radio button for relative value
FXRadioButton * myAbsoluteValue
radio button for absolute value
long onCmdChangeZValue(FXObject *, FXSelector, void *)
FXButton * myApplyButton
apply button
void enableChangeZInSelection()
enabale change Z in selection
FXLabel * myInfoLabel
info label
long onCmdChangeZMode(FXObject *, FXSelector, void *)
Called when user changes Z mode.
FXTextField * myZValueTextField
textField for Z value
long onCmdApplyZ(FXObject *, FXSelector, void *)
Called when user press the apply Z value button.
FXCheckButton * myMergeGeometryPoints
checkbox for enable/disable merge geometry points
bool getMergeGeometryPoints() const
check if merge geometry points
bool getAllowChangeLane() const
allow change lane
FXCheckButton * myAllowChangeLanes
checkbox for enable/disable change lanes
void hideDemandMoveOptions()
hide DemandMoveOptions
bool getLeaveStopPersonsConnected() const
check if leave stopPersonConnected is enabled
FXCheckButton * myLeaveStopPersonsConnected
checkbox for enable/disable leave stopPersons connected
void showDemandMoveOptions()
show DemandMoveOptions
GNEMoveFrame * myMoveFrameParent
pointer to move frame parent
bool getMoveWholePolygons() const
check if option "move whole polygons" is enabled
FXCheckButton * myMoveWholePolygons
checkbox for enable/disable move whole polygons
bool getForceDrawGeometryPoints() const
check if option "force draw geometry points" is enabled
GNEMoveFrame * myMoveFrameParent
FOX need this.
long onCmdChangeOption(FXObject *, FXSelector, void *)
bool getMoveOnlyJunctionCenter() const
check if option "move only junction center" is enabled
void showNetworkMoveOptions()
show NetworkMoveOptions
FXCheckButton * myMoveOnlyJunctionCenter
checkbox for move only juntion center
FXCheckButton * myForceDrawGeometryPoints
checkbox for force draw geometry points
void hideNetworkMoveOptions()
hide NetworkMoveOptions
long onCmdChangeShiftValue(FXObject *, FXSelector, void *)
FXButton * myApplyZValue
button for apply Z value
void enableShiftEdgeGeometry()
enable shift edge geometry
GNEMoveFrame * myMoveFrameParent
FOX need this.
void disableShiftEdgeGeometry()
disable change Z in selection
FXTextField * myShiftValueTextField
textField for shift value
long onCmdShiftEdgeGeometry(FXObject *, FXSelector, void *)
Called when user press the apply Z value button.
void hideShiftShapeGeometry()
hide change Z in selection
FXTextField * myShiftValueYTextField
textField for shiftY value
long onCmdChangeShiftValue(FXObject *, FXSelector, void *)
FXTextField * myShiftValueXTextField
textField for shiftX value
long onCmdShiftShapeGeometry(FXObject *, FXSelector, void *)
Called when user press the apply Z value button.
GNEMoveFrame * myMoveFrameParent
FOX need this.
void showShiftShapeGeometry()
show shift shape geometry
void show()
show prohibition frame
ChangeZInSelection * myChangeZInSelection
modul for change Z in selection
NetworkMoveOptions * myNetworkMoveOptions
modul for NetworkMove Options
DemandMoveOptions * getDemandMoveOptions() const
get demand mode options
DemandMoveOptions * myDemandMoveOptions
modul for DemandMove Options
CommonMoveOptions * getCommonMoveOptions() const
get common mode options
void hide()
hide prohibition frame
~GNEMoveFrame()
Destructor.
ShiftEdgeSelectedGeometry * myShiftEdgeSelectedGeometry
modul for shift edge selected geometry
NetworkMoveOptions * getNetworkMoveOptions() const
get network mode options
CommonMoveOptions * myCommonMoveOptions
modul for CommonMove Options
Information * myInformation
modul for show information
ShiftShapeGeometry * myShiftShapeGeometry
modul for shift shape geometry
void processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const GNEViewNetHelper::ViewObjectsSelector &objectsUnderGrippedCursor)
handle processClick and set the relative coloring
class used to group all variables related with objects under cursor after a click over view
A single child window which contains a view of the simulation area.
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37