Eclipse SUMO - Simulation of Urban MObility
GNENeteditAttributes.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 // Modul for edit netedit attributes
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
25 
26 // ===========================================================================
27 // class declaration
28 // ===========================================================================
29 
30 class GNEFrame;
32 class GNELane;
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
37 
40  FXDECLARE(GNENeteditAttributes)
41 
42 public:
44  GNENeteditAttributes(GNEFrame* frameParent);
45 
48 
51 
54 
57 
59  void drawLaneReference(const GNELane* lane) const;
60 
63 
65  long onCmdSetNeteditAttribute(FXObject*, FXSelector, void*);
66 
68  long onCmdHelp(FXObject*, FXSelector, void*);
69 
71 
72 protected:
74  FOX_CONSTRUCTOR(GNENeteditAttributes)
75 
76 
78  LEFT,
79  RIGHT,
80  CENTER,
81  EXTENDEDLEFT,
82  EXTENDEDRIGHT,
83  EXTENDED,
84  INVALID
85  };
86 
89 
92 
94  FXHorizontalFrame* myLengthFrame;
95 
97  FXTextField* myLengthTextField;
98 
100  FXHorizontalFrame* myForceLengthFrame;
101 
103  FXCheckButton* myForceLengthCheckButton;
104 
106  FXHorizontalFrame* myCloseShapeFrame;
107 
109  FXCheckButton* myCloseShapeCheckButton;
110 
112  FXHorizontalFrame* myCenterViewAfterCreationFrame;
113 
116 
119 
121  std::vector<std::pair<std::string, ReferencePoint> > myReferencePoints;
122 
124  double getElementLength() const;
125 
127  double setStartPosition(const double mouseOverLanePos, double elementLength) const;
128 
130  double setEndPosition(const double mouseOverLanePos, double elementLength, const double laneLength) const;
131 
132 private:
135 
138 };
@ RIGHT
At the rightmost side of the lane.
@ LEFT
At the leftmost side of the lane.
@ CENTER
At the center of the lane.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
FXHorizontalFrame * myLengthFrame
horizontal frame for length
FXHorizontalFrame * myCenterViewAfterCreationFrame
horizontal frame for center view after creation frame
void drawLaneReference(const GNELane *lane) const
draw lane reference
double getElementLength() const
get element length
GNENeteditAttributes(GNEFrame *frameParent)
FOX-declaration.
double setEndPosition(const double mouseOverLanePos, double elementLength, const double laneLength) const
return the end position
long onCmdSetNeteditAttribute(FXObject *, FXSelector, void *)
Called when user changes some element of GNENeteditAttributes.
double setStartPosition(const double mouseOverLanePos, double elementLength) const
return the start position
ReferencePoint myReferencePoint
current reference point
MFXComboBoxIcon * myReferencePointComboBox
match box with the list of reference points
FXHorizontalFrame * myForceLengthFrame
horizontal frame for force length
long onCmdHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
GNENeteditAttributes & operator=(GNENeteditAttributes *)=delete
Invalidated assignment operator.
std::vector< std::pair< std::string, ReferencePoint > > myReferencePoints
map with all references
FXTextField * myLengthTextField
textField for length
FXCheckButton * myCenterViewAfterCreationButton
checkbox to enable/disable center element after creation
void showNeteditAttributesModule(GNEAttributeCarrier *templateAC)
show Netedit attributes modul
FXCheckButton * myForceLengthCheckButton
checkbox to enable/disable force length
FXHorizontalFrame * myCloseShapeFrame
horizontal frame for close polygon
void hideNeteditAttributesModule()
hide Netedit attributes modul
FXCheckButton * myCloseShapeCheckButton
checkbox to enable/disable close polygon
GNENeteditAttributes(GNENeteditAttributes *)=delete
Invalidated copy constructor.
ReferencePoint
FOX needs this.
bool getNeteditAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, const GNELane *lane) const
fill valuesMap with netedit attributes
GNEFrame * myFrameParent
pointer to frame parent
ComboBox with icon.
MFXGroupBoxModule (based on FXGroupBox)
every row value