85 if (editedPolyShape !=
nullptr) {
94 if (tagValue.isNetElement()) {
97 }
else if (tagValue.isDemandElement()) {
100 }
else if (tagValue.isAdditional()) {
103 }
else if (tagValue.isShape()) {
106 }
else if (tagValue.isTAZ()) {
111 switch (i->getType()) {
178 for (
const auto& i :
myEdges) {
184 WRITE_DEBUG(
"ObjectsUnderCursor: swapped Lanes to edges")
348 const std::vector<GNEAttributeCarrier*>&
359 std::map<GUIGlObjectType, std::vector<GUIGlObject*> > mySortedGUIGlObjects;
360 for (
const auto& i : GUIGlObjects) {
361 mySortedGUIGlObjects[i->getType()].push_back(i);
364 for (std::map<
GUIGlObjectType, std::vector<GUIGlObject*> >::reverse_iterator i = mySortedGUIGlObjects.rbegin(); i != mySortedGUIGlObjects.rend(); i++) {
365 for (
const auto& j : i->second) {
376 myEventInfo(nullptr) {
410 movingIndexShape(-1),
412 myMovingStartPos(false),
413 myMovingEndPos(false),
414 myJunctionToMove(nullptr),
415 myEdgeToMove(nullptr),
416 myPolyToMove(nullptr),
417 myPOIToMove(nullptr),
418 myAdditionalToMove(nullptr),
419 myDemandElementToMove(nullptr),
420 myTAZToMove(nullptr) {
499 offsetMovement =
Position(0, 0, offsetMovement.
y());
502 offsetMovement.
setz(0);
600 if (existentIndex != -1) {
685 if (existentIndex != -1) {
771 myMovingSelection(false) {
785 for (
auto i : selectedJunctions) {
789 i->startGeometryMoving();
794 for (
auto i : selectedEdges) {
798 i->startGeometryMoving();
806 for (
auto i : selectedEdges) {
810 i->startGeometryMoving();
814 std::vector<GNEEdge*> noJunctionsSelected;
815 std::vector<GNEEdge*> originJunctionSelected;
816 std::vector<GNEEdge*> destinyJunctionSelected;
818 for (
auto i : selectedEdges) {
822 if (!originSelected && !destinySelected) {
823 noJunctionsSelected.push_back(i);
824 }
else if (originSelected && !destinySelected) {
825 originJunctionSelected.push_back(i);
826 }
else if (!originSelected && destinySelected) {
827 destinyJunctionSelected.push_back(i);
828 }
else if (!originSelected && !destinySelected) {
832 i->startGeometryMoving();
836 for (
auto i : noJunctionsSelected) {
841 i->startGeometryMoving();
849 i.first->endGeometryMoving();
853 i.first->endGeometryMoving();
857 i.first->endGeometryMoving();
862 myMovedJunctionOriginPositions.clear();
863 myMovedEdgesOriginShape.clear();
865 for (
const auto& i : myMovedEgdesGeometryPoints) {
868 myMovedEgdesGeometryPoints.clear();
877 for (
auto i : noJunctionsSelected) {
878 if (i != clickedEdge) {
883 if (i->getOppositeEdge() == clickedEdge) {
889 i->startGeometryMoving();
905 offsetMovement =
Position(0, 0, offsetMovement.
y());
908 offsetMovement.
setz(0);
912 i.first->moveGeometry(i.second, offsetMovement);
916 i.first->moveEntireShape(i.second, offsetMovement);
920 i.first->moveVertexShape(i.second->movingIndexShape, i.second->originalPositionInView, offsetMovement);
948 myMovedJunctionOriginPositions.clear();
949 myMovedEdgesOriginShape.clear();
951 for (
const auto& i : myMovedEgdesGeometryPoints) {
954 myMovedEgdesGeometryPoints.clear();
1010 selectingUsingRectangle(false),
1011 startDrawing(false),
1063 std::vector<GNEEdge*>
1066 std::vector<GNEEdge*> result;
1079 for (
auto i : ACsInBoundary) {
1081 result.push_back(dynamic_cast<GNEEdge*>(i.second));
1101 glTranslated(0, 0,
GLO_MAX - 1);
1104 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
1121 std::set<std::pair<std::string, GNEAttributeCarrier*> > ACsInBoundaryFiltered;
1122 for (
const auto& i : ACsInBoundary) {
1125 ACsInBoundaryFiltered.insert(i);
1129 std::vector<GNEAttributeCarrier*> ACToSelect;
1130 std::vector<GNEAttributeCarrier*> ACToUnselect;
1132 ACToSelect.reserve(ACsInBoundaryFiltered.size());
1133 ACToUnselect.reserve(ACsInBoundaryFiltered.size());
1140 for (
auto i : selectedAC) {
1141 ACToUnselect.push_back(i);
1145 for (
auto i : ACsInBoundaryFiltered) {
1148 ACToUnselect.push_back(i.second);
1151 if (std::find(ACToUnselect.begin(), ACToUnselect.end(), i.second) != ACToUnselect.end()) {
1152 ACToSelect.push_back(i.second);
1156 ACToSelect.push_back(i.second);
1162 std::vector<GNEEdge*> edgesToSelect;
1164 for (
auto i : ACToSelect) {
1166 edgesToSelect.push_back(dynamic_cast<GNEEdge*>(i));
1170 for (
auto i : edgesToSelect) {
1172 ACToSelect.push_back(i->getGNEJunctionSource());
1173 for (
auto j : i->getGNEJunctionSource()->getGNEConnections()) {
1174 ACToSelect.push_back(j);
1176 for (
auto j : i->getGNEJunctionSource()->getGNECrossings()) {
1177 ACToSelect.push_back(j);
1180 ACToSelect.push_back(i->getGNEJunctionDestiny());
1181 for (
auto j : i->getGNEJunctionDestiny()->getGNEConnections()) {
1182 ACToSelect.push_back(j);
1184 for (
auto j : i->getGNEJunctionDestiny()->getGNECrossings()) {
1185 ACToSelect.push_back(j);
1190 if ((ACToSelect.size() + ACToUnselect.size()) > 0) {
1193 for (
auto i : ACToUnselect) {
1196 for (
auto i : ACToSelect) {
1197 if (i->getTagProperty().isSelectable()) {
1213 myTestingEnabled(
OptionsCont::getOptions().getBool(
"gui-testing")),
1215 myTestingHeight(0) {
1225 if ((windowSize.size() == 2) && GNEAttributeCarrier::canParse<int>(windowSize[0]) && GNEAttributeCarrier::canParse<int>(windowSize[1])) {
1229 WRITE_ERROR(
"Invalid windows size-format: " +
toString(windowSize) +
"for option 'window-size'");
1253 glTranslated(center.
x(), center.
y(),
GLO_MAX - 1);
1254 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
1257 glVertex2d(0, -size);
1258 glVertex2d(size, -size);
1259 glVertex2d(size, 0);
1279 networkButton(nullptr),
1280 demandButton(nullptr),
1432 menuCheckShowGrid(nullptr),
1441 (
"Grid\t\tshow grid and restrict movement to the grid (size defined in visualization options)"),
1476 (
"Show demand elements\t\tToggle show demand elements"),
1511 (
"Apply change to all phases\t\tToggle whether clicking should apply state changes to all phases of the current " +
toString(
SUMO_TAG_TRAFFIC_LIGHT) +
" plan").c_str(),
1532 (
"Elevation\t\tApply mouse movement to elevation instead of x,y position"),
1539 (
"Chain\t\tCreate consecutive " +
toString(
SUMO_TAG_EDGE) +
"s with a single click (hit ESC to cancel chain).").c_str(),
1546 (
"Two-way\t\tAutomatically create an " +
toString(
SUMO_TAG_EDGE) +
" in the opposite direction").c_str(),
1665 menuCheckHideShapes(nullptr),
1666 menuCheckHideNonInspectedDemandElements(nullptr),
1667 menuCheckShowAllPersonPlans(nullptr),
1668 menuCheckLockPerson(nullptr),
1670 myLockedPerson(nullptr) {
1678 (
"Hide shapes\t\tToggle show shapes (Polygons and POIs)"),
1685 (
"Hide non-inspected elements\t\tToggle show non-inspected demand elements"),
1692 (
"Show all person plans\t\tshow all person plans"),
1699 (
"Lock person\t\tLock selected person"),
1819 inspectButton(nullptr),
1820 deleteButton(nullptr),
1821 selectButton(nullptr),
1822 moveButton(nullptr),
1890 createEdgeButton(nullptr),
1891 connectionButton(nullptr),
1892 trafficLightButton(nullptr),
1893 additionalButton(nullptr),
1894 crossingButton(nullptr),
1896 shapeButton(nullptr),
1897 prohibitionButton(nullptr),
1997 routeButton(nullptr),
1998 vehicleButton(nullptr),
1999 vehicleTypeButton(nullptr),
2000 stopButton(nullptr),
2001 personTypeButton(nullptr),
2002 personButton(nullptr),
2003 personPlanButton(nullptr),
2095 editedShapePoly(nullptr),
2096 editingNetElementShapes(false),
2103 if ((
editedShapePoly ==
nullptr) && (element !=
nullptr) && (shape.size() > 1)) {
create edges in chain mode
GNEViewParent * myViewParent
view parent
MFXCheckableButton * networkButton
chekable button for supermode Network
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
hotkey for mode editing TLS AND Vehicle Types
CommonViewOptions(GNEViewNet *viewNet)
default constructor
Position myClickedPosition
original clicked position when moveSelection is called (used for calculate offset during moveSelectio...
void update(void *eventData)
update status of KeyPressed
const GNEDemandElement * myLockedPerson
pointer to locked person
Position getPositionInView() const
Returns position of hierarchical element in view.
void sortGUIGlObjectsByAltitude(const std::vector< GUIGlObject *> &GUIGlObjects)
invert GUIGlObjects
std::set< std::pair< std::string, GNEAttributeCarrier * > > getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges=false)
get AttributeCarriers in Boundary
GNECrossing * getCrossingFront() const
get front crossing (or a pointer to nullptr if there isn't)
hot key <F4> set demand mode in NETEDIT
GNEViewNetHelper::ObjectsUnderCursor myObjectsUnderCursor
variable use to save all pointers to objects under cursor after a click
bool myMovingEndPos
bool to indicate that end pos of an edge is being moved
const std::vector< T > & getSchemes() const
bool isAdditionalBlocked() const
Check if additional item is currently blocked (i.e. cannot be moved with mouse)
Position getPositionInView() const
Returns position of additional in view.
void abortOperation(bool clearSelection=true)
abort current edition operation
move elevation instead of x,y
GNETAZ * getTAZFront() const
get front TAZ (or a pointer to nullptr if there isn't)
whether a given shape is user-defined
void moveRectangleSelection()
move rectangle selection
GNEViewNet * myViewNet
pointer to viewNet
bool showConnections() const
check if select show connections checkbox is enabled
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
MFXCheckableButton * demandButton
chekable button for supermode Demand
GNEViewNetHelper::EditModes myEditModes
variable used to save variables related with edit moves modes
std::vector< GNEConnection * > myConnections
vector with the clicked connections
begin/end of the description of a junction
begin/end of the description of a single lane
static void drawTextBox(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &txtColor=RGBColor::BLACK, const RGBColor &bgColor=RGBColor::WHITE, const RGBColor &borderColor=RGBColor::BLACK, const double angle=0, const double relBorder=0.05, const double relMargin=0.5)
draw Text box with given parameters
void update() const
Mark the entire GNEViewNet to be repainted later.
bool controlKeyPressed() const
check if CONTROL key was pressed during click
void initTestingMode()
init testing mode
GNEViewNetHelper::NetworkViewOptions myNetworkViewOptions
variable used to save variables related with view options in Network Supermode
SetOperation getModificationMode() const
get current modification mode
bool myMovingSelection
flag to check if a selection is being moved
FXMenuCheck * menuCheckShowAllPersonPlans
show all person plans
void setSupermode(Supermode supermode)
set Network edit mode
static const RGBColor WHITE
void hideDemandViewOptionsMenuChecks()
hide all options menu checks
NetworkEditMode
enum for network edit modes
bool isDemandElement() const
return true if tag correspond to a demand element
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
void lockPerson(const GNEDemandElement *person)
lock person
GNEViewNet * myViewNet
pointer to viewNet
void hideVehicleOptionsMenuChecks()
hide all options menu checks
const GNEDemandElement * getLockedPerson() const
get locked person
PositionVector originalShapeBeforeMoving
original shape of element before start moving (used by polygons, edges, etc., needed for commmit posi...
hotkey for mode editing connection prohibitions AND person types
virtual Position getPositionInView() const =0
Returns position of demand element in view.
connectio between two lanes
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
void moveSingleElement()
move single element in Network AND Demand mode
void finishMoveSelection()
finish moving selection
void moveSelection()
move selection
void commitShapeChange(const PositionVector &oldShape, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of changeShapeGeometry(...)
GNEViewParent * getViewParent() const
get the net object
double y() const
Returns the y-position.
GUIVisualizationSettings * getVisualisationSettings() const
get visualitation settings
void commitShapeChange(const PositionVector &oldShape, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of changeShapeGeometry(...)
FXMenuCheck * menuCheckChangeAllPhases
menu check to set change all phases
void finishRectangleSelection()
finish rectangle selection
bool calculateEdgeValues()
calculate Edge movement values (Position, Index, etc.)
GNEJunction * myJunctionToMove
the Junction to be moved.
GNEAdditional * myAdditionalToMove
the additional element which position is being moved
Mode for editing connection prohibitions.
void moveShapeStart(const Position &oldPos, const Position &offset)
move position of shape start without commiting change
PositionVector getShape() const
Returns additional element's shape.
hotkey for mode deleting things
NetworkViewOptions(GNEViewNet *viewNet)
default constructor
void hideVehicleTypeOptionsMenuChecks()
hide all options menu checks
double x() const
Returns the x-position.
mode for selecting network elements
GNEPoly * editedShapePoly
polygon used for edit shapes
bool myMovingStartPos
bool to indicate that startPos of an edge is being moved
int myTestingWidth
Width of viewNet in testing mode.
std::vector< GNETAZ * > myTAZs
vector with the clicked TAZ elements (needed because uses a shape instead a position) ...
GNEViewNet * myViewNet
pointer to viewNet
bool selectEdges() const
check if select edges checkbox is enabled
void getVisibleNetworkMenuCommands(std::vector< FXMenuCheck *> &commands) const
get visible network menu commands
hotkey for mode editing crossing AND routes
NetworkEditMode myPreviousNetworkEditMode
the previous edit mode before edit NetElement's shapes
mode for moving demand elements
bool isTLSSaved()
check if modifications in TLS was saved
std::vector< GNEEdge * > processEdgeRectangleSelection()
process rectangle Selection (only limited to Edges)
FXMenuCheck * menuCheckWarnAboutMerge
menu check to we should warn about merging junctions
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getShape() const
Returns whether the shape of the polygon.
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
mode for selecting demand elements
void buildNetworkViewOptionsMenuChecks()
build menu checks
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
void moveShapeEnd(const Position &oldPos, const Position &offset)
move position of shape end without commiting change
bool editingElevation() const
check if we're editing elevation
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers() const
get vector with clicked ACs
hotkey for mode editing additionals AND stops
void buildVehicleTypeOptionsMenuChecks()
build menu checks
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
static const RGBColor BLACK
struct used to group all variables related with movement of single elements
void commitShapeStartChange(const Position &oldPos, GNEUndoList *undoList)
commit position changing in shape start
void beginMoveSelection(GNEAttributeCarrier *originAC)
begin move selection
bool editingNetElementShapes
flag to edit net element shapes
void startGeometryMoving(bool extendToNeighbors=true)
begin movement (used when user click over edge to start a movement, to avoid problems with problems w...
SelectingArea(GNEViewNet *viewNet)
default constructor
virtual void moveGeometry(const Position &offset)=0
change the position of the element geometry without saving in undoList
bool calculateTAZValues()
calculate TAZ movement values (Position, Index, etc.)
GNEViewNet * myViewNet
pointer to viewNet
DemandViewOptions(GNEViewNet *viewNet)
default constructor
VehicleOptions(GNEViewNet *viewNet)
constructor
FXMenuCheck * menuCheckShowGrid
menu check to show grid button
#define UNUSED_PARAMETER(x)
void editEndpoint(Position pos, GNEUndoList *undoList)
makes pos the new geometry endpoint at the appropriate end, or remove current existent endpoint ...
A class that stores a 2D geometrical boundary.
static RouteCalculator * getRouteCalculatorInstance()
obtain instance of RouteCalculator
void hideNetworkViewOptionsMenuChecks()
hide all options menu checks
int moveVertexShape(const int index, const Position &oldPos, const Position &offset)
change position of a vertex of shape without commiting change
bool mergeJunctions(GNEJunction *moved, const Position &oldPos)
try to merge moved junction with another junction in that spot return true if merging did take place ...
mode for moving network elements
DemandEditMode demandEditMode
the current Demand edit mode
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
static OptionsCont & getOptions()
Retrieves the options.
GNEViewNetHelper::KeyPressed myKeyPressed
variable used to save key status after certain events
std::vector< GNEAdditional * > myAdditionals
vector with the clicked additional elements
bool beginMoveSingleElementNetworkMode()
begin move single element in Network mode
GNEPOI * getPOIFront() const
get front POI (or a pointer to nullptr if there isn't)
void hideCommonViewOptionsMenuChecks()
hide all options menu checks
double p2m(double pixel) const
pixels-to-meters conversion method
const std::vector< GNEDemandElement * > & getDemandElementChildren() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
void buildDemandViewOptionsMenuChecks()
build menu checks
void drawRectangleSelection(const RGBColor &color) const
draw rectangle selection
void updateNetworkModeSpecificControls()
updates Network mode specific controls
std::vector< GNEAttributeCarrier * > myAttributeCarriers
vector with the clicked attribute carriers
GNEViewNet * myViewNet
pointer to viewNet
ObjectsUnderCursor()
constructor
void moveEntireShape(const PositionVector &oldShape, const Position &offset)
move entire shape without commiting change
NBEdge * getNBEdge() const
returns the internal NBEdge
void setNetworkEditMode(NetworkEditMode networkMode, bool force=false)
set Network edit mode
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
FXMenuCheck * menuCheckShowDemandElements
menu check to show Demand Elements
void stopEditCustomShape()
edit edit shape
void unlockPerson()
unlock person
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
GNEViewNetHelper::DemandCheckableButtons myDemandCheckableButtons
variable used to save checkable buttons for Supermode Demand
GNEUndoList * getUndoList() const
get the undoList object
mode for inspecting network elements
void buildCommonViewOptionsMenuChecks()
build menu checks
void updateSuperModeMenuCommands(int supermode)
update FXMenuCommands
bool isPolygonBlocked() const
return true if polygon is blocked
FXMenuCheck * menuCheckMoveElevation
menu check to apply movement to elevation
hotkey for mode connecting lanes
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
FXMenuCheck * menuCheckAutoOppositeEdge
menu check to create auto create opposite edge
FXMenuCheck * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
GNEPoly * addPolygonForEditShapes(GNENetElement *netElement, const PositionVector &shape, bool fill, RGBColor col)
Builds a special polygon used for edit Junctions's shapes.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
bool startDrawing
whether we have started rectangle-selection
bool clickedOverShapeStart(const Position &pos)
void commitShapeEndChange(const Position &oldPos, GNEUndoList *undoList)
commit position changing in shape end
int myTestingHeight
Height of viewNet in testing mode.
virtual void endGeometryMoving()=0
end geometry movement
GNEViewNet * myViewNet
pointer to viewNet
bool calculatePolyValues()
calculate Poly movement values (Position, Index, etc.)
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
FXMenuCheck * menuCheckChainEdges
menu check to the endpoint for a created edge should be set as the new source
Supermode currentSupermode
the current supermode
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
virtual void startGeometryMoving()=0
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
FXMenuCheck * menuCheckSelectEdges
menu check to select only edges
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
void buildSuperModeButtons()
build checkable buttons
bool isMovementBlocked() const
return true if movement is blocked
GNEPOI * myPOIToMove
the poi which position is being moved
GUIGlID getGlIDFront() const
get front GUI GL ID (or a pointer to nullptr if there isn't)
ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
registers completed movement with the undoList
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
bool isMovingSelection() const
check if currently there is element being moved
void getVisibleCommonMenuCommands(std::vector< FXMenuCheck *> &commands) const
get visible common menu commands
bool autoSelectNodes()
whether to autoselect nodes or to lanes
static const RGBColor MAGENTA
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String) ...
hotkey for mode moving element
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
std::vector< GNECrossing * > myCrossings
vector with the clicked crossings
void updateObjectUnderCursor(const std::vector< GUIGlObject *> &GUIGlObjects, GNEPoly *editedPolyShape)
update objects under cursor (Called only in onLeftBtnPress(...) function)
bool myTestingEnabled
flag to enable or disable testing mode
VehicleTypeOptions(GNEViewNet *viewNet)
constructor
void startGeometryMoving()
edge: the shape in xml-definition
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
GNEPoly * myPolyToMove
the poly of which geometry is being moved
GUIColorer junctionColorer
The junction colorer.
show junctions as bubbles
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
mode for deleting network elements
Position screenPos2NetPos(int x, int y) const
Translate screen position to network position.
void focusUpperElement()
focus upper element of frame
bool clickedOverShapeEnd(const Position &pos)
return true if user clicked over ShapeEnd
hide non-inspected demand element
void setCreatedJunction(GNEJunction *junction)
set created junction
std::vector< GNELane * > myLanes
vector with the clicked lanes
GNEJunction * getGNEJunctionSource() const
returns the source-junction
bool showShapes() const
check if shapes has to be hide
FXMenuCheck * menuCheckExtendSelection
menu check to extend to edge nodes
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
hotkey for mode inspecting object attributes
ask before merging junctions
begin/end of the description of an edge
GNENetElement * getNetElementFront() const
get front net element (or a pointer to nullptr if there isn't)
const PositionVector & getGeometry() const
Returns the geometry of the edge.
TestingMode(GNEViewNet *viewNet)
default constructor
std::vector< GNEJunction * > myJunctions
vector with the clicked junctions
A road/street connecting two junctions (netedit-version)
GNEViewNet * myViewNet
pointer to viewNet
bool shiftKeyPressed() const
check if SHIFT key was pressed during click
std::map< GNEEdge *, PositionVector > myMovedEdgesOriginShape
container used for move entire edges
MoveMultipleElementValues(GNEViewNet *viewNet)
constructor
FXbool makeCurrent()
A reimplementation due to some internal reasons.
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
void startEditCustomShape(GNENetElement *element, const PositionVector &shape, bool fill)
start edit custom shape
bool showNonInspectedDemandElements(const GNEDemandElement *demandElement) const
check if non inspected element has to be hidden
void beginRectangleSelection()
begin rectangle selection
ModificationMode * getModificationModeModul() const
get modification mode modul
Position originalPositionInView
original position of geometry position (needed for commmit position changes)
int moveVertexShape(const int index, const Position &oldPos, const Position &offset)
change position of a vertex of shape without commiting change
EditModes(GNEViewNet *viewNet)
default constructor
hotkey for mode adding edges
GNEViewNet * myViewNet
pointer to viewNet
bool showDemandElements() const
check if show demand elements checkbox is enabled
int moveVertexShape(const int index, const Position &oldPos, const Position &offset)
change position of a vertex of shape without commiting change
std::vector< GNEEdge * > myEdges
vector with the clicked edges
Position selectionCorner1
firstcorner of the rectangle-selection
#define GUIDesignButtonToolbarCheckable
little checkable button with icon placed in navigation toolbar
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
hotkey for mode create vehicles
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
GNEViewNetHelper::NetworkCheckableButtons myNetworkCheckableButtons
variable used to save checkable buttons for Supermode Network
FXMenuCheck * menuCheckShowConnections
menu check to show connections
std::vector< GNENetElement * > myNetElements
vector with the clicked net elements
An Element which don't belongs to GNENet but has influency in the simulation.
void updateDijkstraRouter()
update DijkstraRoute (called when SuperMode Demand is selected)
void processBoundarySelection(const Boundary &boundary)
Process boundary Selection.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
void computeNetwork(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false, std::string additionalPath="", std::string demandPath="")
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
FXMenuCheck * menuCheckShowJunctionBubble
menu check to show connection as buuble in "Move" mode.
virtual void commitGeometryMoving(GNEUndoList *undoList)=0
commit geometry changes in the attributes of an element after use of moveGeometry(...)
const std::string & getTagStr() const
get tag assigned to this object in string format
Demanding mode (Routes, Vehicles etc..)
FXEvent * myEventInfo
information of event
GNEViewNetHelper::EditShapes myEditShapes
struct for grouping all variables related with edit shapes
EditShapes(GNEViewNet *viewNet)
default constructor
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
std::vector< GNEPoly * > myPolys
vector with the clicked Polys
GNEViewNet * myViewNet
pointer to viewNet
A storage for options typed value containers)
hotkey for mode selecting objects
GNEViewNet * myViewNet
pointer to viewNet
GNEShape * getShapeFront() const
get front shape element (or a pointer to nullptr if there isn't)
GNENetElement * getShapeEditedElement() const
retrieve the junction of which the shape is being edited
void updateDemandModeSpecificControls()
updates Demand mode specific controls
crossing between edges for pedestrians
virtual void commitGeometryMoving(GNEUndoList *undoList)=0
commit geometry changes in the attributes of an element after use of moveGeometry(...)
Position selectionCorner2
second corner of the rectangle-selection
mode for inspecting demand elements
void buildVehicleOptionsMenuChecks()
build menu checks
void drawTestingElements(GUIMainWindow *mainWindow)
draw testing element
void processRectangleSelection()
process rectangle Selection
GNENet * getNet() const
get the net object
Supermode
enum for supermodes
GNEViewNetHelper::MoveSingleElementValues myMoveSingleElementValues
void commitShapeChange(const PositionVector &oldShape, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of changeShapeGeometry(...)
hotkey for mode creating polygons
mode for connecting lanes
GNEConnection * getConnectionFront() const
get front connection (or a pointer to nullptr if there isn't)
void swapLane2Edge()
swap lane to edge
void setStatusBarText(const std::string &text)
set staturBar text
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
std::vector< GNEDemandElement * > myDemandElements
vector with the clicked demand elements
void finishMoveSingleElement()
finish moving single elements in Network AND Demand mode
hotkey for mode editing TAZ
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute attr
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
NetworkEditMode networkEditMode
the current Network edit mode
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
std::vector< GNEPOI * > myPOIs
vector with the clicked POIs
void getVisibleDemandMenuCommands(std::vector< FXMenuCheck *> &commands) const
get visible demand menu commands
DemandEditMode
enum for demand edit modes
FXMenuCheck * menuCheckHideShapes
Hide shapes (Polygons and POIs)
automatically create opposite edge
Position myRelativeClickedPosition
relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user does...
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
virtual void moveGeometry(const Position &offset)=0
change the position of the element geometry without saving in undoList
std::map< GNEEdge *, MoveSingleElementValues * > myMovedEgdesGeometryPoints
container used for move GeometryPoints of edges
void processShapeSelection(const PositionVector &shape)
process shape selection
GNEPoly * getPolyFront() const
get front Poly (or a pointer to nullptr if there isn't)
std::vector< GNEShape * > myShapes
vector with the clicked shape elements (Poly and POIs)
bool showAllPersonPlans() const
check all person plans has to be show
MoveSingleElementValues(GNEViewNet *viewNet)
constructor
void removePolygonForEditShapes(GNEPoly *polygon)
remove Polygon for edit shapes
bool isShapeBlocked() const
return true if Shape TAZ is blocked
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
std::vector< GUIGlObject * > myGUIGlObjects
vector with the clicked GUIGlObjects
GNEDemandElement * myDemandElementToMove
the demand element which position is being moved
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type (or a pointer to nullptr if there isn't)
void endGeometryMoving()
begin movement (used when user click over additional to start a movement, to avoid problems with prob...
mode for deleting demand elements
void saveEditedShape()
save edited shape
Network mode (Edges, junctions, etc..)
hot key <F3> set network mode in NETEDIT
GNEViewNet * myViewNet
pointer to viewNet
GNENet * myNet
Pointer to current net. (We are not responsible for deletion)
void startGeometryMoving()
bool selectingUsingRectangle
whether we have started rectangle-selection
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
#define GUIDesignButtonToolbarSupermode
checkable button with icon placed in navigation toolbar for supermodes
void setDemandEditMode(DemandEditMode demandMode, bool force=false)
set Demand edit mode
Position getWindowCursorPosition() const
Returns the information whether rotation is allowd.
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
An Element which don't belongs to GNENet but has influency in the simulation.
GNEEdge * myEdgeToMove
the edge of which geometry is being moved
int movingIndexShape
index moved
reserved GLO type to pack all netElements
void moveEntireShape(const PositionVector &oldShape, const Position &offset)
move entire shape without commiting change
FXMenuCheck * menuCheckLockPerson
Lock Person.
std::map< GNEJunction *, Position > myMovedJunctionOriginPositions
container used for move junctions
GNEFrame * myCurrentFrame
the current frame
void setz(double z)
set position z
GNETAZ * myTAZToMove
the TAZ element which their Shape is being moved (it's the only additional with a shape instead a pos...
virtual Position getPositionInView() const =0
Returns position of additional in view.