157 FXGLVisual* glVis, FXGLCanvas* share, FXToolBar* toolBar) :
158 GUISUMOAbstractView(tmpParent, app, viewParent, net->getVisualisationSpeedUp(), glVis, share),
159 myViewParent(viewParent),
163 myShowConnections(false),
165 myCreateEdgeSource(0),
168 myOppositeEdgeToMove(0),
172 myAdditionalToMove(0),
173 myMovingIndexShape(-1),
174 myMovingSelection(false),
175 myAmInRectSelect(false),
177 myEditModeCreateEdge(0),
180 myEditModeInspect(0),
182 myEditModeConnection(0),
183 myEditModeTrafficLight(0),
184 myEditModeAdditional(0),
185 myEditModeCrossing(0),
186 myEditModePolygon(0),
188 myUndoList(undoList),
190 myTestingMode(
OptionsCont::getOptions().getBool("gui-testing")) {
192 reparent(actualParent);
194 buildEditModeControls();
196 myNet->setViewNet(
this);
202 if (windowSize.size() == 2 && GNEAttributeCarrier::canParse<int>(windowSize[0]) && GNEAttributeCarrier::canParse<int>(windowSize[1])) {
203 myTestingWidth = GNEAttributeCarrier::parse<int>(windowSize[0]);
204 myTestingHeight = GNEAttributeCarrier::parse<int>(windowSize[1]);
206 WRITE_ERROR(
"Invalid windows size-format: " +
toString(windowSize) +
"for option'window-size'");
233 "\tLocate Junction\tLocate a junction within the network.",
235 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
238 "\tLocate Street\tLocate a street within the network.",
240 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
243 "\tLocate TLS\tLocate a tls within the network.",
245 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
248 "\tLocate Additional\tLocate an additional structure within the network.",
250 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
253 "\tLocate PoI\tLocate a PoI within the network.",
255 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
258 "\tLocate Polygon\tLocate a Polygon within the network.",
260 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
283 double minValue = std::numeric_limits<double>::infinity();
284 double maxValue = -std::numeric_limits<double>::infinity();
290 }
else if (active == 11) {
294 const double val = lane->getColorValue(active);
295 minValue =
MIN2(minValue, val);
296 maxValue =
MAX2(maxValue, val);
301 minValue =
MIN2(minValue, junction->getPositionInView().z());
302 maxValue =
MAX2(maxValue, junction->getPositionInView().z());
306 if (minValue != std::numeric_limits<double>::infinity()) {
309 double range = maxValue - minValue;
371 if ((
myEditShapePoly == NULL) && (element != NULL) && (shape.size() > 1)) {
405 for (
auto i : selectedJunctions) {
411 for (
auto i : selectedEdges) {
420 for (
auto i : selectedEdges) {
425 std::vector<GNEEdge*> noJunctionsSelected;
426 std::vector<GNEEdge*> originJunctionSelected;
427 std::vector<GNEEdge*> destinyJunctionSelected;
429 for (
auto i : selectedEdges) {
433 if (!originSelected && !destinySelected) {
434 noJunctionsSelected.push_back(i);
435 }
else if (originSelected && !destinySelected) {
436 originJunctionSelected.push_back(i);
437 }
else if (!originSelected && destinySelected) {
438 destinyJunctionSelected.push_back(i);
439 }
else if (!originSelected && !destinySelected) {
444 for (
auto i : noJunctionsSelected) {
462 double distanceToOffsetSegmentClickedEdge = segmentClickedEdge.
positionAtOffset(offsetSegmentClickedEdge).
distanceTo(originPosition);
464 if (!segmentClickedEdge.
positionAtOffset(offsetSegmentClickedEdge, distanceToOffsetSegmentClickedEdge).
almostSame(originPosition)) {
465 distanceToOffsetSegmentClickedEdge *= -1;
468 for (
auto i : noJunctionsSelected) {
470 if (i != clickedEdge) {
473 segmentSelectedEdge.push_back(i->getGNEJunctionSource()->getPositionInView());
474 segmentSelectedEdge.push_back(i->getGNEJunctionDestiny()->getPositionInView());
494 i.first->moveGeometry(i.second, offset);
499 i.first->moveEntireShape(i.second, offset);
504 i.first->moveVertexShape(i.second.index, i.second.originalPosition, offset);
514 i.first->commitGeometryMoving(i.second,
myUndoList);
516 myOriginPositionOfMovedJunctions.clear();
520 i.first->commitShapeChange(i.second,
myUndoList);
522 myOriginShapesMovedEntireShapes.clear();
526 i.first->commitShapeChange(i.second.originalShape,
myUndoList);
528 myOriginShapesMovedPartialShapes.clear();
539 glMatrixMode(GL_MODELVIEW);
541 glDisable(GL_TEXTURE_2D);
542 glDisable(GL_ALPHA_TEST);
544 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
545 glEnable(GL_DEPTH_TEST);
550 glTranslated(0, 0,
GLO_MAX - 1);
553 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
587 const double size =
p2m(32);
590 glTranslated(center.
x(), center.
y(),
GLO_MAX - 1);
591 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
594 glVertex2d(0, -size);
595 glVertex2d(size, -size);
615 if (temporalDrawingShape.size() > 0) {
625 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
626 const float minB[2] = { (float)bound.
xmin(), (float)bound.
ymin() };
627 const float maxB[2] = { (float)bound.
xmax(), (float)bound.
ymax() };
629 glEnable(GL_POLYGON_OFFSET_FILL);
630 glEnable(GL_POLYGON_OFFSET_LINE);
646 FXEvent* e = (FXEvent*) eventData;
666 pointed_poly = (
GNEPoly*)pointed;
674 pointed_edge = (
GNEEdge*)pointed;
677 pointed_lane = (
GNELane*)pointed;
681 if (dynamic_cast<GNEPOI*>(pointed)) {
682 pointed_poi = (
GNEPOI*)pointed;
688 pointed_poly = (
GNEPoly*)pointed;
709 if ((e->state & CONTROLMASK) == 0) {
714 if (!pointed_junction) {
736 std::cout <<
"edge created without an open CommandGroup )-:\n";
776 }
else if (pointed_poi) {
780 }
else if (pointed_poiLane) {
784 }
else if (pointed_junction) {
792 }
else if (pointed_edge) {
803 }
else if (pointed_additional) {
820 bool markElementMode = (((FXEvent*)eventData)->state & CONTROLMASK) != 0;
828 if (markElementMode) {
846 if (pointed_junction) {
847 pointedAC = pointed_junction;
848 pointedO = pointed_junction;
849 }
else if (pointed_lane) {
851 pointedAC = pointed_edge;
852 pointedO = pointed_edge;
854 pointedAC = pointed_lane;
855 pointedO = pointed_lane;
857 }
else if (pointed_edge) {
858 pointedAC = pointed_edge;
859 pointedO = pointed_edge;
860 }
else if (pointed_crossing) {
861 pointedAC = pointed_crossing;
862 pointedO = pointed_crossing;
863 }
else if (pointed_additional) {
864 pointedAC = pointed_additional;
865 pointedO = pointed_additional;
866 }
else if (pointed_connection) {
867 pointedAC = pointed_connection;
868 pointedO = pointed_connection;
869 }
else if (pointed_poly) {
870 pointedAC = pointed_poly;
871 pointedO = pointed_poly;
872 }
else if (pointed_poi) {
873 pointedAC = pointed_poi;
874 pointedO = pointed_poi;
875 }
else if (pointed_poiLane) {
876 pointedAC = pointed_poiLane;
877 pointedO = pointed_poiLane;
880 std::vector<GNEAttributeCarrier*> selectedElements;
881 std::vector<GNEAttributeCarrier*> selectedFilteredElements;
887 for (
auto i : selectedElements) {
888 if (i->getTag() == pointedAC->
getTag()) {
889 selectedFilteredElements.push_back(i);
894 if (selectedFilteredElements.size() > 0) {
896 }
else if (pointedAC != NULL) {
902 if ((selectedFilteredElements.size() > 0) || (pointedAC != NULL)) {
930 const bool mayPass = (((FXEvent*)eventData)->state & SHIFTMASK) != 0;
931 const bool allowConflict = (((FXEvent*)eventData)->state & CONTROLMASK) != 0;
940 if (pointed_junction) {
949 if (pointed_additional == NULL) {
963 if (pointed_crossing == NULL) {
974 if (pointed_poi == NULL) {
1026 if (((FXEvent*)eventData)->state & SHIFTMASK) {
1082 offsetMovement =
Position(0, 0, dist / 10);
1087 offsetMovement =
Position(0, 0, (offsetMovement.
y() + offsetMovement.
x()) / 10);
1134 if (
myAmInRectSelect && ((((FXEvent*)eventData)->state & SHIFTMASK) ==
false)) {
1152 if (clearSelection) {
1265 throw ProcessError(
"invalid edit mode called by hotkey");
1376 edge = &(((
GNELane*)pointed)->getParentEdge());
1406 std::set<GNEEdge*> result;
1409 for (
auto it : ids) {
1415 result.insert((
GNEEdge*)pointed);
1418 result.insert(&(((
GNELane*)pointed)->getParentEdge()));
1451 return dynamic_cast<GNEPoly*
>(pointed);
1465 return dynamic_cast<GNEPOI*
>(pointed);
1569 if (edges.size() != 0) {
1623 for (
auto it : edges) {
1644 for (
auto it : edges) {
1665 for (
auto it : edges) {
1686 for (
auto it : edges) {
1707 if (polygonUnderMouse) {
1722 if (polygonUnderMouse) {
1737 if (polygonUnderMouse) {
1752 if (polygonUnderMouse) {
1767 if (polygonUnderMouse) {
1783 std::vector<GNELane*> lanes;
1784 for (
auto i : GLIDs) {
1787 lanes.push_back(lane);
1790 if (lanes.empty()) {
1794 GNELane* nearestLane = lanes.front();
1797 for (
auto i : lanes) {
1798 double posOverLane = i->getShape().nearest_offset_to_point2D(POI->
getPositionInView());
1799 double lateralOffset = i->getShape().positionAtOffset(posOverLane).distanceTo(POI->
getPositionInView());
1800 if (lateralOffset < minorLateralOffset) {
1801 minorPosOverLane = posOverLane;
1802 minorLateralOffset = lateralOffset;
1807 std::string
id = POI->
getID();
1808 std::string type = POI->
getType();
1820 myNet->
addPOI(
id, type, color, pos,
false, nearestLane->
getID(), minorPosOverLane, 0, layer, angle, imgFile, POIWidth, POIHeight);
1823 }
else if (POILane) {
1825 std::string
id = POILane->
getID();
1826 std::string type = POILane->
getType();
1829 double layer = POILane->
getLayer();
1832 double POIWidth = POILane->
getWidth();
1833 double POIWeight = POILane->
getHeight();
1838 myNet->
addPOI(
id, type, color, pos,
false,
"", 0, 0, layer, angle, imgFile, POIWidth, POIWeight);
1854 for (
auto it : lanes) {
1941 std::map<GNEEdge*, GNELane*> mapOfEdgesAndLanes;
1943 for (
auto i : lanes) {
1947 if (mapOfEdgesAndLanes.size() != lanes.size()) {
1948 FXMessageBox::information(getApp(), MBOX_OK,
1949 "Multiple lane in the same edge selected",
"%s",
1950 (
"There are selected lanes that belong to the same edge.\n Only one lane per edge will be restricted for " +
toString(vclass) +
".").c_str());
1953 if (mapOfEdgesAndLanes.size() > 0) {
1957 for (
auto i : mapOfEdgesAndLanes) {
1958 if (i.first->hasRestrictedLane(vclass)) {
1963 if (counter == (
int)mapOfEdgesAndLanes.size()) {
1964 FXMessageBox::information(getApp(), MBOX_OK,
1965 (
"Set vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1966 (
"All lanes own already another lane in the same edge with a restriction for " +
toString(vclass)).c_str());
1973 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1974 (
"Set vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1975 (
toString(mapOfEdgesAndLanes.size() - counter) +
" lanes will be restricted for " +
toString(vclass) +
". continue?").c_str());
1979 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'No'");
1981 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
1987 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
1994 for (std::map<GNEEdge*, GNELane*>::iterator i = mapOfEdgesAndLanes.begin(); i != mapOfEdgesAndLanes.end(); i++) {
2022 std::set<GNEEdge*> setOfEdges;
2024 for (
auto i : edges) {
2025 setOfEdges.insert(i);
2028 for (
auto it : lanes) {
2033 if (setOfEdges.size() > 0) {
2037 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
2039 if ((*it)->hasRestrictedLane(vclass)) {
2044 if (counter == (
int)setOfEdges.size()) {
2045 FXMessageBox::information(getApp(), MBOX_OK,
2046 (
"Add vclass for" +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
2047 (
"All lanes own already another lane in the same edge with a restriction for " +
toString(vclass)).c_str());
2054 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
2055 (
"Add vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
2056 (
toString(setOfEdges.size() - counter) +
" restrictions for " +
toString(vclass) +
" will be added. continue?").c_str());
2060 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'No'");
2062 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
2068 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
2075 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
2103 std::set<GNEEdge*> setOfEdges;
2105 for (
auto i : edges) {
2106 setOfEdges.insert(i);
2109 for (
auto it : lanes) {
2114 if (setOfEdges.size() > 0) {
2118 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
2120 if ((*it)->hasRestrictedLane(vclass)) {
2126 FXMessageBox::information(getApp(), MBOX_OK,
2127 (
"Remove vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
2128 (
"Selected lanes and edges haven't a restriction for " +
toString(vclass)).c_str());
2135 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
2136 (
"Remove vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
2137 (
toString(counter) +
" restrictions for " +
toString(vclass) +
" will be removed. continue?").c_str());
2141 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'No'");
2143 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
2149 WRITE_WARNING(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
2156 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
2183 if (e->click_count == 2) {
2184 handle(
this, FXSEL(SEL_DOUBLECLICKED, 0), eventData);
2209 if (junction != 0) {
2223 if (junction != 0) {
2228 for (
auto i : selectedJunction) {
2247 if (junction != 0) {
2252 for (
auto i : selectedJunction) {
2572 if (junctions.size() > 0) {
2573 std::string plural = junctions.size() == 1 ? (
"") : (
"s");
2575 for (
auto i : junctions) {
2586 if (lanes.size() > 0) {
2587 std::string plural = lanes.size() == 1 ? (
"") : (
"s");
2589 for (
auto i : lanes) {
2600 if (edges.size() > 0) {
2601 std::string plural = edges.size() == 1 ? (
"") : (
"s");
2603 for (
auto i : edges) {
2614 if (additionals.size() > 0) {
2615 std::string plural = additionals.size() == 1 ? (
"") : (
"s");
2617 for (
auto i : additionals) {
2630 std::vector<GNECrossing*> crossings;
2631 for (
auto i : junctions) {
2632 for (
auto j : i->getGNECrossings()) {
2634 crossings.push_back(j);
2639 if (crossings.size() > 0) {
2640 std::string plural = crossings.size() == 1 ? (
"") : (
"s");
2642 for (
auto i : crossings) {
2654 std::vector<GNEConnection*> connections;
2655 for (
auto i : edges) {
2656 for (
auto j : i->getGNEConnections()) {
2658 connections.push_back(j);
2663 if (connections.size() > 0) {
2664 std::string plural = connections.size() == 1 ? (
"") : (
"s");
2666 for (
auto i : connections) {
2679 if (selectedShapes.size() > 0) {
2680 std::string plural = selectedShapes.size() == 1 ? (
"") : (
"s");
2682 for (
auto i : selectedShapes) {
2697 selection.
add(newPos);
2698 selection.
grow(0.1);
2701 for (
auto it_ids : ids) {
2722 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
2723 "Confirm Junction Merger",
"%s",
2724 (
"Do you wish to merge junctions '" + moved->
getMicrosimID() +
2727 "' will be eliminated and its roads added to '" +
2732 WRITE_WARNING(
"Closed FXMessageBox 'merge junctions' with 'No'");
2734 WRITE_WARNING(
"Closed FXMessageBox 'merge junctions' with 'ESC'");
2740 WRITE_WARNING(
"Closed FXMessageBox 'merge junctions' with 'Yes'");
void startEditCustomShape(GNENetElement *element, const PositionVector &shape, bool fill)
start edit custom shape
long onCmdAddRestrictedLaneSidewalk(FXObject *, FXSelector typeOfTransformation, void *)
Add restricted lane for pedestrians.
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
AddShapeResult processClick(const Position &clickedPosition, GNELane *lane)
process click over Viewnet
void buildColorRainbow(GUIColorScheme &scheme, int active, GUIGlObjectType objectType)
recalibrate color scheme according to the current value range
long onCmdResetEdgeEndpoint(FXObject *, FXSelector, void *)
restore geometry endpoint to node position
GNEViewParent * myViewParent
view parent
virtual void openAdditionalDialog()
open Additional Dialog
void paintGLGrid()
paints a grid
mode for selecting objects
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
Transform POI to POILane, and viceversa.
long onCmdRestrictLaneBikelane(FXObject *, FXSelector typeOfTransformation, void *)
restrict lane to bikes
GNEPOILane * getPOILaneAtPopupPosition()
try to retrieve a POILane at popup position
PositionVector getShape() const
get Position vector calculated in updateGeometry()
static const RGBColor BLUE
FXDEFMAP(GNEViewNet) GNEViewNetMap[]
double ymin() const
Returns minimum y-coordinate.
std::vector< GUIGlID > getObjectsAtPosition(Position pos, double radius)
returns the ids of the object at position within the given (rectangular) radius using GL_SELECT ...
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
bool almostSame(const Position &p2, double maxDiv=POSITION_EPS) const
checki if two position is almost the sme as other
Position getPositionInView() const
Return current position.
SumoXMLTag
Numbers representing SUMO-XML - element names.
const std::set< GUIGlID > & getSelected() const
Returns the set of ids of all selected objects.
bool selectEdges()
whether inspection, selection and inversion should apply to edges or to lanes
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
void openPolygon(bool allowUndo=true)
open polygon
double xmax() const
Returns maximum x-coordinate.
GUICompleteSchemeStorage gSchemeStorage
set non-default geometry endpoint
AddAdditionalResult addAdditional(GNENetElement *netElement, GUISUMOAbstractView *abstractViewParent)
add additional element
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
bool isAdditionalBlocked() const
Check if additional item is currently blocked (i.e. cannot be moved with mouse)
double scale
information about a lane's width (temporary, used for a single view)
Position getPositionInView() const
Returns position of additional in view.
void abortOperation(bool clearSelection=true)
abort current edition operation
void deleteSelectedJunctions()
delete all currently selected junctions
GNEEdge * getEdgeTemplate() const
get the template edge (to copy attributes from)
whether a given shape is user-defined
reset junction's connections
bool setColorScheme(const std::string &name)
set color scheme
long onCmdSetModeAdditional(FXObject *, FXSelector, void *)
called when user press the button for additional mode
bool restrictLane(SUMOVehicleClass vclass)
restrict lane
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
void smoothElevation(GNEUndoList *undoList)
smooth elevation with regard to adjoining edges
mode for creating polygons
void inspectElement(GNEAttributeCarrier *AC)
Inspect a single element.
Position myMovingReference
variable for calculating moving offset (Used when user doesn't click exactly over the center of shape...
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
begin/end of the description of a junction
long onRightBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's right button
bool myShowConnections
whether show connections has been activated once
begin/end of the description of a single lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
StringBijection< EditMode > myEditModeNames
since we cannot switch on strings we map the mode names to an enum
long onMouseMove(FXObject *, FXSelector, void *)
called when user moves mouse
void markAsCreateEdgeSource()
marks as first junction in createEdge-mode
The main window of the Netedit.
bool mySelectEdges
flag to check if select edges is enabled
SUMORTree * myGrid
The visualization speed-up.
long onCmdSetModeSelect(FXObject *, FXSelector, void *)
called when user press the button for select mode
int myTestingHeight
Height of viewNet in testing mode.
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
void hotkeyFocusFrame()
handle focus frame keypress
AddShapeResult
FOX-declaration.
FXMenuCheck * myMenuCheckShowGrid
show grid button
void stopEditCustomShape()
edit edit shape
GNEPOILane * myPoiLaneToMove
the poiLane which is being moved
void removeAttributeCarrier(GNEAttributeCarrier *ac)
remove attribute carrier (element)
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
void straightenElevation(GNEUndoList *undoList)
interpolate z values linear between junctions
void toggleSelection(GUIGlID id)
Toggles selection of an object.
virtual long onMouseMove(FXObject *, FXSelector, void *)
FXMenuCheck * myChainCreateEdge
whether the endpoint for a created edge should be set as the new source
void stopDrawing()
stop drawing and create polygon or
turn junction into geometry node
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true)
get a single attribute carrier based on a GLID
connectio between two lanes
std::set< GNEEdge * > getEdgesAtPopupPosition()
try to retrieve multiple edges at popup position
long onCmdSplitEdge(FXObject *, FXSelector, void *)
split edge at cursor position
void updateCurrentLabel(GNEAttributeCarrier *ac)
update current label
long onCmdToogleSelectEdges(FXObject *, FXSelector, void *)
toogle selet edges
Locate junction - button.
const double SUMO_const_laneWidth
GNEViewParent * getViewParent() const
get the net object
double y() const
Returns the y-position.
void commitShapeChange(const PositionVector &oldShape, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of changeShapeGeometry(...)
GUIMainWindow * myApp
The application.
Position snapToActiveGrid(const Position &pos) const
Returns a position that is mapped to the closest grid point if the grid is active.
std::map< GNEEdge *, movingEdges > myOriginShapesMovedPartialShapes
void setEditMode(EditMode mode)
set edit mode
static void resetTextures()
Reset textures.
bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, double posLat, double layer, double angle, const std::string &imgFile, double width, double height, bool ignorePruning=false)
Builds a POI using the given values and adds it to the container.
MFXCheckableButton * myEditModeSelect
chekable button for edit mode select
long onCmdOpenPolygon(FXObject *, FXSelector, void *)
open closed polygon
Position mySelCorner2
second corner of the rectangle-selection
double x() const
Returns the x-position.
int getVertexIndex(const Position &pos, bool createIfNoExist=true)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
GNEAdditional * getAdditionalAtPopupPosition()
try to retrieve a additional at popup position
void smooth(GNEUndoList *undoList)
make geometry smooth
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
static const RGBColor ORANGE
MFXCheckableButton * myEditModeMove
chekable button for edit mode move
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
void resetJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
reset junction's connections
MFXCheckableButton * myEditModeDelete
chekable button for edit mode delete
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
A NBNetBuilder extended by visualisation and editing capabilities.
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.
PositionVector shape
The crossing's shape.
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
GNEEdge * createEdge(GNEJunction *src, GNEJunction *dest, GNEEdge *tpl, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false)
creates a new edge (unless an edge with the same geometry already exists)
int editMode
the current NETEDIT mode (temporary)
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...
long onCmdStraightenEdgesElevation(FXObject *, FXSelector, void *)
interpolate z values linear between junctions
GNEPOI * myPoiToMove
the poi which is being moved
void setEditModeFromHotkey(FXushort selid)
sets edit mode (from hotkey)
void abortDrawing()
abort drawing
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when user press a key
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
long onCmdSetEdgeEndpoint(FXObject *, FXSelector, void *)
set non-default geometry endpoint
void handleIDs(std::vector< GUIGlID > ids, bool selectEdgesEnabled, SetOperation setop=SET_DEFAULT)
apply list of ids to the current selection according to SetOperation,
interpolate z values linear between junctions
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
long onCmdEditConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
PositionVector myMovingOriginalShape
Shape of elements before moving (needed for commmit shape changes)
const std::string & getID() const
Returns the id.
double getHeight() const
Returns the image height of the POI.
GUIDialog_ViewSettings * myVisualizationChanger
Visualization changer.
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList)
removes edge
void moveSelection(const Position &offset)
move selection
int myMovingIndexShape
current index of shape that are being moved
long onCmdResetConnections(FXObject *, FXSelector, void *)
reset junction connections
void updateControls()
update control contents after undo/redo or recompute
EditMode myPreviousEditMode
the previous edit mode before edit junction's shapes
std::map< GNEJunction *, Position > myOriginPositionOfMovedJunctions
Selected Junctions that are being moved.
FXMenuCheck * myMenuCheckChangeAllPhases
menu check to set change all phases
void removeLastPoint()
remove last added point
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_MODE_POLYGON
GNEEdge * myEdgeToMove
the edge of which geometry is being moved
A class that stores a 2D geometrical boundary.
void closePolygon(bool allowUndo=true)
close polygon
#define WRITE_WARNING(msg)
A single child window which contains a view of the simulation area.
const std::string & getImgFile() const
Returns the imgFile of the Shape.
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 ...
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
static OptionsCont & getOptions()
Retrieves the options.
double p2m(double pixel) const
pixels-to-meters conversion method
virtual void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)=0
commit geometry changes in the attributes of an element after use of moveGeometry(...)
std::map< const GUIGlObject *, int > myAdditionallyDrawn
List of objects for which GUIGlObject::drawGLAdditional is called.
bool changeAllPhases() const
change all phases
const PositionVector & getTemporalShape() const
get Temporal shape
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
long onCmdSetModeCrossing(FXObject *, FXSelector, void *)
called when user press the button for crossing mode
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
int getVertexIndex(const Position &pos, bool createIfNoExist=true)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
double getLayer() const
Returns the layer of the Shape.
void handleLaneClick(GNELane *lane, bool mayDefinitelyPass, bool allowConflict, bool toggle)
either sets the current lane or toggles the connection of the current lane to this lane (if they shar...
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag=SUMO_TAG_NOTHING, bool onlySelected=false)
return all shapes
void insert(const std::string str, const T key, bool checkDuplicates=true)
void buildEditModeControls()
adds controls for setting the edit mode
FXMenuCheck * myMenuCheckMoveElevation
apply movement to elevation
GUIGlID getObjectAtPosition(Position pos)
returns the id of the object at position using GL_SELECT
GNEUndoList * getUndoList() const
get the undoList object
long onLeftBtnPress(FXObject *, FXSelector, void *)
long onRightBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's right button
long onCmdSimplifyShape(FXObject *, FXSelector, void *)
simply shape of current polygon
static const RGBColor GREEN
void begingMoveSelection(GNEAttributeCarrier *originAC, const Position &originPosition)
begin move selection
void computeNodeShape(double mismatchThreshold)
Compute the junction shape for this node.
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
bool showLockIcon() const
check if lock icon should be visible
virtual long onPaint(FXObject *, FXSelector, void *)
int addColor(const T &color, const double threshold, const std::string &name="")
long onCmdRemoveRestrictedLaneBuslane(FXObject *, FXSelector typeOfTransformation, void *)
remove restricted lane for bus
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
std::string name
The name of this setting.
double gridXSize
Information about the grid spacings.
bool hasCommandGroup() const
Check if undoList has command group.
void deleteSelectedConnections()
delete all currently selected connections
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
remove restricted lane
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
mode for inspecting object attributes
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
FXMenuCheck * myMenuCheckShowConnections
menu check to show connections
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static bool hasAttribute(SumoXMLTag tag, SumoXMLAttr attr)
check if an element with certain tag has a certain attribute
virtual void setStatusBarText(const std::string &)
simplify polygon geometry
void deleteSelectedCrossings()
delete all currently selected crossings
show junctions as bubbles
GNEAdditional * myAdditionalToMove
the stoppingPlace element which shape is being moved
double getNaviDegree() const
Returns the angle of the Shape in navigational degrees.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
GNEEdge & getParentEdge()
Returns underlying parent edge.
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
virtual ~GNEViewNet()
destructor
GNEEdge * getEdgeAtPopupPosition()
try to retrieve an edge at popup position
long onCmdSetModeMove(FXObject *, FXSelector, void *)
called when user press the button for move mode
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.
GNEPOI * getPOIAtPopupPosition()
try to retrieve a POILane at popup position
long onCmdReplaceJunction(FXObject *, FXSelector, void *)
replace node by geometry
long onCmdClearConnections(FXObject *, FXSelector, void *)
clear junction connections
FXMenuCheck * myMenuCheckSelectEdges
menu check to select only edges
transform lane to busLane
FXToolBar * myToolbar
a reference to the toolbar in myParent
FXComboBox & getColoringSchemesCombo()
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
void deleteLane(GNELane *lane, GNEUndoList *undoList)
removes lane
long onCmdToogleShowConnection(FXObject *, FXSelector, void *)
toogle show connections
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
MFXCheckableButton * myEditModeCreateEdge
bool isMovementBlocked() const
return true if movement is blocked
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
virtual void moveGeometry(const Position &oldPos, const Position &offset)=0
change the position of the element geometry without saving in undoList
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
registers completed movement with the undoList
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
void removeAdditional(GNEAdditional *additional)
remove an additional element previously added
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
transform lane to bikelane
bool removeRestrictedLane(SUMOVehicleClass vclass)
remove restricted lane
long onCmdSplitEdgeBidi(FXObject *, FXSelector, void *)
split edge at cursor position
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) ...
double xmin() const
Returns minimum x-coordinate.
MFXCheckableButton * myEditModeTrafficLight
chekable button for edit mode traffic light
void initGNEConnections()
initialize GNEConnections
long onCmdRemoveRestrictedLaneBikelane(FXObject *, FXSelector typeOfTransformation, void *)
remove restricted lane for bikes
mode for selecting objects
GNEJunction * myJunctionToMove
the Junction to be moved.
bool addCrossing(GNENetElement *netElement)
add Crossing element
MFXCheckableButton * myEditModeAdditional
chekable button for edit mode additional
void markAttributeCarrier(GNEAttributeCarrier *ac)
mark attribute carrier (element)
edge: the shape in xml-definition
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(const std::set< GUIGlID > &ids, GUIGlObjectType type)
get the attribute carriers based on GlIDs
Boundary & grow(double by)
extends the boundary by the given amount
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
Locate polygons - button.
const std::string getID() const
function to support debugging
open additional dialog (used in netedit)
void unMarkAsCreateEdgeSource()
removes mark as first junction in createEdge-mode
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
Position screenPos2NetPos(int x, int y) const
Translate screen position to network position.
std::map< GNEEdge *, PositionVector > myOriginShapesMovedEntireShapes
Selected Edges that are being moved < Edge, PositionVector >
void focusUpperElement()
focus upper element of frame
int myTestingWidth
Width of viewNet in testing mode.
GNEFrame::DrawingMode * getDrawingMode() const
get drawing mode editor
GNEJunction * createJunction(const Position &pos, GNEUndoList *undoList)
creates a new junction
void splitEdgesBidi(const std::set< GNEEdge *> &edges, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
GNEJunction * getGNEJunctionSource() const
returns the source-junction
Position mySelCorner1
firstcorner of the rectangle-selection
void p_abort()
reverts and discards ALL active command groups
GUIPerspectiveChanger * myChanger
The perspective changer.
mode for editing crossing
long onCmdRestrictLaneBuslane(FXObject *, FXSelector typeOfTransformation, void *)
restrict lane to buslanes
bool myUseToolTips
use tool tips
GNEConnection * getConnectionAtPopupPosition()
try to retrieve a connection at popup position
virtual void onLeftBtnPress(void *data)
mouse functions
void destroyPopup()
destoys the popup
double getWidth() const
Returns the image width of the POI.
void doInit()
called after some features are already initialized
begin/end of the description of an edge
restore geometry endpoint to node position
FXMenuCheck * myAutoCreateOppositeEdge
void setSelectionScaling(double selectionScale)
set selection scaling
EditMode getCurrentEditMode() const
get the current edit mode
const PositionVector & getShape() const
retrieve the junction shape
MFXCheckableButton * myEditModeInspect
chekable button for edit mode inspect
FXMenuCheck * myMenuCheckExtendToEdgeNodes
menu check to extend to edge nodes
long onCmdClosePolygon(FXObject *, FXSelector, void *)
close opened polygon
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
A road/street connecting two junctions (netedit-version)
const std::string & getType() const
Returns the (abstract) type of the Shape.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when user release a key
FXbool makeCurrent()
A reimplementation due to some internal reasons.
long onCmdOK(FXObject *, FXSelector, void *)
virtual long onLeftBtnRelease(FXObject *, FXSelector, void *)
smooth elevation with regard to adjoining edges
GNEJunction * getJunctionAtPopupPosition()
try to retrieve a junction at popup position
long onCmdCreateCrossing(FXObject *, FXSelector, void *)
AddAdditionalResult
FOX-declaration.
int moveVertexShape(const int index, const Position &oldPos, const Position &offset)
change position of a vertex of shape without commiting change
long onCmdSmoothEdgesElevation(FXObject *, FXSelector, void *)
smooth elevation with regard to adjoining edges
static const RGBColor YELLOW
int moveVertexShape(const int index, const Position &oldPos, const Position &offset)
change position of a vertex of shape without commiting change
Mode for editing Polygons.
static const RGBColor RED
named colors
transform lane to sidewalk
const PositionVector & getShape() const
returns the shape of the lane
FXMenuCheck * myMenuCheckWarnAboutMerge
whether we should warn about merging junctions
double selectionScale
the current selection scaling in NETEDIT (temporary)
double m2p(double meter) const
meter-to-pixels conversion method
double length() const
Returns the length.
#define GUIDesignButtonToolbarCheckable
little checkable button with icon placed in navigation toolbar
virtual void show()
show Frame
static const RGBColor CYAN
GUIVisualizationSettings * myVisualizationSettings
visualization settings
void simplifyShape(bool allowUndo=true)
replace the current shape with a rectangle
long onCmdDeleteGeometryPoint(FXObject *, FXSelector, void *)
delete the closes geometry point
void show()
show additional frame and update use selected edges/lanes
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
PositionVector customShape
optional customShape for this crossing
long onCmdAddRestrictedLaneBikelane(FXObject *, FXSelector typeOfTransformation, void *)
Add restricted lane for bikes.
const RGBColor & getColor() const
Returns the color of the Shape.
FXMenuCheck * myMenuCheckShowBubbleOverJunction
show connection as buuble in "Move" mode.
An Element which don't belongs to GNENet but has influency in the simulation.
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_MODE_CONNECT
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
void show()
show shape frame and update use selected edges/lanes
MFXCheckableButton * myEditModeConnection
chekable button for edit mode connection
bool showConnections()
show connections over junctions
long onCmdOK(FXObject *, FXSelector, void *)
long onCmdReverseEdge(FXObject *, FXSelector, void *)
reverse edge
long onCmdSetModeTLS(FXObject *, FXSelector, void *)
called when user press the button for traffic lights mode
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any connection modifications.
int doPaintGL(int mode, const Boundary &bound)
do paintGL
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
Locate addtional structure - button.
GNEJunction * myCreateEdgeSource
source junction for new edge 0 if no edge source is selected an existing (or newly created) junction ...
A storage for options typed value containers)
void deleteSelectedShapes(SumoXMLTag shapeTag=SUMO_TAG_NOTHING)
delete all currently selected shapes
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
open additional dialog
GNENetElement * getShapeEditedElement() const
retrieve the junction of which the shape is being edited
static bool canOpenDialog(SumoXMLTag tag)
return true if element tag can open a values editor
long onCmdAddRestrictedLaneBuslane(FXObject *, FXSelector typeOfTransformation, void *)
Add restricted lane for buses.
long onCmdRemoveRestrictedLaneSidewalk(FXObject *, FXSelector typeOfTransformation, void *)
remove restricted lane for pedestrians
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_MODE_CROSSING
void computeEverything(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false, std::string additionalPath="", std::string shapePath="")
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
void deleteSelectedAdditionals()
delete all currently selected additionals
void clearJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
clear junction's connections
crossing between edges for pedestrians
void clear()
Clears the list of selected objects.
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
clear junction's connections
GNECrossing * getCrossingAtPopupPosition()
try to retrieve a crossing at popup position
bool showGrid
Information whether a grid shall be shown.
long onCmdSmoothEdges(FXObject *, FXSelector, void *)
smooth geometry
void drawDecals()
Draws the stored decals.
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_MODE_DELETE
void show()
show inspector frame
move elevation instead of x,y
GNENet * getNet() const
get the net object
long onCmdRestrictLaneSidewalk(FXObject *, FXSelector typeOfTransformation, void *)
restrict lane to pedestrians
const Position & getPosition() const
void commitShapeChange(const PositionVector &oldShape, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of changeShapeGeometry(...)
void updateModeSpecificControls()
updates mode specific controls
GUIGlID getGlID() const
Returns the numerical id of the object.
MFXCheckableButton * myEditModeCrossing
chekable button for edit mode crossing
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false)
return all additionals
long onCmdEditCrossingShape(FXObject *, FXSelector, void *)
edit crossing shape
Position getPositionInView() const
Returns position of additional in view.
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
void setStatusBarText(const std::string &text)
set staturBar text
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
void startDrawing()
start drawing
Set a vertex of polygon as first verte.
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
void hideAllFrames()
hide all frames
long onCmdSetModeConnect(FXObject *, FXSelector, void *)
called when user press the button for connect mode
Mode for editing additionals.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
void setEndpoint(Position pos, GNEUndoList *undoList)
makes pos the new geometry endpoint at the appropriate end
NBNode::Crossing * getNBCrossing() const
get referente to NBode::Crossing
long onCmdSetModePolygon(FXObject *, FXSelector, void *)
called when user press the button for polygon mode
static const RGBColor selectionColor
Mode for editing crossing.
GNEAttributeCarrier * getMarkedAttributeCarrier() const
returns marked atrribute carrier
void unblockObject(GUIGlID id)
Marks an object as unblocked.
mode for connecting lanes
long onCmdStraightenEdges(FXObject *, FXSelector, void *)
makes selected edges straight
long onCmdSetModeInspect(FXObject *, FXSelector, void *)
called when user press the button for inspect mode
void finishMoveSelection()
finish moving selection
mode for connecting lanes
bool myMovingSelection
whether a selection is being moved
mode for creating new edges
void removePolygonForEditShapes(GNEPoly *polygon)
remove Polygon for edit shapes
virtual long onRightBtnPress(FXObject *, FXSelector, void *)
NBEdge * getNBEdge()
returns the internal NBEdge
long onCmdSetFirstGeometryPoint(FXObject *, FXSelector, void *)
set as first geometry point the closes geometry point
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
GNEPoly * addPolygonForEditShapes(GNENetElement *netElement, const PositionVector &shape, bool fill)
Builds a special polygon used for edit Junctions's shapes.
GUIGlID getObjectUnderCursor()
returns the id of the object under the cursor using GL_SELECT
GNELane * getLaneAtPopupPosition()
try to retrieve a lane at popup position
long onCmdToogleShowBubbles(FXObject *, FXSelector, void *)
toogle show bubbles
bool locked(GUIGlObjectType type)
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
void inspectMultisection(const std::vector< GNEAttributeCarrier *> &ACs)
Inspect the given multi-selection.
double ymax() const
Returns maximum y-coordinate.
begin/end of the description of a Point of interest over Lane (used by Netedit)
long onCmdTransformPOI(FXObject *, FXSelector, void *)
Transform POI to POILane, and viceversa.
void hotkeyDel()
handle del keypress
bool isShapeBlocked() const
return true if shape is blocked
long onCmdAddReversedEdge(FXObject *, FXSelector, void *)
add reversed edge
mode for editing additional
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
GNEPoly * myEditShapePoly
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
bool isDrawing() const
return true if currently a shape is drawed
void closePolygon()
ensures that the last position equals the first
NBNode * getNBNode() const
Return net build node.
bool myAmInRectSelect
whether we have started rectangle-selection
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
C++ TraCI client API implementation.
bool addSRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
add restricted lane to edge
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const
Find all within search rectangle.
GUISelectedStorage gSelected
A global holder of selected objects.
GNENet * myNet
Pointer to current net. (We are not responsible for deletion)
void hotkeyEnter()
handle enter keypress
void resetEndpoint(const Position &pos, GNEUndoList *undoList)
restores the endpoint to the junction position at the appropriate end
void deleteSelectedLanes()
delete all currently selected lanes
long onCmdEditJunctionShape(FXObject *, FXSelector, void *)
edit junction shape
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
Position getSplitPos(const Position &clickPos)
void requireRecompute()
inform the net about the need for recomputation
long onCmdShowGrid(FXObject *, FXSelector, void *)
toogle show grid
void processClick(FXEvent *e, void *data)
Auxiliar function used by onLeftBtnPress(...)
void duplicateLane(GNELane *lane, GNEUndoList *undoList)
duplicates lane
long onCmdSetModeCreateEdge(FXObject *, FXSelector, void *)
long onCmdSetModeDelete(FXObject *, FXSelector, void *)
called when user press the button for delete mode
void deleteSelectedEdges()
delete all currently selected edges
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
EditMode myEditMode
the current edit mode
virtual long onRightBtnRelease(FXObject *, FXSelector, void *)
bool addRestrictedLane(SUMOVehicleClass vclass)
add restricted lane
std::vector< GUIGlID > getObjectsInBoundary(const Boundary &bound)
returns the ids of all objects in the given boundary
MFXCheckableButton * myEditModePolygon
chekable button for edit mode polygon
void moveEntireShape(const PositionVector &oldShape, const Position &offset)
move entire shape without commiting change
FXPopup * getLocatorPopup()
const Position & getPopupPosition() const
get position of current popup
GNEFrame * myCurrentFrame
the current frame
mode for inspecting object attributes
Position myMovingOriginalPosition
original Position of element before moving (needed for commmit position changes)
GNEPoly * myPolyToMove
the poly of which geometry is being moved
GNEPoly * getPolygonAtPopupPosition()
try to retrieve a polygon at popup position
SumoXMLTag getTag() const
get XML Tag assigned to this object
virtual Position getPositionInView() const =0
Returns position of additional in view.