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.org/sumo
3 // Copyright (C) 2001-2022 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 
52  private:
54  FXCheckButton* myAllowChangeLanes;
55  };
56 
57  // ===========================================================================
58  // class NetworkModeOptions
59  // ===========================================================================
60 
62 
63  public:
65  NetworkModeOptions(GNEMoveFrame* moveFrameParent);
66 
69 
72 
75 
77  bool getMoveWholePolygons() const;
78 
79  private:
82 
84  FXCheckButton* myMoveWholePolygons;
85  };
86 
87  // ===========================================================================
88  // class DemandMoveOptions
89  // ===========================================================================
90 
92 
93  public:
95  DemandModeOptions(GNEMoveFrame* moveFrameParent);
96 
99 
101  void showDemandModeOptions();
102 
104  void hideDemandModeOptions();
105 
107  bool getLeaveStopPersonsConnected() const;
108 
109  private:
112 
115  };
116 
117  // ===========================================================================
118  // class ShiftEdgeSelectedGeometry
119  // ===========================================================================
120 
124 
125  public:
127  ShiftEdgeSelectedGeometry(GNEMoveFrame* moveFrameParent);
128 
131 
134 
137 
141  long onCmdChangeShiftValue(FXObject*, FXSelector, void*);
142 
144  long onCmdShiftEdgeGeometry(FXObject*, FXSelector, void*);
145 
147 
148  protected:
150  FOX_CONSTRUCTOR(ShiftEdgeSelectedGeometry)
151 
152  private:
155 
157  FXTextField* myShiftValueTextField = nullptr;
158 
160  FXButton* myApplyZValue = nullptr;
161  };
162 
163  // ===========================================================================
164  // class ChangeZInSelection
165  // ===========================================================================
166 
170 
171  public:
173  ChangeZInSelection(GNEMoveFrame* moveFrameParent);
174 
177 
180 
183 
187  long onCmdChangeZValue(FXObject*, FXSelector, void*);
188 
190  long onCmdChangeZMode(FXObject*, FXSelector, void*);
191 
193  long onCmdApplyZ(FXObject*, FXSelector, void*);
194 
196 
197  protected:
199  FOX_CONSTRUCTOR(ChangeZInSelection)
200 
201 
202  void updateInfoLabel();
203 
204  private:
207 
209  FXTextField* myZValueTextField = nullptr;
210 
212  FXRadioButton* myAbsoluteValue = nullptr;
213 
215  FXButton* myApplyButton = nullptr;
216 
218  FXRadioButton* myRelativeValue = nullptr;
219 
221  FXLabel* myInfoLabel = nullptr;
222  };
223 
224  // ===========================================================================
225  // class ShiftShapeGeometry
226  // ===========================================================================
227 
231 
232  public:
234  ShiftShapeGeometry(GNEMoveFrame* moveFrameParent);
235 
238 
240  void showShiftShapeGeometry();
241 
243  void hideShiftShapeGeometry();
244 
248  long onCmdChangeShiftValue(FXObject*, FXSelector, void*);
249 
251  long onCmdShiftShapeGeometry(FXObject*, FXSelector, void*);
252 
254 
255  protected:
257  FOX_CONSTRUCTOR(ShiftShapeGeometry)
258 
259  private:
262 
264  FXTextField* myShiftValueXTextField = nullptr;
265 
267  FXTextField* myShiftValueYTextField = nullptr;
268  };
269 
274  GNEMoveFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
275 
277  ~GNEMoveFrame();
278 
284  void processClick(const Position& clickedPosition,
285  const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor,
286  const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderGrippedCursor);
287 
289  void show();
290 
292  void hide();
293 
296 
299 
302 
303 private:
306 
309 
312 
315 
318 
321 };
FXGroupBoxModule (based on FXGroupBox)
void updateInfoLabel()
FOX need this.
GNEMoveFrame * myMoveFrameParent
pointer to move frame parent
Definition: GNEMoveFrame.h:206
void disableChangeZInSelection()
disable change Z in selection
ChangeZInSelection(GNEMoveFrame *moveFrameParent)
FOX-declaration.
FXRadioButton * myRelativeValue
radio button for relative value
Definition: GNEMoveFrame.h:218
FXRadioButton * myAbsoluteValue
radio button for absolute value
Definition: GNEMoveFrame.h:212
long onCmdChangeZValue(FXObject *, FXSelector, void *)
FXButton * myApplyButton
apply button
Definition: GNEMoveFrame.h:215
void enableChangeZInSelection()
enabale change Z in selection
FXLabel * myInfoLabel
info label
Definition: GNEMoveFrame.h:221
long onCmdChangeZMode(FXObject *, FXSelector, void *)
Called when user changes Z mode.
FXTextField * myZValueTextField
textField for Z value
Definition: GNEMoveFrame.h:209
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:54
bool getAllowChangeLane() const
allow change lane
CommonModeOptions(GNEMoveFrame *moveFrameParent)
constructor
GNEMoveFrame * myMoveFrameParent
pointer to move frame parent
Definition: GNEMoveFrame.h:111
FXCheckButton * myLeaveStopPersonsConnected
checkbox for enable/disable leave stopPersons connected
Definition: GNEMoveFrame.h:114
bool getLeaveStopPersonsConnected() const
check if leave stopPersonConnected is enabled
DemandModeOptions(GNEMoveFrame *moveFrameParent)
constructor
void hideDemandModeOptions()
hide DemandModeOptions
void showDemandModeOptions()
show DemandModeOptions
void hideNetworkModeOptions()
hide NetworkModeOptions
FXCheckButton * myMoveWholePolygons
checkbox for enable/disable move whole polygons
Definition: GNEMoveFrame.h:84
void showNetworkModeOptions()
show NetworkModeOptions
NetworkModeOptions(GNEMoveFrame *moveFrameParent)
constructor
GNEMoveFrame * myMoveFrameParent
pointer to move frame parent
Definition: GNEMoveFrame.h:81
bool getMoveWholePolygons() const
move whole polygons
long onCmdChangeShiftValue(FXObject *, FXSelector, void *)
FXButton * myApplyZValue
button for apply Z value
Definition: GNEMoveFrame.h:160
void enableShiftEdgeGeometry()
enable shift edge geometry
GNEMoveFrame * myMoveFrameParent
FOX need this.
Definition: GNEMoveFrame.h:154
void disableShiftEdgeGeometry()
disable change Z in selection
FXTextField * myShiftValueTextField
textField for shift value
Definition: GNEMoveFrame.h:157
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:267
long onCmdChangeShiftValue(FXObject *, FXSelector, void *)
FXTextField * myShiftValueXTextField
textField for shiftX value
Definition: GNEMoveFrame.h:264
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:261
void showShiftShapeGeometry()
show shift shape geometry
GNEMoveFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
void show()
show prohibition frame
ChangeZInSelection * myChangeZInSelection
modul for change Z in selection
Definition: GNEMoveFrame.h:317
void processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderGrippedCursor)
handle processClick and set the relative colouring
DemandModeOptions * myDemandModeOptions
modul for DemandMode Options
Definition: GNEMoveFrame.h:311
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:314
DemandModeOptions * getDemandModeOptions() const
get demand mode options
NetworkModeOptions * myNetworkModeOptions
modul for NetworkMode Options
Definition: GNEMoveFrame.h:308
CommonModeOptions * myCommonModeOptions
modul for CommonMode Options
Definition: GNEMoveFrame.h:305
ShiftShapeGeometry * myShiftShapeGeometry
modul for shift shape geometry
Definition: GNEMoveFrame.h:320
CommonModeOptions * getCommonModeOptions() const
get common mode options
class used to group all variables related with objects under cursor after a click over view
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37