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
24
25// ===========================================================================
26// class definitions
27// ===========================================================================
28
29class GNEMoveFrame : public GNEFrame {
30
31public:
32 // ===========================================================================
33 // class CommonMoveOptions
34 // ===========================================================================
35
37
38 public:
40 CommonMoveOptions(GNEMoveFrame* moveFrameParent);
41
44
46 bool getAllowChangeLane() const;
47
49 bool getMergeGeometryPoints() const;
50
51 private:
53 FXCheckButton* myAllowChangeLanes;
54
56 FXCheckButton* myMergeGeometryPoints;
57 };
58
59 // ===========================================================================
60 // class NetworkMoveOptions
61 // ===========================================================================
62
66
67 public:
69 NetworkMoveOptions(GNEMoveFrame* moveFrameParent);
70
73
76
79
81 bool getMoveWholePolygons() const;
82
84 bool getForceDrawGeometryPoints() const;
85
87 bool getMoveOnlyJunctionCenter() const;
88
92 long onCmdChangeOption(FXObject*, FXSelector, void*);
93
95
96 protected:
98 FOX_CONSTRUCTOR(NetworkMoveOptions)
99
100 private:
103
105 FXCheckButton* myMoveWholePolygons = nullptr;
106
108 FXCheckButton* myForceDrawGeometryPoints = nullptr;
109
111 FXCheckButton* myMoveOnlyJunctionCenter = nullptr;
112 };
113
114 // ===========================================================================
115 // class DemandMoveOptions
116 // ===========================================================================
117
119
120 public:
122 DemandMoveOptions(GNEMoveFrame* moveFrameParent);
123
126
129
132
134 bool getLeaveStopPersonsConnected() const;
135
136 private:
139
141 FXCheckButton* myLeaveStopPersonsConnected = nullptr;
142 };
143
144 // ===========================================================================
145 // class ShiftEdgeSelectedGeometry
146 // ===========================================================================
147
151
152 public:
154 ShiftEdgeSelectedGeometry(GNEMoveFrame* moveFrameParent);
155
158
161
164
168 long onCmdChangeShiftValue(FXObject*, FXSelector, void*);
169
171 long onCmdShiftEdgeGeometry(FXObject*, FXSelector, void*);
172
174
175 protected:
177 FOX_CONSTRUCTOR(ShiftEdgeSelectedGeometry)
178
179 private:
182
184 FXTextField* myShiftValueTextField = nullptr;
185
187 FXButton* myApplyZValue = nullptr;
188 };
189
190 // ===========================================================================
191 // class ChangeZInSelection
192 // ===========================================================================
193
197
198 public:
200 ChangeZInSelection(GNEMoveFrame* moveFrameParent);
201
204
207
210
214 long onCmdChangeZValue(FXObject*, FXSelector, void*);
215
217 long onCmdChangeZMode(FXObject*, FXSelector, void*);
218
220 long onCmdApplyZ(FXObject*, FXSelector, void*);
221
223
224 protected:
226 FOX_CONSTRUCTOR(ChangeZInSelection)
227
228
229 void updateInfoLabel();
230
231 private:
234
236 FXTextField* myZValueTextField = nullptr;
237
239 FXRadioButton* myAbsoluteValue = nullptr;
240
242 FXButton* myApplyButton = nullptr;
243
245 FXRadioButton* myRelativeValue = nullptr;
246
248 FXLabel* myInfoLabel = nullptr;
249 };
250
251 // ===========================================================================
252 // class ShiftShapeGeometry
253 // ===========================================================================
254
258
259 public:
261 ShiftShapeGeometry(GNEMoveFrame* moveFrameParent);
262
265
268
271
275 long onCmdChangeShiftValue(FXObject*, FXSelector, void*);
276
278 long onCmdShiftShapeGeometry(FXObject*, FXSelector, void*);
279
281
282 protected:
284 FOX_CONSTRUCTOR(ShiftShapeGeometry)
285
286 private:
289
291 FXTextField* myShiftValueXTextField = nullptr;
292
294 FXTextField* myShiftValueYTextField = nullptr;
295 };
296
297 // ===========================================================================
298 // class Information
299 // ===========================================================================
300
302
303 public:
305 Information(GNEMoveFrame* moveFrameParent);
306
308 ~Information();
309 };
310
315 GNEMoveFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
316
319
325 void processClick(const Position& clickedPosition,
326 const GNEViewNetHelper::ViewObjectsSelector& viewObjects,
327 const GNEViewNetHelper::ViewObjectsSelector& objectsUnderGrippedCursor);
328
330 void show();
331
333 void hide();
334
337
340
343
344private:
347
350
353
356
359
362
365};
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