Eclipse SUMO - Simulation of Urban MObility
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-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 // The Widget for move elements
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
24 
25 
26 // ===========================================================================
27 // class definitions
28 // ===========================================================================
33 class GNEMoveFrame : public GNEFrame {
34 
35 public:
36  // ===========================================================================
37  // class CommonModeOptions
38  // ===========================================================================
39 
41 
42  public:
44  CommonModeOptions(GNEMoveFrame* moveFrameParent);
45 
48 
50  bool getAllowChangeLane() const;
51 
53  bool getMergeGeometryPoints() const;
54 
55  private:
57  FXCheckButton* myAllowChangeLanes;
58 
60  FXCheckButton* myMergeGeometryPoints;
61  };
62 
63  // ===========================================================================
64  // class NetworkModeOptions
65  // ===========================================================================
66 
70 
71  public:
73  NetworkModeOptions(GNEMoveFrame* moveFrameParent);
74 
77 
80 
83 
85  bool getMoveWholePolygons() const;
86 
88  bool getForceDrawGeometryPoints() const;
89 
93  long onCmdChangeOption(FXObject*, FXSelector, void*);
94 
96 
97  protected:
99  FOX_CONSTRUCTOR(NetworkModeOptions)
100 
101  private:
104 
106  FXCheckButton* myMoveWholePolygons = nullptr;
107 
109  FXCheckButton* myForceDrawGeometryPoints = nullptr;
110  };
111 
112  // ===========================================================================
113  // class DemandMoveOptions
114  // ===========================================================================
115 
117 
118  public:
120  DemandModeOptions(GNEMoveFrame* moveFrameParent);
121 
124 
126  void showDemandModeOptions();
127 
129  void hideDemandModeOptions();
130 
132  bool getLeaveStopPersonsConnected() const;
133 
134  private:
137 
139  FXCheckButton* myLeaveStopPersonsConnected = nullptr;
140  };
141 
142  // ===========================================================================
143  // class ShiftEdgeSelectedGeometry
144  // ===========================================================================
145 
149 
150  public:
152  ShiftEdgeSelectedGeometry(GNEMoveFrame* moveFrameParent);
153 
156 
159 
162 
166  long onCmdChangeShiftValue(FXObject*, FXSelector, void*);
167 
169  long onCmdShiftEdgeGeometry(FXObject*, FXSelector, void*);
170 
172 
173  protected:
175  FOX_CONSTRUCTOR(ShiftEdgeSelectedGeometry)
176 
177  private:
180 
182  FXTextField* myShiftValueTextField = nullptr;
183 
185  FXButton* myApplyZValue = nullptr;
186  };
187 
188  // ===========================================================================
189  // class ChangeZInSelection
190  // ===========================================================================
191 
195 
196  public:
198  ChangeZInSelection(GNEMoveFrame* moveFrameParent);
199 
202 
205 
208 
212  long onCmdChangeZValue(FXObject*, FXSelector, void*);
213 
215  long onCmdChangeZMode(FXObject*, FXSelector, void*);
216 
218  long onCmdApplyZ(FXObject*, FXSelector, void*);
219 
221 
222  protected:
224  FOX_CONSTRUCTOR(ChangeZInSelection)
225 
226 
227  void updateInfoLabel();
228 
229  private:
232 
234  FXTextField* myZValueTextField = nullptr;
235 
237  FXRadioButton* myAbsoluteValue = nullptr;
238 
240  FXButton* myApplyButton = nullptr;
241 
243  FXRadioButton* myRelativeValue = nullptr;
244 
246  FXLabel* myInfoLabel = nullptr;
247  };
248 
249  // ===========================================================================
250  // class ShiftShapeGeometry
251  // ===========================================================================
252 
256 
257  public:
259  ShiftShapeGeometry(GNEMoveFrame* moveFrameParent);
260 
263 
265  void showShiftShapeGeometry();
266 
268  void hideShiftShapeGeometry();
269 
273  long onCmdChangeShiftValue(FXObject*, FXSelector, void*);
274 
276  long onCmdShiftShapeGeometry(FXObject*, FXSelector, void*);
277 
279 
280  protected:
282  FOX_CONSTRUCTOR(ShiftShapeGeometry)
283 
284  private:
287 
289  FXTextField* myShiftValueXTextField = nullptr;
290 
292  FXTextField* myShiftValueYTextField = nullptr;
293  };
294 
295  // ===========================================================================
296  // class Information
297  // ===========================================================================
298 
300 
301  public:
303  Information(GNEMoveFrame* moveFrameParent);
304 
306  ~Information();
307  };
308 
313  GNEMoveFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
314 
316  ~GNEMoveFrame();
317 
323  void processClick(const Position& clickedPosition,
324  const GNEViewNetHelper::ViewObjectsSelector& viewObjects,
325  const GNEViewNetHelper::ViewObjectsSelector& objectsUnderGrippedCursor);
326 
328  void show();
329 
331  void hide();
332 
335 
338 
341 
342 private:
345 
348 
351 
354 
357 
360 
363 };
void updateInfoLabel()
FOX need this.
GNEMoveFrame * myMoveFrameParent
pointer to move frame parent
Definition: GNEMoveFrame.h:231
void disableChangeZInSelection()
disable change Z in selection
ChangeZInSelection(GNEMoveFrame *moveFrameParent)
FOX-declaration.
FXRadioButton * myRelativeValue
radio button for relative value
Definition: GNEMoveFrame.h:243
FXRadioButton * myAbsoluteValue
radio button for absolute value
Definition: GNEMoveFrame.h:237
long onCmdChangeZValue(FXObject *, FXSelector, void *)
FXButton * myApplyButton
apply button
Definition: GNEMoveFrame.h:240
void enableChangeZInSelection()
enabale change Z in selection
FXLabel * myInfoLabel
info label
Definition: GNEMoveFrame.h:246
long onCmdChangeZMode(FXObject *, FXSelector, void *)
Called when user changes Z mode.
FXTextField * myZValueTextField
textField for Z value
Definition: GNEMoveFrame.h:234
long onCmdApplyZ(FXObject *, FXSelector, void *)
Called when user press the apply Z value button.
FXCheckButton * myAllowChangeLanes
checkbox for enable/disable change lanes
Definition: GNEMoveFrame.h:57
bool getMergeGeometryPoints() const
check if merge geometry points
bool getAllowChangeLane() const
allow change lane
FXCheckButton * myMergeGeometryPoints
checkbox for enable/disable merge geometry points
Definition: GNEMoveFrame.h:60
CommonModeOptions(GNEMoveFrame *moveFrameParent)
constructor
GNEMoveFrame * myMoveFrameParent
pointer to move frame parent
Definition: GNEMoveFrame.h:136
FXCheckButton * myLeaveStopPersonsConnected
checkbox for enable/disable leave stopPersons connected
Definition: GNEMoveFrame.h:139
bool getLeaveStopPersonsConnected() const
check if leave stopPersonConnected is enabled
DemandModeOptions(GNEMoveFrame *moveFrameParent)
constructor
void hideDemandModeOptions()
hide DemandModeOptions
void showDemandModeOptions()
show DemandModeOptions
Information(GNEMoveFrame *moveFrameParent)
constructor
void hideNetworkModeOptions()
hide NetworkModeOptions
FXCheckButton * myForceDrawGeometryPoints
checkbox for force darwi geometry points
Definition: GNEMoveFrame.h:109
FXCheckButton * myMoveWholePolygons
checkbox for enable/disable move whole polygons
Definition: GNEMoveFrame.h:106
long onCmdChangeOption(FXObject *, FXSelector, void *)
void showNetworkModeOptions()
show NetworkModeOptions
NetworkModeOptions(GNEMoveFrame *moveFrameParent)
FOX-declaration.
GNEMoveFrame * myMoveFrameParent
FOX need this.
Definition: GNEMoveFrame.h:103
bool getMoveWholePolygons() const
move whole polygons
bool getForceDrawGeometryPoints() const
force draw geometry points
long onCmdChangeShiftValue(FXObject *, FXSelector, void *)
FXButton * myApplyZValue
button for apply Z value
Definition: GNEMoveFrame.h:185
void enableShiftEdgeGeometry()
enable shift edge geometry
GNEMoveFrame * myMoveFrameParent
FOX need this.
Definition: GNEMoveFrame.h:179
void disableShiftEdgeGeometry()
disable change Z in selection
FXTextField * myShiftValueTextField
textField for shift value
Definition: GNEMoveFrame.h:182
ShiftEdgeSelectedGeometry(GNEMoveFrame *moveFrameParent)
FOX-declaration.
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
Definition: GNEMoveFrame.h:292
long onCmdChangeShiftValue(FXObject *, FXSelector, void *)
FXTextField * myShiftValueXTextField
textField for shiftX value
Definition: GNEMoveFrame.h:289
ShiftShapeGeometry(GNEMoveFrame *moveFrameParent)
FOX-declaration.
long onCmdShiftShapeGeometry(FXObject *, FXSelector, void *)
Called when user press the apply Z value button.
GNEMoveFrame * myMoveFrameParent
FOX need this.
Definition: GNEMoveFrame.h:286
void showShiftShapeGeometry()
show shift shape geometry
void show()
show prohibition frame
ChangeZInSelection * myChangeZInSelection
modul for change Z in selection
Definition: GNEMoveFrame.h:356
DemandModeOptions * myDemandModeOptions
modul for DemandMode Options
Definition: GNEMoveFrame.h:350
NetworkModeOptions * getNetworkModeOptions() const
get network mode options
void hide()
hide prohibition frame
~GNEMoveFrame()
Destructor.
ShiftEdgeSelectedGeometry * myShiftEdgeSelectedGeometry
modul for shift edge selected geometry
Definition: GNEMoveFrame.h:353
GNEMoveFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
DemandModeOptions * getDemandModeOptions() const
get demand mode options
NetworkModeOptions * myNetworkModeOptions
modul for NetworkMode Options
Definition: GNEMoveFrame.h:347
Information * myInformation
modul for show information
Definition: GNEMoveFrame.h:359
CommonModeOptions * myCommonModeOptions
modul for CommonMode Options
Definition: GNEMoveFrame.h:344
ShiftShapeGeometry * myShiftShapeGeometry
modul for shift shape geometry
Definition: GNEMoveFrame.h:362
void processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const GNEViewNetHelper::ViewObjectsSelector &objectsUnderGrippedCursor)
handle processClick and set the relative coloring
CommonModeOptions * getCommonModeOptions() const
get common mode options
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.
Definition: GNEViewParent.h:88
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37