 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
172 FXGLVisual* glVis, FXGLCanvas* share) :
173 GUISUMOAbstractView(tmpParent, app, viewParent, net->getVisualisationSpeedUp(), glVis, share),
176 myCommonCheckableButtons(this),
177 myNetworkCheckableButtons(this),
178 myDemandCheckableButtons(this),
179 myCommonViewOptions(this),
180 myNetworkViewOptions(this),
181 myDemandViewOptions(this),
182 myMoveSingleElementValues(this),
183 myMoveMultipleElementValues(this),
184 myVehicleOptions(this),
185 myVehicleTypeOptions(this),
186 mySelectingArea(this),
188 myViewParent(viewParent),
190 myCurrentFrame(
nullptr),
191 myUndoList(undoList) {
193 reparent(actualParent);
195 buildEditModeControls();
199 myNet->setViewNet(
this);
208 myTestingMode.initTestingMode();
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);
244 "\tLocate Vehicle\tLocate a vehicle within the network.",
246 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
250 "\tLocate Route\tLocate a route within the network.",
252 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
256 "\tLocate Stop\tLocate a stop within the network.",
258 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
270 "\tLocate TLS\tLocate a tls within the network.",
272 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
275 "\tLocate Additional\tLocate an additional structure within the network.",
277 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
280 "\tLocate PoI\tLocate a PoI within the network.",
282 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
285 "\tLocate Polygon\tLocate a Polygon within the network.",
287 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
294 GUISUMOAbstractView::update();
298 std::set<std::pair<std::string, GNEAttributeCarrier*> >
302 std::set<std::pair<std::string, GNEAttributeCarrier*> > result;
316 retrievedAC = &dynamic_cast<GNELane*>(retrievedAC)->getParentEdge();
319 GUIGlObject* glObject = dynamic_cast<GUIGlObject*>(retrievedAC);
321 result.insert(std::make_pair(retrievedAC->
getID(), retrievedAC));
337 new FXMenuSeparator(ret);
373 }
else if (
id != 0) {
383 myApp->getCursorPosition(x, y, b);
436 bool hide,
double hideThreshold) {
439 double minValue = std::numeric_limits<double>::infinity();
440 double maxValue = -std::numeric_limits<double>::infinity();
446 }
else if (active == 11) {
450 const double val = lane->getColorValue(s, active);
451 minValue =
MIN2(minValue, val);
452 maxValue =
MAX2(maxValue, val);
457 minValue =
MIN2(minValue, junction->getPositionInView().z());
458 maxValue =
MAX2(maxValue, junction->getPositionInView().z());
462 if (minValue != std::numeric_limits<double>::infinity()) {
466 minValue =
MAX2(hideThreshold + 1, minValue);
469 double range = maxValue - minValue;
514 myCommonCheckableButtons(this),
515 myNetworkCheckableButtons(this),
516 myDemandCheckableButtons(this),
517 myCommonViewOptions(this),
518 myNetworkViewOptions(this),
519 myDemandViewOptions(this),
520 myMoveSingleElementValues(this),
521 myMoveMultipleElementValues(this),
522 myVehicleOptions(this),
523 myVehicleTypeOptions(this),
524 mySelectingArea(this),
536 glMatrixMode(GL_MODELVIEW);
538 glDisable(GL_TEXTURE_2D);
539 glDisable(GL_ALPHA_TEST);
541 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
542 glEnable(GL_DEPTH_TEST);
602 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
603 const float minB[2] = { (float)bound.
xmin(), (float)bound.
ymin() };
604 const float maxB[2] = { (float)bound.
xmax(), (float)bound.
ymax() };
606 glEnable(GL_POLYGON_OFFSET_FILL);
607 glEnable(GL_POLYGON_OFFSET_LINE);
761 if (clearSelection) {
793 if (clearSelection) {
1031 edge = &(((
GNELane*)pointed)->getParentEdge());
1066 return dynamic_cast<GNEAdditional*>(pointed);
1080 return dynamic_cast<GNEPoly*>(pointed);
1094 return dynamic_cast<GNEPOI*>(pointed);
1103 switch (FXSELID(sel)) {
1120 switch (FXSELID(sel)) {
1162 switch (FXSELID(sel)) {
1207 if (edge !=
nullptr) {
1217 if (edge !=
nullptr) {
1221 if (reverseEdge !=
nullptr) {
1232 if (edge !=
nullptr) {
1236 for (
auto it : edges) {
1253 if (edge !=
nullptr) {
1257 for (
auto it : edges) {
1274 if (edge !=
nullptr) {
1285 if (edge !=
nullptr) {
1295 if (edge !=
nullptr) {
1299 for (
auto it : edges) {
1317 if (edge !=
nullptr) {
1321 for (
auto it : edges) {
1338 if (edge !=
nullptr) {
1342 for (
auto it : edges) {
1359 if (edge !=
nullptr) {
1363 for (
auto it : edges) {
1384 if (polygonUnderMouse) {
1399 if (polygonUnderMouse) {
1414 if (polygonUnderMouse) {
1429 if (polygonUnderMouse) {
1444 if (polygonUnderMouse) {
1461 std::vector<GNELane*> lanes;
1462 for (
auto i : GLIDs) {
1465 lanes.push_back(lane);
1468 if (lanes.empty()) {
1472 GNELane* nearestLane = lanes.front();
1475 for (
auto i : lanes) {
1476 double posOverLane = i->getGeometry().shape.nearest_offset_to_point2D(
POI->getPositionInView());
1477 double lateralOffset = i->getGeometry().shape.positionAtOffset(posOverLane).distanceTo(
POI->getPositionInView());
1478 if (lateralOffset < minorLateralOffset) {
1479 minorPosOverLane = posOverLane;
1480 minorLateralOffset = lateralOffset;
1485 std::string
id =
POI->getID();
1486 std::string type =
POI->getShapeType();
1489 double layer =
POI->getShapeLayer();
1490 double angle =
POI->getShapeNaviDegree();
1491 std::string imgFile =
POI->getShapeImgFile();
1492 bool relativePath =
POI->getShapeRelativePath();
1493 double POIWidth =
POI->getWidth();
1494 double POIHeight =
POI->getHeight();
1499 myNet->
addPOI(
id, type, color, pos,
false, nearestLane->
getID(), minorPosOverLane, 0, layer, angle, imgFile, relativePath, POIWidth, POIHeight);
1504 std::string
id =
POI->getID();
1505 std::string type =
POI->getShapeType();
1508 double layer =
POI->getShapeLayer();
1509 double angle =
POI->getShapeNaviDegree();
1510 std::string imgFile =
POI->getShapeImgFile();
1511 bool relativePath =
POI->getShapeRelativePath();
1512 double POIWidth =
POI->getWidth();
1513 double POIWeight =
POI->getHeight();
1518 myNet->
addPOI(
id, type, color, pos,
false,
"", 0, 0, layer, angle, imgFile, relativePath, POIWidth, POIWeight);
1531 if (lane !=
nullptr) {
1537 for (
auto it : lanes) {
1554 if (lane !=
nullptr) {
1560 for (
auto it : lanes) {
1577 switch (FXSELID(sel)) {
1624 if (lane !=
nullptr) {
1628 std::map<GNEEdge*, GNELane*> mapOfEdgesAndLanes;
1630 for (
auto i : lanes) {
1634 if (mapOfEdgesAndLanes.size() != lanes.size()) {
1635 FXMessageBox::information(getApp(), MBOX_OK,
1636 "Multiple lane in the same edge selected",
"%s",
1637 (
"There are selected lanes that belong to the same edge.\n Only one lane per edge will be restricted for " +
toString(vclass) +
".").c_str());
1640 if (mapOfEdgesAndLanes.size() > 0) {
1644 for (
auto i : mapOfEdgesAndLanes) {
1645 if (i.first->hasRestrictedLane(vclass)) {
1650 if (counter == (
int)mapOfEdgesAndLanes.size()) {
1651 FXMessageBox::information(getApp(), MBOX_OK,
1652 (
"Set vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1653 (
"All lanes own already another lane in the same edge with a restriction for " +
toString(vclass)).c_str());
1656 WRITE_DEBUG(
"Opening FXMessageBox 'restrict lanes'");
1658 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1659 (
"Set vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1660 (
toString(mapOfEdgesAndLanes.size() - counter) +
" lanes will be restricted for " +
toString(vclass) +
". continue?").c_str());
1664 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'No'");
1665 }
else if (answer == 4) {
1666 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
1671 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
1677 for (std::map<GNEEdge*, GNELane*>::iterator i = mapOfEdgesAndLanes.begin(); i != mapOfEdgesAndLanes.end(); i++) {
1699 if (lane !=
nullptr) {
1705 std::set<GNEEdge*> setOfEdges;
1707 for (
auto i : edges) {
1708 setOfEdges.insert(i);
1711 for (
auto it : lanes) {
1716 if (setOfEdges.size() > 0) {
1720 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1722 if ((*it)->hasRestrictedLane(vclass)) {
1727 if (counter == (
int)setOfEdges.size()) {
1728 FXMessageBox::information(getApp(), MBOX_OK,
1729 (
"Add vclass for" +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1730 (
"All lanes own already another lane in the same edge with a restriction for " +
toString(vclass)).c_str());
1733 WRITE_DEBUG(
"Opening FXMessageBox 'restrict lanes'");
1735 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1736 (
"Add vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1737 (
toString(setOfEdges.size() - counter) +
" restrictions for " +
toString(vclass) +
" will be added. continue?").c_str());
1741 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'No'");
1742 }
else if (answer == 4) {
1743 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
1748 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
1754 for (
auto it : setOfEdges) {
1784 if (lane !=
nullptr) {
1790 std::set<GNEEdge*> setOfEdges;
1792 for (
auto i : edges) {
1793 setOfEdges.insert(i);
1796 for (
auto it : lanes) {
1801 if (setOfEdges.size() > 0) {
1805 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1807 if ((*it)->hasRestrictedLane(vclass)) {
1813 FXMessageBox::information(getApp(), MBOX_OK,
1814 (
"Remove vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1815 (
"Selected lanes and edges haven't a restriction for " +
toString(vclass)).c_str());
1818 WRITE_DEBUG(
"Opening FXMessageBox 'restrict lanes'");
1820 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1821 (
"Remove vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1822 (
toString(counter) +
" restrictions for " +
toString(vclass) +
" will be removed. continue?").c_str());
1826 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'No'");
1827 }
else if (answer == 4) {
1828 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'ESC'");
1833 WRITE_DEBUG(
"Closed FXMessageBox 'restrict lanes' with 'Yes'");
1839 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1860 FXEvent* evt = (FXEvent*)eventData;
1867 if (evt->click_count == 2) {
1868 handle(
this, FXSEL(SEL_DOUBLECLICKED, 0), eventData);
1876 bool cursorMove =
false;
1936 for (
auto it : junctions) {
1956 if (junction !=
nullptr) {
1970 if (junction !=
nullptr) {
1984 if (junction !=
nullptr) {
1998 if (junction !=
nullptr) {
2003 for (
auto i : selectedJunction) {
2022 if (junction !=
nullptr) {
2027 for (
auto i : selectedJunction) {
2271 if (personOrPersonPlan) {
2690 if (junctions.size() > 0) {
2691 std::string plural = junctions.size() == 1 ? (
"") : (
"s");
2693 for (
auto i : junctions) {
2704 if (lanes.size() > 0) {
2705 std::string plural = lanes.size() == 1 ? (
"") : (
"s");
2707 for (
auto i : lanes) {
2719 if (edges.size() > 0) {
2720 std::string plural = edges.size() == 1 ? (
"") : (
"s");
2722 for (
auto i : edges) {
2734 if (additionals.size() > 0) {
2735 std::string plural = additionals.size() == 1 ? (
"") : (
"s");
2737 for (
auto i : additionals) {
2751 if (demandElements.size() > 0) {
2752 std::string plural = demandElements.size() == 1 ? (
"") : (
"s");
2754 for (
auto i : demandElements) {
2769 std::vector<GNECrossing*> crossings;
2770 for (
auto i : junctions) {
2771 for (
auto j : i->getGNECrossings()) {
2772 if (j->isAttributeCarrierSelected()) {
2773 crossings.push_back(j);
2778 if (crossings.size() > 0) {
2779 std::string plural = crossings.size() == 1 ? (
"") : (
"s");
2781 for (
auto i : crossings) {
2795 std::vector<GNEConnection*> connections;
2796 for (
auto i : edges) {
2797 for (
auto j : i->getGNEConnections()) {
2798 if (j->isAttributeCarrierSelected()) {
2799 connections.push_back(j);
2804 if (connections.size() > 0) {
2805 std::string plural = connections.size() == 1 ? (
"") : (
"s");
2807 for (
auto i : connections) {
2820 if (selectedShapes.size() > 0) {
2821 std::string plural = selectedShapes.size() == 1 ? (
"") : (
"s");
2823 for (
auto i : selectedShapes) {
2838 selection.
add(newPos);
2839 selection.
grow(0.1);
2842 for (
auto it_ids : ids) {
2851 mergeTarget = dynamic_cast<GNEJunction*>(
object);
2859 WRITE_DEBUG(
"Opening FXMessageBox 'merge junctions'");
2861 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
2862 "Confirm Junction Merger",
"%s",
2863 (
"Do you wish to merge junctions '" + moved->
getMicrosimID() +
2866 "' will be eliminated and its roads added to '" +
2871 WRITE_DEBUG(
"Closed FXMessageBox 'merge junctions' with 'No'");
2872 }
else if (answer == 4) {
2873 WRITE_DEBUG(
"Closed FXMessageBox 'merge junctions' with 'ESC'");
2878 WRITE_DEBUG(
"Closed FXMessageBox 'merge junctions' with 'Yes'");
2922 glTranslated(firstLanePoint.
x(), firstLanePoint.
y(),
GLO_JUNCTION + 0.3);
2937 std::vector<double> shapeRotations, shapeLengths;
2950 int segments = (int) shape.size() - 1;
2951 if (segments >= 0) {
2952 shapeRotations.reserve(segments);
2953 shapeLengths.reserve(segments);
2954 for (
int j = 0; j < segments; j++) {
2958 shapeRotations.push_back((
double) atan2((s.
x() - f.
x()), (f.
y() - s.
y())) * (double) 180.0 / (
double)
M_PI);
2972 glTranslated(lastLanePoint.
x(), lastLanePoint.
y(),
GLO_JUNCTION + 0.3);
2988 bool deleteLastCreatedPoint =
false;
2998 if (temporalShape.size() > 0) {
3011 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)
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
bool isPerson() const
return true if tag correspond to a person element
change default geometry endpoints
bool isMovingSelection() const
check if currently there is element being moved
GNECrossing * getCrossingAtPopupPosition()
try to retrieve a crossing at popup position
#define UNUSED_PARAMETER(x)
std::string name
The name of this setting.
reset default geometry endpoints
FXbool makeCurrent()
A reimplementation due to some internal reasons.
ConnectionModifications * getConnectionModifications() const
get pointer to ConnectionModifications modul
hot key <F4> set demand mode in NETEDIT
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
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
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.
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
const std::vector< std::pair< GNELane *, double > > & getSelectedLanes() const
get current selected lanes
void hotkeyEnter()
function called when user press ENTER key
virtual long onRightBtnPress(FXObject *, FXSelector, void *)
const std::string getID() const
function to support debugging
#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
void moveSelection()
move selection
long onCmdToogleShowConnections(FXObject *, FXSelector, void *)
toogle show connections
void hotkeyBackSpace()
handle backspace keypress
Mode for editing person plan.
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
transform lane to bikelane
GNEViewNetHelper::DemandCheckableButtons myDemandCheckableButtons
variable used to save checkable buttons for Supermode Demand
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
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
bool stopConsecutiveLaneSelector()
stop selection of consecutive lanes
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
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.
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
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
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
bool forceDrawForSelecting
flag to force draw to selecting (see drawForSelecting)
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
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)
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
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
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
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
virtual void selectAttributeCarrier(bool changeFlag=true)=0
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
void processClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool oppositeEdge, bool chainEdge)
handle processClick and set the relative colouring
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_NMODE_CONNECT
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
static OptionsCont & getOptions()
Retrieves the options.
Mode for editing person types.
void hideCommonViewOptionsMenuChecks()
hide all options menu checks
begin/end of the description of a Point of interest
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
open additional dialog (used in netedit)
long onCmdEditJunctionShape(FXObject *, FXSelector, void *)
edit junction shape
long onCmdSetFirstGeometryPoint(FXObject *, FXSelector, void *)
set as first geometry point the closes geometry point
GNETAZ * getTAZ() const
get current TAZ
TAZSaveChanges * getTAZSaveChangesModul() const
get TAZ Save Changes modul
void drawLaneCandidates() const
draw functions
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
DemandEditMode demandEditMode
the current Demand edit mode
hotkey for mode deleting things
void smooth(GNEUndoList *undoList)
make geometry smooth
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
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.
turn junction into multiple junctions and reconnect them heuristically
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
GNEAdditional * getAdditionalAtPopupPosition()
try to retrieve a additional at popup position
bool getDeleteLastCreatedPoint()
get flag delete last created point
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
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
hotkey for mode editing TAZ
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
bool changeAllPhases() const
change all phases
Mode for editing Polygons.
long onRightBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's right button
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
turn junction into geometry node
A single child window which contains a view of the simulation area.
long onCmdLaneOperation(FXObject *, FXSelector sel, void *)
add/remove/restrict lane
Add to selected items - menu entry.
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
PositionVector shape
The shape of the netElement element.
void hotkeyEnter()
handle enter keypress
const RGBColor & getSelectedLaneColor() const
get selected lane color
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
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
hotkey for mode selecting objects
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
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when user press a key
void finishPersonPlanCreation()
finish person plan creation
mode for deleting network elements
virtual long onRightBtnRelease(FXObject *, FXSelector, void *)
int getIndex() const
returns the index of the lane
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.
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
bool myAmInitialised
Internal information whether doInit() was called.
void show()
show delete frame
NBNode * getNBNode() const
Return net build node.
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 *)
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)
std::vector< GUIGlID > getObjectsInBoundary(Boundary bound)
returns the ids of all objects in the given boundary
virtual bool onRightBtnRelease(void *data)
called when user releases right button
void closePolygon(bool allowUndo=true)
close polygon
Mode for editing additionals.
void buildDemandViewOptionsMenuChecks()
build menu checks
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
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
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...
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
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
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
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
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.
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
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
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.
GNEEdge & getParentEdge()
Returns underlying parent edge.
bool isChangesPending() const
return true if there is changes to save
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
GNEAdditionalFrame::SelectorLaneParents * getConsecutiveLaneSelector() const
getConsecutive Lane Selector
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
begin/end of the description of an edge
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
mode for selecting network elements
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)
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
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.
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
bool isShown() const
return true if modul is shown
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
static const RGBColor RED
named colors
void show()
show prohibition frame
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
bool addSelectedLane(GNELane *lane, const Position &clickedPosition)
return true if lane can be selected as consecutive lane
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.
long onCmdToogleHideConnections(FXObject *, FXSelector, void *)
toogle hide connections
void deleteSelectedAdditionals()
delete all currently selected additionals
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 onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
move elevation instead of x,y
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
const NetElementGeometry & getGeometry() const
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
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
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)
transform lane to greenVerge
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.
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
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 *)
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.
bool checkSavedPosition(const Position &clickedPosition) const
check if given position is near to saved position
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
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
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 *)
hide non-inspected demand element
virtual void onLeftBtnPress(void *data)
mouse functions
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators)
hotkey for mode create vehicles
void hideAllFrames()
hide all frames
double y() const
Returns the y-position.
crossing between edges for pedestrians
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
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
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
remove restricted lane
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
Demanding mode (Routes, Vehicles etc..)
GNERouteFrame * getRouteFrame() const
get frame for GNE_DMODE_ROUTE
interpolate z values linear between junctions
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
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
bool addRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, int index, GNEUndoList *undoList)
add restricted lane to 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
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
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
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
automatically create opposite edge
int addColor(const T &color, const double threshold, const std::string &name="")
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
hotkey for mode creating polygons
void addCrossing(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add Crossing element
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
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
GNEViewNetHelper::MoveSingleElementValues myMoveSingleElementValues
ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
GNEViewNetHelper::EditShapes myEditShapes
struct for grouping all variables related with edit shapes
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
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
mode for moving demand elements
bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
static const RGBColor GREEN
void selectAttributeCarrier(bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
const GNEViewNetHelper::CommonViewOptions & getCommonViewOptions() const
get Common view options
hotkey for mode inspecting object attributes
simplify polygon geometry
C++ TraCI client API implementation.
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
long onCmdToogleShowJunctionBubbles(FXObject *, FXSelector, void *)
toogle show junction bubbles
OverlappedInspection * getOverlappedInspection() const
get OverlappedInspection modul
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
void abortConsecutiveLaneSelector()
abort selection of consecutive lanes
bool isSelectingLanes() const
return true if modul is selecting lane
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.
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...
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.
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
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
edge: the shape in xml-definition
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
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.
hotkey for mode editing crossing AND routes
long onCmdToogleAutoOppositeEdge(FXObject *, FXSelector, void *)
toogle autoOpposite edge
FXPopup * getLocatorPopup()
@ brief return a pointer to locator popup
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
hotkey for mode moving element
mode for deleting demand elements
GNEViewParent * myViewParent
view parent
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
mode for moving network elements
create edges in chain mode
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
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
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 startConsecutiveLaneSelector(GNELane *lane, const Position &clickedPosition)
start selection of consecutive lanes
void show()
show inspector frame
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
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
hotkey for mode editing additionals AND stops