 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
173 FXGLVisual* glVis, FXGLCanvas* share) :
174 GUISUMOAbstractView(tmpParent, app, viewParent, net->getVisualisationSpeedUp(), glVis, share),
177 myCommonCheckableButtons(this),
178 myNetworkCheckableButtons(this),
179 myDemandCheckableButtons(this),
180 myCommonViewOptions(this),
181 myNetworkViewOptions(this),
182 myDemandViewOptions(this),
183 myMoveSingleElementValues(this),
184 myMoveMultipleElementValues(this),
185 myVehicleOptions(this),
186 myVehicleTypeOptions(this),
187 mySelectingArea(this),
189 myViewParent(viewParent),
191 myCurrentFrame(
nullptr),
192 myUndoList(undoList) {
194 reparent(actualParent);
196 buildEditModeControls();
200 myNet->setViewNet(
this);
209 myTestingMode.initTestingMode();
234 "\tLocate Junction\tLocate a junction within the network.",
236 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
239 "\tLocate Street\tLocate a street within the network.",
241 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
245 "\tLocate Vehicle\tLocate a vehicle within the network.",
247 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
251 "\tLocate Person\tLocate a person within the network.",
253 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
257 "\tLocate Route\tLocate a route within the network.",
259 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
263 "\tLocate Stop\tLocate a stop within the network.",
265 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
277 "\tLocate TLS\tLocate a tls within the network.",
279 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
282 "\tLocate Additional\tLocate an additional structure within the network.",
284 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
287 "\tLocate PoI\tLocate a PoI within the network.",
289 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
292 "\tLocate Polygon\tLocate a Polygon within the network.",
294 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
301 GUISUMOAbstractView::update();
305 std::set<std::pair<std::string, GNEAttributeCarrier*> >
309 std::set<std::pair<std::string, GNEAttributeCarrier*> > result;
323 retrievedAC =
dynamic_cast<GNELane*
>(retrievedAC)->getParentEdge();
328 result.insert(std::make_pair(retrievedAC->
getID(), retrievedAC));
344 new FXMenuSeparator(ret);
380 }
else if (
id != 0) {
390 myApp->getCursorPosition(x, y, b);
409 if (oc.
getString(
"gui-testing.setting-output").size() > 0) {
477 bool hide,
double hideThreshold) {
480 double minValue = std::numeric_limits<double>::infinity();
481 double maxValue = -std::numeric_limits<double>::infinity();
487 }
else if (active == 11) {
491 const double val = lane->getColorValue(s, active);
492 minValue =
MIN2(minValue, val);
493 maxValue =
MAX2(maxValue, val);
498 minValue =
MIN2(minValue, junction->getPositionInView().z());
499 maxValue =
MAX2(maxValue, junction->getPositionInView().z());
503 if (minValue != std::numeric_limits<double>::infinity()) {
507 minValue =
MAX2(hideThreshold + 1, minValue);
510 double range = maxValue - minValue;
555 myCommonCheckableButtons(this),
556 myNetworkCheckableButtons(this),
557 myDemandCheckableButtons(this),
558 myCommonViewOptions(this),
559 myNetworkViewOptions(this),
560 myDemandViewOptions(this),
561 myMoveSingleElementValues(this),
562 myMoveMultipleElementValues(this),
563 myVehicleOptions(this),
564 myVehicleTypeOptions(this),
565 mySelectingArea(this),
569 std::vector<std::string>
571 std::set<std::string> keys;
574 for (
const auto& item : e->getParametersMap()) {
575 keys.insert(item.first);
577 for (
const auto con : e->getConnections()) {
578 for (
const auto& item : con.getParametersMap()) {
579 keys.insert(item.first);
583 for (
const auto lane : e->getLanes()) {
585 for (
const auto& item : lane.getParametersMap()) {
586 keys.insert(item.first);
588 for (
const auto con : e->getConnectionsFromLane(i)) {
589 for (
const auto& item : con.getParametersMap()) {
590 keys.insert(item.first);
597 return std::vector<std::string>(keys.begin(), keys.end());
619 glMatrixMode(GL_MODELVIEW);
621 glDisable(GL_TEXTURE_2D);
622 glDisable(GL_ALPHA_TEST);
624 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
625 glEnable(GL_DEPTH_TEST);
685 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
686 const float minB[2] = { (float)bound.
xmin(), (float)bound.
ymin() };
687 const float maxB[2] = { (float)bound.
xmax(), (float)bound.
ymax() };
689 glEnable(GL_POLYGON_OFFSET_FILL);
690 glEnable(GL_POLYGON_OFFSET_LINE);
848 if (clearSelection) {
880 if (clearSelection) {
1118 edge = (((
GNELane*)pointed)->getParentEdge());
1167 return dynamic_cast<GNEPoly*
>(pointed);
1181 return dynamic_cast<GNEPOI*
>(pointed);
1190 switch (FXSELID(sel)) {
1207 switch (FXSELID(sel)) {
1249 switch (FXSELID(sel)) {
1294 if (edge !=
nullptr) {
1304 if (edge !=
nullptr) {
1308 if (reverseEdge !=
nullptr) {
1319 if (edge !=
nullptr) {
1323 for (
auto it : edges) {
1340 if (edge !=
nullptr) {
1344 for (
auto it : edges) {
1361 if (edge !=
nullptr) {
1372 if (edge !=
nullptr) {
1382 if (edge !=
nullptr) {
1386 for (
auto it : edges) {
1404 if (edge !=
nullptr) {
1408 for (
auto it : edges) {
1425 if (edge !=
nullptr) {
1429 for (
auto it : edges) {
1446 if (edge !=
nullptr) {
1450 for (
auto it : edges) {
1467 if (edge !=
nullptr) {
1471 for (
auto it : edges) {
1490 if (polygonUnderMouse) {
1505 if (polygonUnderMouse) {
1520 if (polygonUnderMouse) {
1535 if (polygonUnderMouse) {
1550 if (polygonUnderMouse) {
1567 std::vector<GNELane*> lanes;
1568 for (
auto i : GLIDs) {
1571 lanes.push_back(lane);
1574 if (lanes.empty()) {
1578 GNELane* nearestLane = lanes.front();
1581 for (
auto i : lanes) {
1582 double posOverLane = i->getLaneShape().nearest_offset_to_point2D(
POI->getPositionInView());
1583 double lateralOffset = i->getLaneShape().positionAtOffset(posOverLane).distanceTo(
POI->getPositionInView());
1584 if (lateralOffset < minorLateralOffset) {
1585 minorPosOverLane = posOverLane;
1586 minorLateralOffset = lateralOffset;
1591 std::string
id =
POI->getID();
1592 std::string type =
POI->getShapeType();
1595 double layer =
POI->getShapeLayer();
1596 double angle =
POI->getShapeNaviDegree();
1597 std::string imgFile =
POI->getShapeImgFile();
1598 bool relativePath =
POI->getShapeRelativePath();
1599 double POIWidth =
POI->getWidth();
1600 double POIHeight =
POI->getHeight();
1605 myNet->
addPOI(
id, type, color, pos,
false, nearestLane->
getID(), minorPosOverLane, 0, layer, angle, imgFile, relativePath, POIWidth, POIHeight);
1610 std::string
id =
POI->getID();
1611 std::string type =
POI->getShapeType();
1614 double layer =
POI->getShapeLayer();
1615 double angle =
POI->getShapeNaviDegree();
1616 std::string imgFile =
POI->getShapeImgFile();
1617 bool relativePath =
POI->getShapeRelativePath();
1618 double POIWidth =
POI->getWidth();
1619 double POIWeight =
POI->getHeight();
1624 myNet->
addPOI(
id, type, color, pos,
false,
"", 0, 0, layer, angle, imgFile, relativePath, POIWidth, POIWeight);
1637 if (lane !=
nullptr) {
1643 for (
auto it : lanes) {
1660 if (lane !=
nullptr) {
1666 for (
auto it : lanes) {
1683 switch (FXSELID(sel)) {
1730 if (lane !=
nullptr) {
1734 std::map<GNEEdge*, GNELane*> mapOfEdgesAndLanes;
1736 for (
auto i : lanes) {
1740 if (mapOfEdgesAndLanes.size() != lanes.size()) {
1741 FXMessageBox::information(getApp(), MBOX_OK,
1742 "Multiple lane in the same edge selected",
"%s",
1743 (
"There are selected lanes that belong to the same edge.\n Only one lane per edge will be restricted for " +
toString(vclass) +
".").c_str());
1746 if (mapOfEdgesAndLanes.size() > 0) {
1750 for (
auto i : mapOfEdgesAndLanes) {
1751 if (i.first->hasRestrictedLane(vclass)) {
1756 if (counter == (
int)mapOfEdgesAndLanes.size()) {
1757 FXMessageBox::information(getApp(), MBOX_OK,
1758 (
"Set vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1759 (
"All lanes own already another lane in the same edge with a restriction for " +
toString(vclass)).c_str());
1762 WRITE_DEBUG(
"Opening FXMessageBox 'restrict lanes'");
1764 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1765 (
"Set vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1766 (
toString(mapOfEdgesAndLanes.size() - counter) +
" lanes will be restricted for " +
toString(vclass) +
". continue?").c_str());
1770 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'No'");
1771 }
else if (answer == 4) {
1772 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
1777 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
1783 for (std::map<GNEEdge*, GNELane*>::iterator i = mapOfEdgesAndLanes.begin(); i != mapOfEdgesAndLanes.end(); i++) {
1805 if (lane !=
nullptr) {
1811 std::set<GNEEdge*> setOfEdges;
1813 for (
auto i : edges) {
1814 setOfEdges.insert(i);
1817 for (
auto it : lanes) {
1822 if (setOfEdges.size() > 0) {
1826 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1828 if ((*it)->hasRestrictedLane(vclass)) {
1833 if (counter == (
int)setOfEdges.size()) {
1834 FXMessageBox::information(getApp(), MBOX_OK,
1835 (
"Add vclass for" +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1836 (
"All lanes own already another lane in the same edge with a restriction for " +
toString(vclass)).c_str());
1839 WRITE_DEBUG(
"Opening FXMessageBox 'restrict lanes'");
1841 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1842 (
"Add vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1843 (
toString(setOfEdges.size() - counter) +
" restrictions for " +
toString(vclass) +
" will be added. continue?").c_str());
1847 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'No'");
1848 }
else if (answer == 4) {
1849 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
1854 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
1860 for (
const auto& edge : setOfEdges) {
1890 if (lane !=
nullptr) {
1896 std::set<GNEEdge*> setOfEdges;
1898 for (
auto i : edges) {
1899 setOfEdges.insert(i);
1902 for (
auto it : lanes) {
1907 if (setOfEdges.size() > 0) {
1911 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1913 if ((*it)->hasRestrictedLane(vclass)) {
1919 FXMessageBox::information(getApp(), MBOX_OK,
1920 (
"Remove vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1921 (
"Selected lanes and edges haven't a restriction for " +
toString(vclass)).c_str());
1924 WRITE_DEBUG(
"Opening FXMessageBox 'restrict lanes'");
1926 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1927 (
"Remove vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1928 (
toString(counter) +
" restrictions for " +
toString(vclass) +
" will be removed. continue?").c_str());
1932 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'No'");
1933 }
else if (answer == 4) {
1934 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
1939 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
1945 for (
const auto& edge : setOfEdges) {
1966 FXEvent* evt = (FXEvent*)eventData;
1973 if (evt->click_count == 2) {
1974 handle(
this, FXSEL(SEL_DOUBLECLICKED, 0), eventData);
1982 bool cursorMove =
false;
2042 for (
auto it : junctions) {
2062 if (junction !=
nullptr) {
2076 if (junction !=
nullptr) {
2090 if (junction !=
nullptr) {
2104 if (junction !=
nullptr) {
2109 for (
auto i : selectedJunction) {
2128 if (junction !=
nullptr) {
2133 for (
auto i : selectedJunction) {
2377 if (personOrPersonPlan) {
2796 if (junctions.size() > 0) {
2797 std::string plural = junctions.size() == 1 ? (
"") : (
"s");
2799 for (
auto i : junctions) {
2810 if (lanes.size() > 0) {
2811 std::string plural = lanes.size() == 1 ? (
"") : (
"s");
2813 for (
auto i : lanes) {
2825 if (edges.size() > 0) {
2826 std::string plural = edges.size() == 1 ? (
"") : (
"s");
2828 for (
auto i : edges) {
2840 if (additionals.size() > 0) {
2841 std::string plural = additionals.size() == 1 ? (
"") : (
"s");
2843 for (
auto i : additionals) {
2857 if (demandElements.size() > 0) {
2858 std::string plural = demandElements.size() == 1 ? (
"") : (
"s");
2860 for (
auto i : demandElements) {
2875 std::vector<GNECrossing*> crossings;
2876 for (
auto i : junctions) {
2877 for (
auto j : i->getGNECrossings()) {
2878 if (j->isAttributeCarrierSelected()) {
2879 crossings.push_back(j);
2884 if (crossings.size() > 0) {
2885 std::string plural = crossings.size() == 1 ? (
"") : (
"s");
2887 for (
auto i : crossings) {
2901 std::vector<GNEConnection*> connections;
2902 for (
auto i : edges) {
2903 for (
auto j : i->getGNEConnections()) {
2904 if (j->isAttributeCarrierSelected()) {
2905 connections.push_back(j);
2910 if (connections.size() > 0) {
2911 std::string plural = connections.size() == 1 ? (
"") : (
"s");
2913 for (
auto i : connections) {
2926 if (selectedShapes.size() > 0) {
2927 std::string plural = selectedShapes.size() == 1 ? (
"") : (
"s");
2929 for (
auto i : selectedShapes) {
2944 selection.
add(newPos);
2945 selection.
grow(0.1);
2948 for (
auto it_ids : ids) {
2965 WRITE_DEBUG(
"Opening FXMessageBox 'merge junctions'");
2967 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
2968 "Confirm Junction Merger",
"%s",
2969 (
"Do you wish to merge junctions '" + moved->
getMicrosimID() +
2972 "' will be eliminated and its roads added to '" +
2977 WRITE_DEBUG(
"Closed FXMessageBox 'merge junctions' with 'No'");
2978 }
else if (answer == 4) {
2979 WRITE_DEBUG(
"Closed FXMessageBox 'merge junctions' with 'ESC'");
2984 WRITE_DEBUG(
"Closed FXMessageBox 'merge junctions' with 'Yes'");
3028 glTranslated(firstLanePoint.
x(), firstLanePoint.
y(),
GLO_JUNCTION + 0.3);
3043 std::vector<double> shapeRotations, shapeLengths;
3056 int segments = (int) shape.size() - 1;
3057 if (segments >= 0) {
3058 shapeRotations.reserve(segments);
3059 shapeLengths.reserve(segments);
3060 for (
int j = 0; j < segments; j++) {
3076 glTranslated(lastLanePoint.
x(), lastLanePoint.
y(),
GLO_JUNCTION + 0.3);
3092 bool deleteLastCreatedPoint =
false;
3102 if (temporalShape.size() > 0) {
3115 if (deleteLastCreatedPoint) {
GNEVehicleTypeFrame * getVehicleTypeFrame() const
get frame for GNE_DMODE_VEHICLETYPE
void buildEditModeControls()
create edit mode buttons and elements
void drawTemporalRoute() const
draw temporal route
GNEStopFrame * getStopFrame() const
get frame for GNE_DMODE_STOP
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Position getSplitPos(const Position &clickPos)
@ MID_LOCATEPOI
Locate poi - button.
@ MID_GNE_LANE_DUPLICATE
duplicate a lane
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
bool isPerson() const
return true if tag correspond to a person element
@ MID_GNE_EDGE_EDIT_ENDPOINT
change default geometry endpoints
bool isMovingSelection() const
check if currently there is element being moved
@ MID_GNE_LANE_RESET_CUSTOMSHAPE
remove greenVerge
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
GNECrossing * getCrossingAtPopupPosition()
try to retrieve a crossing at popup position
@ MID_LOCATETLS
Locate TLS - button.
#define UNUSED_PARAMETER(x)
std::string name
The name of this setting.
@ MID_GNE_EDGE_RESET_ENDPOINT
reset default geometry endpoints
@ GLO_CONNECTION
a connection
FXbool makeCurrent()
A reimplementation due to some internal reasons.
ConnectionModifications * getConnectionModifications() const
get pointer to ConnectionModifications modul
@ MID_HOTKEY_F4_SUPERMODE_DEMAND
hot key <F4> set demand mode in NETEDIT
@ MID_GNE_LANE_REMOVE_GREENVERGE
remove greenVerge
const std::vector< std::pair< GNELane *, double > > & getSelectedLanes() const
get current selected lanes
static double calculateLength(const Position &first, const Position &second)
return length between two points (used in geometric calculations)
bool drawForPositionSelection
whether drawing is performed for the purpose of selecting objects with a single click
@ SVC_PEDESTRIAN
pedestrian
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
GNEViewNetHelper::SelectingArea mySelectingArea
variable used to save variables related with selecting areas
@ MID_LOCATEROUTE
Locate route - button.
GNEPoly * getPolyFront() const
get front Poly (or a pointer to nullptr if there isn't)
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
void handleProhibitionClick(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
handle prohibitions and set the relative colouring
FXMenuCheck * menuCheckShowGrid
menu check to show grid button
GNEViewNetHelper::TestingMode myTestingMode
variable used to save variables related with testing mode
long onCmdResetLaneCustomShape(FXObject *, FXSelector, void *)
reset custom shapes of selected lanes
void smoothElevation(GNEUndoList *undoList)
smooth elevation with regard to adjoining edges
An Element which don't belongs to GNENet but has influency in the simulation.
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
long onCmdToogleShowAllPersonPlans(FXObject *, FXSelector, void *)
toogle show all person plans in super mode demand
TAZCurrent * getTAZCurrentModul() const
get Current TAZ modul
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
@ GNE_DMODE_VEHICLETYPES
Mode for editing vehicle types.
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
long onCmdClearConnections(FXObject *, FXSelector, void *)
clear junction connections
An Element which don't belongs to GNENet but has influency in the simulation.
const RGBColor & getSelectedLaneColor() const
get selected lane color
void finishEdgePathCreation()
finish edge path creation
long onCmdToogleMoveElevation(FXObject *, FXSelector, void *)
toogle move elevation
PersonPlanCreator * getPersonPlanCreator() const
get PersonPlanCreator modul
long onCmdSaveModifications(FXObject *, FXSelector, void *)
Called when the user presses the OK-Button saves any connection modifications.
GNEFrame * myCurrentFrame
the current frame
struct with the attribute Properties
void hotkeyFocusFrame()
handle focus frame keypress
bool shiftKeyPressed() const
check if SHIFT key was pressed during click
void hotkeyEnter()
function called when user press ENTER key
virtual long onRightBtnPress(FXObject *, FXSelector, void *)
const std::string getID() const
function to support debugging
@ MID_LOCATEEDGE
Locate edge - button.
#define WRITE_WARNING(msg)
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKPERSON
lock person
void moveSelection()
move selection
long onCmdToogleShowConnections(FXObject *, FXSelector, void *)
toogle show connections
void hotkeyBackSpace()
handle backspace keypress
@ GNE_DMODE_PERSONPLAN
Mode for editing person plan.
@ MID_GNE_POLYGON_OPEN
open closed polygon
void hotkeyEsc()
function called when user press ESC key
void straightenElevation(GNEUndoList *undoList)
interpolate z values linear between junctions
void openPolygon(bool allowUndo=true)
open polygon
void processClick(void *eventData)
Auxiliar function used by onLeftBtnPress(...)
void buildColorRainbow(const GUIVisualizationSettings &s, GUIColorScheme &scheme, int active, GUIGlObjectType objectType, bool hide=false, double hideThreshold=0.)
recalibrate color scheme according to the current value range
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for GNE_NMODE_CREATEEDGE
GNEEdge * getEdgeAtPopupPosition()
try to retrieve an edge at popup position
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
@ MID_GNE_LANE_TRANSFORM_BIKE
transform lane to bikelane
@ MID_GNE_EDGE_REVERSE
reverse an edge
GNEViewNetHelper::DemandCheckableButtons myDemandCheckableButtons
variable used to save checkable buttons for Supermode Demand
@ MID_GNE_LANE_TRANSFORM_BUS
transform lane to busLane
FXMenuCheck * menuCheckShowAllPersonPlans
show all person plans
const std::vector< GNEAttributeCarrier * > & getEditedACs() const
get current edited ACs
GNEPOI * getPOIFront() const
get front POI (or a pointer to nullptr if there isn't)
double ymin() const
Returns minimum y-coordinate.
long onCmdToogleWarnAboutMerge(FXObject *, FXSelector, void *)
toogle warn for merge
Static storage of an output device and its base (abstract) implementation.
GNELane * getLaneAtPopupPosition()
try to retrieve a lane at popup position
long onCmdSmoothEdges(FXObject *, FXSelector, void *)
smooth geometry
void lockPerson(const GNEDemandElement *person)
lock person
void abortPersonPlanCreation()
abort person plan creation
const GNEDemandElement * getLockedPerson() const
get locked person
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_NMODE_POLYGON
void stopDrawing()
stop drawing and check if shape can be created
FXMenuCheck * menuCheckShowDemandElements
menu check to show Demand Elements
void resetJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
reset junction's connections
Connection getConnection(int fromLane, const NBEdge *to, int toLane) const
Returns the specified connection This method goes through "myConnections" and returns the specified o...
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_NMODE_PROHIBITION
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
GNEPOI * getPOIAtPopupPosition()
try to retrieve a POILane at popup position
bool drawForRectangleSelection
whether drawing is performed for the purpose of selecting objects using a rectangle
GNEEdge * getParentEdge() const
Returns underlying parent edge.
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
@ MID_GNE_POLYGON_SET_FIRST_POINT
Set a vertex of polygon as first verte.
virtual void setStatusBarText(const std::string &)
class used to group all variables related with key pressed after certain events
A NBNetBuilder extended by visualisation and editing capabilities.
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet
long onCmdOK(FXObject *, FXSelector, void *)
void drawTemporalDrawShape() const
draw temporal polygon shape in Polygon Mode
long onCmdToogleSelectEdges(FXObject *, FXSelector, void *)
toogle select edges
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)=0
Returns an own popup-menu.
double m2p(double meter) const
meter-to-pixels conversion method
@ GNE_DMODE_ROUTE
Mode for editing routes.
@ MID_GNE_EDGE_RESET_LENGTH
reset custom lengths
bool controlKeyPressed() const
check if CONTROL key was pressed during click
bool showGrid
Information whether a grid shall be shown.
void hideDemandViewOptionsMenuChecks()
hide all options menu checks
PositionVector shape
The crossing's shape.
bool addAdditional(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add additional element
@ SUMO_ATTR_CUSTOMSHAPE
whether a given shape is user-defined
std::vector< GUIGlObject * > getGUIGlObjectsUnderCursor()
returns the GUIGlObject under the cursor using GL_SELECT (including overlapped objects)
static const RGBColor YELLOW
long onCmdDeleteGeometryPoint(FXObject *, FXSelector, void *)
delete the closes geometry point
bool removeRestrictedLane(SUMOVehicleClass vclass)
remove restricted lane
GUIGlID getObjectUnderCursor()
returns the id of the front object under the cursor using GL_SELECT
GNEViewNetHelper::NetworkViewOptions myNetworkViewOptions
variable used to save variables related with view options in Network Supermode
GNEPoly * editedShapePoly
polygon used for edit shapes
struct used to group all variables related to view options in supermode Demand
long onCmdAddSelected(FXObject *, FXSelector, void *)
select AC under cursor
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
long onCmdSmoothEdgesElevation(FXObject *, FXSelector, void *)
smooth elevation with regard to adjoining edges
void setTAZ(GNETAZ *editedTAZ)
set current TAZ
static const RGBColor CYAN
void updateObjectUnderCursor(const std::vector< GUIGlObject * > &GUIGlObjects, GNEPoly *editedPolyShape)
update objects under cursor (Called only in onLeftBtnPress(...) function)
@ SUMO_TAG_LANE
begin/end of the description of a single lane
void setStatusBarText(const std::string &text)
set staturBar text
void updateCursor()
update cursor after every click/key press/release
@ GNE_DMODE_INSPECT
mode for inspecting demand elements
void setNetworkEditMode(NetworkEditMode networkMode, bool force=false)
set Network edit mode
static FXCursor * getCursor(GUICursor which)
returns a cursor previously defined in the enum GUICursor
void splitEdgesBidi(GNEEdge *edge, GNEEdge *oppositeEdge, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
@ MID_GNE_LANE_ADD_BUS
add busLane
double xmax() const
Returns maximum x-coordinate.
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLPERSONPLANS
show all person plans
virtual void selectAttributeCarrier(bool changeFlag=true)=0
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_NMODE_CONNECT
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
@ SVC_BICYCLE
vehicle is a bicycle
static OptionsCont & getOptions()
Retrieves the options.
@ GNE_DMODE_PERSONTYPES
Mode for editing person types.
void hideCommonViewOptionsMenuChecks()
hide all options menu checks
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
virtual double getRotation() const =0
Returns the rotation of the canvas stored in this changer.
long onCmdSplitJunction(FXObject *, FXSelector, void *)
split junction into multiple junctions
const double SUMO_const_laneWidth
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_NMODE_DELETE
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
void abortEdgeCreation()
abort current edge creation
void removeLastAddedElement()
remove last added element
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
@ MID_OPEN_ADDITIONAL_DIALOG
open additional dialog (used in netedit)
long onCmdEditJunctionShape(FXObject *, FXSelector, void *)
edit junction shape
@ MID_GNE_EDGE_SMOOTH
smooth geometry
long onCmdSetFirstGeometryPoint(FXObject *, FXSelector, void *)
set as first geometry point the closes geometry point
@ MID_LOCATEPERSON
Locate person - button.
GNETAZ * getTAZ() const
get current TAZ
@ MID_LOCATESTOP
Locate stop - button.
TAZSaveChanges * getTAZSaveChangesModul() const
get TAZ Save Changes modul
void drawLaneCandidates() const
draw functions
@ GNE_NMODE_CREATE_EDGE
mode for creating new edges
GUIGlID getObjectAtPosition(Position pos)
returns the id of the object at position using GL_SELECT
void drawTestingElements(GUIMainWindow *mainWindow)
draw testing element
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWCONNECTIONS
show connections
DemandEditMode demandEditMode
the current Demand edit mode
@ GNE_NMODE_TLS
mode for editing tls
@ MID_HOTKEY_D_DELETEMODE
hotkey for mode deleting things
void smooth(GNEUndoList *undoList)
make geometry smooth
@ MID_HOTKEY_C_CONNECTMODE_PERSONPLANMODE
hotkey for mode connecting lanes
void editEndpoint(Position pos, GNEUndoList *undoList)
makes pos the new geometry endpoint at the appropriate end, or remove current existent endpoint
@ MID_GNE_POLYGON_DELETE_GEOMETRY_POINT
delete geometry point
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWBUBBLES
show junctions as bubbles
FXMenuCheck * menuCheckShowJunctionBubble
menu check to show connection as buuble in "Move" mode.
void update() const
Mark the entire GNEViewNet to be repainted later.
@ MID_GNE_JUNCTION_SPLIT_RECONNECT
turn junction into multiple junctions and reconnect them heuristically
@ MID_GNE_JUNCTION_EDIT_SHAPE
edit junction shape
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
bool selectingUsingRectangle
whether we have started rectangle-selection
void processLeftButtonReleaseDemand()
process left button release function in Supermode Demand
long onCmdSplitEdgeBidi(FXObject *, FXSelector, void *)
split edge at cursor position
void close()
Closes the device and removes it from the dictionary.
GNEAdditional * getAdditionalAtPopupPosition()
try to retrieve a additional at popup position
bool getDeleteLastCreatedPoint()
get flag delete last created point
@ MID_GNE_JUNCTION_RESET_CONNECTIONS
reset junction's connections
long onCmdEditConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
GNEViewNetHelper::CommonViewOptions myCommonViewOptions
variable used to save variables related with common view options
@ MID_HOTKEY_Z_TAZMODE
hotkey for mode editing TAZ
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
bool changeAllPhases() const
change all phases
@ GNE_NMODE_POLYGON
Mode for editing Polygons.
long onRightBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's right button
bool isShown() const
return true if modul is shown
bool stopConsecutiveLaneSelector()
stop selection of consecutive lanes
bool addVehicle(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
long onCmdToogleExtendSelection(FXObject *, FXSelector, void *)
toogle extend selection
@ MID_GNE_JUNCTION_REPLACE
turn junction into geometry node
@ MID_GNE_JUNCTION_RESET_SHAPE
reset junction shape
A single child window which contains a view of the simulation area.
long onCmdLaneOperation(FXObject *, FXSelector sel, void *)
add/remove/restrict lane
@ MID_GNE_POLYGON_CLOSE
close opened polygon
@ MID_ADDSELECT
Add to selected items - menu entry.
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void hotkeyEnter()
handle enter keypress
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
@ MID_GNE_JUNCTION_CLEAR_CONNECTIONS
clear junction's connections
void moveRectangleSelection()
move rectangle selection
long onMouseMove(FXObject *, FXSelector, void *)
called when user moves mouse
bool setColorScheme(const std::string &name)
set color scheme
The representation of a single edge during network building.
@ MID_HOTKEY_S_SELECTMODE
hotkey for mode selecting objects
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
FXMenuCheck * menuCheckExtendSelection
menu check to extend to edge nodes
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
GNEViewNetHelper::KeyPressed myKeyPressed
variable used to save key status after certain events
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
@ MID_GNE_EDGE_SPLIT_BIDI
split an edge
void processClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderGrippedCursor, const bool oppositeEdge, const bool chainEdge)
handle processClick and set the relative colouring
@ MID_GNE_LANE_REMOVE_SIDEWALK
remove sidewalk
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when user press a key
void finishPersonPlanCreation()
finish person plan creation
@ MID_GNE_NETWORKVIEWOPTIONS_EXTENDSELECTION
extend selection
@ GNE_NMODE_DELETE
mode for deleting network elements
virtual long onRightBtnRelease(FXObject *, FXSelector, void *)
bool lefthand
whether drawing is performed in left-hand networks
int getIndex() const
returns the index of the lane
struct used to group all variables related with testing
A road/street connecting two junctions (netedit-version)
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
NBNode::Crossing * getNBCrossing() const
get referente to NBode::Crossing
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
@ MID_GNE_EDGE_STRAIGHTEN
remove inner geometry
void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
long onRightBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's right button
GNENet * getNet() const
get the net object
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
const Position & getPosition() const
@ MID_GNE_CROSSING_EDIT_SHAPE
edit junction shape
bool myAmInitialised
Internal information whether doInit() was called.
void show()
show delete frame
NBNode * getNBNode() const
Return net build node.
@ MID_GNE_DEMANDVIEWOPTIONS_HIDESHAPES
hide shapes
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
void unlockPerson()
unlock person
long onCmdToogleShowDemandElements(FXObject *, FXSelector, void *)
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
virtual bool onRightBtnRelease(void *data)
called when user releases right button
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
void closePolygon(bool allowUndo=true)
close polygon
void editTLS(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
edits the traffic light for the given clicked junction
@ GNE_NMODE_ADDITIONAL
Mode for editing additionals.
void buildDemandViewOptionsMenuChecks()
build menu checks
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
void save(OutputDevice &dev) const
Writes the settings into an output device.
void focusUpperElement()
focus upper element of frame
static const RGBColor MAGENTA
const GNEViewNetHelper::EditShapes & getEditShapes() const
get Edit Shape modul
FXMenuCheck * menuCheckShowConnections
menu check to show connections
long onCmdSetMode(FXObject *, FXSelector sel, void *)
called when user press a mode button (Network or demand)
DeleteOptions * getDeleteOptions() const
get delete options
@ GNE_DMODE_SELECT
mode for selecting demand elements
virtual long onLeftBtnRelease(FXObject *, FXSelector, void *)
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any prohibition modifications.
GNEViewNetHelper::ObjectsUnderCursor myObjectsUnderCursor
variable use to save all pointers to objects under cursor after a click
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
@ GNE_NMODE_TAZ
Mode for editing TAZ.
void processMoveMouseDemand()
process move mouse function in Supermode Demand
long onCmdSplitJunctionReconnect(FXObject *, FXSelector, void *)
split junction into multiple junctions and reconnect them
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
void setSupermode(Supermode supermode)
set Network edit mode
void finishMoveSingleElement()
finish moving single elements in Network AND Demand mode
void drawRectangleSelection(const RGBColor &color) const
draw rectangle selection
double xmin() const
Returns minimum x-coordinate.
void beginRectangleSelection()
begin rectangle selection
void abortConsecutiveLaneSelector()
abort selection of consecutive lanes
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for GNE_DMODE_PERSONFRAME
FXMenuCheck * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
void createCrossingHotkey()
create crossing (used when user press ENTER key in Crossing mode)
long onCmdResetConnections(FXObject *, FXSelector, void *)
reset junction connections
void computeAndUpdate(OptionsCont &oc, bool volatileOptions)
recompute the network and update lane geometries
NBEdgeCont & getEdgeCont()
returns the NBEdgeCont of the underlying netbuilder
@ GNE_DMODE_PERSON
Mode for editing person.
const PositionVector & getLaneShape() const
void buildSuperModeButtons()
build checkable buttons
static const RGBColor ORANGE
void setSelectionScaling(double selectionScale)
set selection scaling
struct used to group all variables related with Supermodes
NBEdge * getNBEdge() const
returns the internal NBEdge
const PositionVector & getConnectionShape() const
int doPaintGL(int mode, const Boundary &bound)
do paintGL
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
GUIGlObject * getNetObject() const
Returns the network object.
void openObjectDialog()
open object dialog
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
void abortOperation(bool clearSelection=true)
abort current edition operation
void handleLaneClick(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
either sets the current lane or toggles the connection of the
bool isDemandElement() const
return true if tag correspond to a demand element
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
@ MID_GNE_NETWORKVIEWOPTIONS_HIDECONNECTIONS
hide connections
struct used to group all variables related to view options in all supermodes
void splitJunction(GNEJunction *junction, bool reconnect, GNEUndoList *undoList)
replace the selected junction by a list of junctions for each unique edge endpoint
AddShapeResult
enum with all possible values after try to create an shape using frame
void closePolygon()
ensures that the last position equals the first
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
void beginMoveSelection(GNEAttributeCarrier *originAC)
begin move selection
void processRectangleSelection()
process rectangle Selection
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
GNEJunction * getJunctionAtPopupPosition()
try to retrieve a junction at popup position
std::vector< GNEDemandElement * > retrieveDemandElements(bool onlySelected=false) const
return all demand elements
PositionVector shape
shape of Connection
bool autoSelectNodes()
whether to autoselect nodes or to lanes
long onCmdSaveChanges(FXObject *, FXSelector, void *)
GUIGlID getGlID() const
Returns the numerical id of the object.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag, bool onlySelected=false)
return shape by type shapes
A class that stores a 2D geometrical boundary.
@ MID_GNE_LANE_REMOVE_BIKE
remove bikelane
bool isChangesPending() const
return true if there is changes to save
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
bool beginMoveSingleElementNetworkMode()
begin move single element in Network mode
void deleteSelectedShapes()
delete all currently selected shapes
void hotkeyBackSpace()
function called when user press BACKSPACE key
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ MID_GNE_NETWORKVIEWOPTIONS_ASKFORMERGE
ask before merging junctions
static const RGBColor BLUE
double scale
information about a lane's width (temporary, used for a single view)
void deleteSelectedConnections()
delete all currently selected connections
@ GNE_NMODE_SELECT
mode for selecting network elements
@ GNE_SUPERMODE_NETWORK
Network mode (Edges, junctions, etc..)
Supermode currentSupermode
the current supermode
void startDrawing()
start drawing
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool ignoreOptions=false)
remove attribute carrier (element)
bool addRestrictedLane(SUMOVehicleClass vclass, GNEEdge *edge, int index, GNEUndoList *undoList)
add restricted lane to edge
@ MID_HOTKEY_W_PROHIBITIONMODE_PERSONTYPEMODE
hotkey for mode editing connection prohibitions AND person types
const GNEViewNetHelper::KeyPressed & getKeyPressed() const
get Key Pressed modul
long onCmdTransformPOI(FXObject *, FXSelector, void *)
Transform POI to POILane, and viceversa.
void deleteSelectedCrossings()
delete all currently selected crossings
bool startDrawing
whether we have started rectangle-selection
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_NMODE_INSPECT
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true)
get a single attribute carrier based on a GLID
A point in 2D or 3D with translation and scaling methods.
GUICompleteSchemeStorage gSchemeStorage
@ GNE_NMODE_CONNECT
mode for connecting lanes
double x() const
Returns the x-position.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
virtual double getZoom() const =0
Returns the zoom factor computed stored in this changer.
FXDEFMAP(GNEViewNet) GNEViewNetMap[]
void endGeometryMoving(bool extendToNeighbors=true)
begin movement (used when user click over edge to start a movement, to avoid problems with problems w...
GNEUndoList * getUndoList() const
get the undoList object
void initGNEConnections()
initialize GNEConnections
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_NMODE_ADDITIONAL
double selectionScale
the current selection scaling in NETEDIT (temporary)
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
void duplicateLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
duplicates lane
void drawTemporalRoute() const
draw temporal route
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
void finishMoveSelection()
finish moving selection
GNEFrameModuls::OverlappedInspection * getOverlappedInspection() const
get OverlappedInspection modul
static const RGBColor RED
named colors
void show()
show inspector frame
GNEViewNetHelper::ObjectsUnderCursor myObjectsUnderGrippedCursor
variable use to save all pointers to objects under cursor after a click with grid enabled
A storage for options typed value containers)
void show()
show prohibition frame
@ MID_GNE_LANE_TRANSFORM_SIDEWALK
transform lane to sidewalk
GNEViewNet()
FOX needs this.
GNEEdge * getOppositeEdge() const
get opposite edge
GUIVisualizationSettings * myVisualizationSettings
visualization settings
void drawDecals()
Draws the stored decals.
GNEConnection * getConnectionFront() const
get front connection (or a pointer to nullptr if there isn't)
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
void show()
show delete frame
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
open additional dialog
long onCmdToogleLockPerson(FXObject *, FXSelector, void *)
toogle lock person in super mode demand
@ SUMOCURSOR_DEFAULT
default cursor
void drawTemporalRoute() const
draw temporal route
FXMenuCheck * menuCheckWarnAboutMerge
menu check to we should warn about merging junctions
bool restrictLane(SUMOVehicleClass vclass)
restrict lane
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
@ MID_GNE_CONNECTION_EDIT_SHAPE
edit junction shape
long onCmdToogleHideConnections(FXObject *, FXSelector, void *)
toogle hide connections
void deleteSelectedAdditionals()
delete all currently selected additionals
@ MID_HOTKEY_T_TLSMODE_VTYPEMODE
hotkey for mode editing TLS AND Vehicle Types
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
void buildNetworkViewOptionsMenuChecks()
build menu checks
GNEPoly * getPolygonAtPopupPosition()
try to retrieve a polygon at popup position
long onCmdSimplifyShape(FXObject *, FXSelector, void *)
simply shape of current polygon
long onCmdResetLength(FXObject *, FXSelector, void *)
reset custom edge lengths
@ MID_GNE_LANE_ADD_SIDEWALK
add sidewalk
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
@ MID_GNE_NETWORKVIEWOPTIONS_MOVEELEVATION
move elevation instead of x,y
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
void updateDemandModeSpecificControls()
updates Demand mode specific controls
const Position & getPopupPosition() const
get position of current popup
void startEditCustomShape(GNENetElement *element, const PositionVector &shape, bool fill)
start edit custom shape
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
@ SUMOCURSOR_MOVE
move cursor
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
void hideNetworkViewOptionsMenuChecks()
hide all options menu checks
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
EdgeVector getAllEdges() const
return all edges
void doInit()
called after some features are already initialized
GNEFrameAttributesModuls::AttributesEditor * getAttributesEditor() const
get AttributesEditor
struct used to group all variables related with edit shapes of NetElements
void update(void *eventData)
update status of KeyPressed
void p_abort()
reverts and discards ALL active command groups
GUIVisualizationColorSettings colorSettings
color settings
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
RGBColor selectionColor
basic selection color
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
virtual bool isAttributeCarrierSelected() const =0
check if attribute carrier is selected
int getCircleResolution() const
function to calculate circle resolution for all circles drawn in drawGL(...) functions
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type (or a pointer to nullptr if there isn't)
@ MID_GNE_LANE_TRANSFORM_GREENVERGE
transform lane to greenVerge
@ GNE_DMODE_VEHICLE
Mode for editing vehicles.
bool showLockIcon() const
check if lock icon should be visible
void saveEditedShape()
save edited shape
long onCmdCancelModifications(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any connection modifications.
@ MID_GNE_NETWORKVIEWOPTIONS_SELECTEDGES
select edges
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
GNEViewNetHelper::NetworkCheckableButtons myNetworkCheckableButtons
variable used to save checkable buttons for Supermode Network
long onCmdSetSupermode(FXObject *, FXSelector sel, void *)
@ GNE_NMODE_CROSSING
Mode for editing crossing.
struct used to group all variables related to view options in supermode Network
long onCmdToogleHideNonInspecteDemandElements(FXObject *, FXSelector, void *)
toogle hide non inspected demand elements
void unblockObject(GUIGlID id)
Marks an object as unblocked.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
bool isPersonPlan() const
return true if tag correspond to a person plan
void updateControls()
update control contents after undo/redo or recompute
const GNEViewNetHelper::TestingMode & getTestingMode() const
get testing mode
@ GNE_NMODE_PROHIBITION
Mode for editing connection prohibitions.
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
const PositionVector & getShape() const
retrieve the junction shape
long onCmdStraightenEdges(FXObject *, FXSelector, void *)
makes selected edges straight
@ MID_GNE_POI_TRANSFORM
Transform POI to POILane, and viceversa.
std::vector< GNEEdge * > processEdgeRectangleSelection()
process rectangle Selection (only limited to Edges)
std::set< std::pair< std::string, GNEAttributeCarrier * > > getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges=false)
get AttributeCarriers in Boundary
long onLeftBtnPress(FXObject *, FXSelector, void *)
@ MID_GNE_DEMANDVIEWOPTIONS_HIDENONINSPECTED
hide non-inspected demand element
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
virtual void onLeftBtnPress(void *data)
mouse functions
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
@ MID_HOTKEY_V_VEHICLEMODE
hotkey for mode create vehicles
void hideAllFrames()
hide all frames
double y() const
Returns the y-position.
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
@ MID_GNE_EDGE_SPLIT
split an edge
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
@ MID_LOCATEJUNCTION
Locate junction - button.
void requireRecompute()
inform the net about the need for recomputation
void deleteSelectedJunctions()
delete all currently selected junctions
void moveSingleElement()
move single element in Network AND Demand mode
AddShapeResult processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet
bool isPersonStop() const
return true if tag correspond to a person stop element
PositionVector customShape
optional customShape for this crossing
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
void abortDrawing()
abort drawing
void processLeftButtonPressDemand(void *eventData)
process left button press function in Supermode Demand
@ GNE_SUPERMODE_DEMAND
Demanding mode (Routes, Vehicles etc..)
GNERouteFrame * getRouteFrame() const
get frame for GNE_DMODE_ROUTE
@ MID_GNE_EDGE_STRAIGHTEN_ELEVATION
interpolate z values linear between junctions
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge *edge, GNEUndoList *undoList)
remove restricted lane
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
GUIMainWindow * myApp
The application.
long onCmdToogleChangeAllPhases(FXObject *, FXSelector, void *)
toogle change all phases
GNEViewNetHelper::MoveMultipleElementValues myMoveMultipleElementValues
variable used to save variables related with movement of multiple elements
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when user release a key
std::vector< std::string > getEdgeLaneParamKeys(bool edgeKeys) const
return list of available edge parameters
GNEFrameModuls::DrawingShape * getDrawingShapeModul() const
get drawing mode modul
bool addStop(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool shiftPressed)
add Stop element
GNEPersonFrame * getPersonFrame() const
get frame for GNE_DMODE_PERSON
@ MID_GNE_EDGE_ADD_REVERSE
add reverse edge
GNEFrameModuls::DrawingShape * getDrawingShapeModul() const
get drawing mode editor
long onCmdStraightenEdgesElevation(FXObject *, FXSelector, void *)
interpolate z values linear between junctions
SUMORTree * myGrid
The visualization speed-up.
void clearJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
clear junction's connections
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
void deleteSelectedEdges()
delete all currently selected edges
bool selectEdges() const
check if select edges checkbox is enabled
void paintGLGrid()
paints a grid
GNEAdditionalFrame::SelectorParentLanes * getConsecutiveLaneSelector() const
getConsecutive Lane Selector
@ SUMO_TAG_CONNECTION
connectio between two lanes
FXMenuCheck * menuCheckAutoOppositeEdge
menu check to create auto create opposite edge
void processEdgeSelection(const std::vector< GNEEdge * > &edges)
process selection of edges in view net
void simplifyShape(bool allowUndo=true)
replace the current shape with a rectangle
bool checkSavedPosition(const Position &clickedPosition) const
check if given position is near to saved position
@ MID_HOTKEY_F3_SUPERMODE_NETWORK
hot key <F3> set network mode in NETEDIT
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
FXComboBox * getColoringSchemesCombo()
return combobox with the current coloring schemes (standard, fastest standard, real world....
void clearCurrentSelection() const
clear current selection with possibility of undo/redo
long onCmdToogleHideShapes(FXObject *, FXSelector, void *)
toogle hide shapes in super mode demand
void processLeftButtonReleaseNetwork()
process left button release function in Supermode Network
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
@ MID_LOCATEVEHICLE
Locate vehicle - button.
GNEViewNetHelper::CommonCheckableButtons myCommonCheckableButtons
variable used to save checkable buttons for common supermodes
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, bool relativePath, double width, double height, bool ignorePruning=false)
Builds a POI using the given values and adds it to the container.
bool addPerson(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
bool myUseToolTips
use tool tips
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
GNEConnection * getConnectionAtPopupPosition()
try to retrieve a connection at popup position
long onCmdToogleShowGrid(FXObject *, FXSelector, void *)
toogle show grid
void setDottedAC(const GNEAttributeCarrier *AC)
set attributeCarrier under cursor
void handleEdgeClick(GNEEdge *clickedEdge)
handle edge click
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
@ MID_GNE_NETWORKVIEWOPTIONS_AUTOOPPOSITEEDGES
automatically create opposite edge
int addColor(const T &color, const double threshold, const std::string &name="")
std::vector< GUIGlObject * > getGUIGlObjectsUnderGrippedCursor()
returns the GUIGlObject under the gripped cursor using GL_SELECT (including overlapped objects)
long onCmdOpenPolygon(FXObject *, FXSelector, void *)
open closed polygon
GUIGLObjectPopupMenu * myPopup
The current popup-menu.
bool processDemandSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Demand
bool isDrawing() const
return true if currently a shape is drawed
long onCmdResetJunctionShape(FXObject *, FXSelector, void *)
reset junction shape
GNEPersonTypeFrame * getPersonTypeFrame() const
get frame for GNE_DMODE_PERSONTYPE
static void resetTextures()
Reset textures.
GNEViewNetHelper::DemandViewOptions myDemandViewOptions
variable used to save variables related with view options in Demand Supermode
@ MID_HOTKEY_P_POLYGONMODE_PERSONMODE
hotkey for mode creating polygons
@ MID_GNE_LANE_ADD_GREENVERGE
add greenVerge
void addCrossing(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add Crossing element
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
void startConsecutiveLaneSelector(GNELane *lane, const Position &clickedPosition)
start selection of consecutive lanes
@ MID_GNE_EDGE_SMOOTH_ELEVATION
smooth elevation with regard to adjoining edges
FXMenuCheck * menuCheckChainEdges
menu check to the endpoint for a created edge should be set as the new source
virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const
Find all within search rectangle.
long onCmdReverseEdge(FXObject *, FXSelector, void *)
reverse edge
void abortEdgePathCreation()
abort edge path creation
long onCmdEditEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
GUIDialog_ViewSettings * myVisualizationChanger
Visualization changer.
long onCmdResetEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
@ ADDSHAPE_UPDATEDTEMPORALSHAPE
GNEViewNetHelper::MoveSingleElementValues myMoveSingleElementValues
@ SVC_BUS
vehicle is a bus
ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
@ MID_GNE_COMMONVIEWOPTIONS_SHOWGRID
show grid
GNEViewNetHelper::EditShapes myEditShapes
struct for grouping all variables related with edit shapes
@ MID_GNE_LANE_REMOVE_BUS
remove busLane
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
long onCmdAddReversedEdge(FXObject *, FXSelector, void *)
add reversed edge
FXMenuCheck * menuCheckChangeAllPhases
menu check to set change all phases
Boundary & grow(double by)
extends the boundary by the given amount
@ MID_GNE_JUNCTION_SPLIT
turn junction into multiple junctions
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
unselect AC under cursor
bool IsObjectTypeLocked(const GUIGlObjectType type) const
check if an object is locked
@ GNE_DMODE_MOVE
mode for moving demand elements
bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
static const RGBColor GREEN
static double calculateRotation(const Position &first, const Position &second)
return angle between two points (used in geometric calculations)
void selectAttributeCarrier(bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
const GNEViewNetHelper::CommonViewOptions & getCommonViewOptions() const
get Common view options
@ MID_HOTKEY_I_INSPECTMODE
hotkey for mode inspecting object attributes
std::vector< GUIGlID > getObjectsInBoundary(Boundary bound, bool singlePosition)
returns the ids of all objects in the given boundary
@ MID_GNE_POLYGON_SIMPLIFY_SHAPE
simplify polygon geometry
C++ TraCI client API implementation.
void saveVisualizationSettings() const
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
long onCmdToogleShowJunctionBubbles(FXObject *, FXSelector, void *)
toogle show junction bubbles
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void setDemandEditMode(DemandEditMode demandMode, bool force=false)
set Demand edit mode
void updateNetworkModeSpecificControls()
updates Network mode specific controls
Stores the information about how to visualize structures.
void resetEndpoint(const Position &pos, GNEUndoList *undoList)
restores the endpoint to the junction position at the appropriate end
FXMenuCheck * menuCheckHideShapes
Hide shapes (Polygons and POIs)
long onCmdToogleChainEdges(FXObject *, FXSelector, void *)
toogle chain edges
void destroyPopup()
destoys the popup
long onCmdEditCrossingShape(FXObject *, FXSelector, void *)
edit crossing shape
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
void deleteSelectedDemandElements()
delete all currently selected demand elements
void hotkeyDel()
handle del keypress
GUIPerspectiveChanger * myChanger
The perspective changer.
@ MID_LOCATEPOLY
Locate polygons - button.
virtual long onMouseMove(FXObject *, FXSelector, void *)
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...
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
@ SVC_IGNORING
vehicles ignoring classes
GNEViewNetHelper::EditModes myEditModes
variable used to save variables related with edit moves modes
bool addRestrictedLane(SUMOVehicleClass vclass)
add restricted lane
Position myPopupPosition
The current popup-menu position.
@ GNE_NMODE_INSPECT
mode for inspecting network elements
void deleteSelectedLanes()
delete all currently selected lanes
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
void stopEditCustomShape()
edit edit shape
bool forceDrawForPositionSelection
flag to force draw for position selection (see drawForPositionSelection)
virtual void show()
show Frame
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
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
@ MID_LOCATEADD
Locate addtional structure - button.
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void processMoveMouseNetwork()
process move mouse function in Supermode Network
@ MID_HOTKEY_E_EDGEMODE
hotkey for mode adding edges
NetworkEditMode networkEditMode
the current Network edit mode
const GNEAttributeCarrier * myDottedAC
current AttributeCarrier that is drawn using with a dotted contour note: it's constant because is edi...
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
@ MID_HOTKEY_R_CROSSINGMODE_ROUTEMODE
hotkey for mode editing crossing AND routes
long onCmdToogleAutoOppositeEdge(FXObject *, FXSelector, void *)
toogle autoOpposite edge
bool isSelectingLanes() const
return true if modul is selecting lane
FXPopup * getLocatorPopup()
@ brief return a pointer to locator popup
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
@ MID_GNE_NETWORKVIEWOPTIONS_CHANGEALLPHASES
change all phases
@ MID_HOTKEY_M_MOVEMODE
hotkey for mode moving element
@ GNE_DMODE_DELETE
mode for deleting demand elements
@ MID_GNE_LANE_ADD_BIKE
add bikelane
GNEViewParent * myViewParent
view parent
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
@ GNE_NMODE_MOVE
mode for moving network elements
@ GNE_DMODE_STOP
Mode for editing stops.
bool addSelectedLane(GNELane *lane, const Position &clickedPosition)
return true if lane can be selected as consecutive lane
bool disableLaneIcons
whether drawing is performed in left-hand networks
@ MID_GNE_NETWORKVIEWOPTIONS_CHAINEDGES
create edges in chain mode
bool forceDrawForRectangleSelection
flag to force draw for rectangle selection (see drawForRectangleSelection)
virtual void openAdditionalDialog()
open Additional Dialog
void buildCommonViewOptionsMenuChecks()
build menu checks
FXMenuCheck * menuCheckLockPerson
Lock Person.
GNEVehicleFrame * getVehicleFrame() const
get frame for GNE_DMODE_VEHICLE
long onCmdSplitEdge(FXObject *, FXSelector, void *)
split edge at cursor position
GNEViewParent * getViewParent() const
get the net object
long onCmdClosePolygon(FXObject *, FXSelector, void *)
close opened polygon
const PositionVector & getTemporalShape() const
get Temporal shape
virtual long onPaint(FXObject *, FXSelector, void *)
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
@ MID_REMOVESELECT
Remove from selected items - Menu Etry.
FXMenuCheck * menuCheckMoveElevation
menu check to apply movement to elevation
virtual void unselectAttributeCarrier(bool changeFlag=true)=0
unselect attribute carrier using GUIGlobalSelection
bool processNetworkSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Network
void swapLane2Edge()
swap lane to edge
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
void finishRectangleSelection()
finish rectangle selection
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
double ymax() const
Returns maximum y-coordinate.
void computeNodeShape(double mismatchThreshold)
Compute the junction shape for this node.
void removeLastInsertedElement()
remove last added element (either a BusStop or an edge)
void show()
show inspector frame
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
void processLeftButtonPressNetwork(void *eventData)
mouse process functions
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point
GNENet * myNet
Pointer to current net. (We are not responsible for deletion)
FXMenuCheck * menuCheckSelectEdges
menu check to select only edges
long onCmdReplaceJunction(FXObject *, FXSelector, void *)
replace node by geometry
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_NMODE_CROSSING
@ MID_HOTKEY_A_ADDITIONALMODE_STOPMODE
hotkey for mode editing additionals AND stops