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();
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;
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());
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();
1499 myNet->
addPOI(
id, type, color, pos,
false, nearestLane->
getID(), minorPosOverLane, 0, layer, angle, imgFile, relativePath, POIWidth, POIHeight);
1504 std::string
id = POI->
getID();
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) {
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) {
Locate junction - button.
DeleteOptions * getDeleteOptions() const
get delete options
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
void processMoveMouseDemand()
process move mouse function in Supermode Demand
long onCmdResetEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
create edges in chain mode
GNEViewParent * myViewParent
view parent
virtual void openAdditionalDialog()
open Additional Dialog
void paintGLGrid()
paints a grid
bool addRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, int index, GNEUndoList *undoList)
add restricted lane to edge
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
bool isPersonStop() const
return true if tag correspond to a person stop element
hotkey for mode editing TLS AND Vehicle Types
GNETAZFrame * getTAZFrame() const
get frame for GNE_NMODE_TAZ
long onCmdResetJunctionShape(FXObject *, FXSelector, void *)
reset junction shape
void update(void *eventData)
update status of KeyPressed
static const RGBColor BLUE
void removeLastInsertedElement()
remove last added element (either a BusStop or an edge)
FXDEFMAP(GNEViewNet) GNEViewNetMap[]
double ymin() const
Returns minimum y-coordinate.
void show()
show prohibition frame
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_NMODE_INSPECT
void openPolygon(bool allowUndo=true)
open polygon
std::set< std::pair< std::string, GNEAttributeCarrier * > > getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges=false)
get AttributeCarriers in Boundary
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Mode for editing crossing.
double xmax() const
Returns maximum x-coordinate.
GUICompleteSchemeStorage gSchemeStorage
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.
hot key <F4> set demand mode in NETEDIT
GNEViewNetHelper::ObjectsUnderCursor myObjectsUnderCursor
variable use to save all pointers to objects under cursor after a click
GNEViewNetHelper::TestingMode myTestingMode
variable used to save variables related with testing mode
GNETAZ * getTAZ() const
get current TAZ
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
double scale
information about a lane's width (temporary, used for a single view)
Position getPositionInView() const
Returns position of additional in view.
long onCmdSplitJunctionReconnect(FXObject *, FXSelector, void *)
split junction into multiple junctions and reconnect them
ConnectionModifications * getConnectionModifications() const
get pointer to ConnectionModifications modul
void abortOperation(bool clearSelection=true)
abort current edition operation
void deleteSelectedJunctions()
delete all currently selected junctions
PositionVector shape
The shape of the netElement element.
move elevation instead of x,y
void hotkeyBackSpace()
function called when user press BACKSPACE key
void hotkeyEsc()
function called when user press ESC key
whether a given shape is user-defined
bool setColorScheme(const std::string &name)
set color scheme
void moveRectangleSelection()
move rectangle selection
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
long onCmdToogleHideNonInspecteDemandElements(FXObject *, FXSelector, void *)
toogle hide non inspected demand elements
const RGBColor & getSelectedLaneColor() const
get selected lane color
static FXCursor * getCursor(GUICursor which)
returns a cursor previously defined in the enum GUICursor
bool restrictLane(SUMOVehicleClass vclass)
restrict lane
void smoothElevation(GNEUndoList *undoList)
smooth elevation with regard to adjoining edges
GNEViewNetHelper::EditModes myEditModes
variable used to save variables related with edit moves modes
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.
void processLeftButtonReleaseDemand()
process left button release function in Supermode Demand
const std::string & getShapeImgFile() const
Returns the imgFile of the Shape.
long onCmdToogleHideShapes(FXObject *, FXSelector, void *)
toogle hide shapes in super mode demand
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
void hotkeyBackSpace()
handle backspace keypress
begin/end of the description of a junction
long onRightBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's right button
begin/end of the description of a single lane
bool myAmInitialised
Internal information whether doInit() was called.
void finishEdgePathCreation()
finish edge path creation
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
class used to group all variables related with key pressed after certain events
long onMouseMove(FXObject *, FXSelector, void *)
called when user moves mouse
void update() const
Mark the entire GNEViewNet to be repainted later.
bool controlKeyPressed() const
check if CONTROL key was pressed during click
void removeAttributeCarrier(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool ignoreOptions=false)
remove attribute carrier (element)
void splitJunction(GNEJunction *junction, bool reconnect, GNEUndoList *undoList)
replace the selected junction by a list of junctions for each unique edge endpoint ...
long onCmdToogleChainEdges(FXObject *, FXSelector, void *)
toogle chain edges
GNEViewNet()
FOX needs this.
GNEViewNetHelper::NetworkViewOptions myNetworkViewOptions
variable used to save variables related with view options in Network Supermode
std::vector< GUIGlID > getObjectsInBoundary(Boundary bound)
returns the ids of all objects in the given boundary
bool addAdditional(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add additional element
long onCmdAddSelected(FXObject *, FXSelector, void *)
select AC under cursor
FXMenuCheck * menuCheckShowAllPersonPlans
show all person plans
long onCmdToogleMoveElevation(FXObject *, FXSelector, void *)
toogle move elevation
SUMORTree * myGrid
The visualization speed-up.
AddShapeResult processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet
void setSupermode(Supermode supermode)
set Network edit mode
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
void hotkeyFocusFrame()
handle focus frame keypress
struct used to group all variables related to view options in supermode Network
AddShapeResult
enum with all possible values after try to create an shape using frame
bool isDrawing() const
return true if currently a shape is drawed
void hideDemandViewOptionsMenuChecks()
hide all options menu checks
bool isDemandElement() const
return true if tag correspond to a demand element
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
void lockPerson(const GNEDemandElement *person)
lock person
void straightenElevation(GNEUndoList *undoList)
interpolate z values linear between junctions
virtual long onMouseMove(FXObject *, FXSelector, void *)
Locate addtional structure - button.
bool getDeleteLastCreatedPoint()
get flag delete last created point
long onCmdToogleChangeAllPhases(FXObject *, FXSelector, void *)
toogle change all phases
const GNEDemandElement * getLockedPerson() const
get locked person
GNEVehicleTypeFrame * getVehicleTypeFrame() const
get frame for GNE_DMODE_VEHICLETYPE
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
bool isPersonPlan() const
return true if tag correspond to a person plan
hotkey for mode editing connection prohibitions AND person types
void show()
show delete frame
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true)
get a single attribute carrier based on a GLID
void drawTemporalRoute() const
draw temporal route
connectio between two lanes
Stores the information about how to visualize structures.
void moveSingleElement()
move single element in Network AND Demand mode
long onCmdSplitEdge(FXObject *, FXSelector, void *)
split edge at cursor position
long onCmdToogleSelectEdges(FXObject *, FXSelector, void *)
toogle select edges
void finishMoveSelection()
finish moving selection
const double SUMO_const_laneWidth
void moveSelection()
move selection
GNEViewParent * getViewParent() const
get the net object
GNEFrameModuls::DrawingShape * getDrawingShapeModul() const
get drawing mode modul
double y() const
Returns the y-position.
GNEPersonFrame * getPersonFrame() const
get frame for GNE_DMODE_PERSON
interpolate z values linear between junctions
struct with the attribute Properties
GUIMainWindow * myApp
The application.
FXMenuCheck * menuCheckChangeAllPhases
menu check to set change all phases
void finishRectangleSelection()
finish rectangle selection
Mode for editing connection prohibitions.
static void resetTextures()
Reset textures.
void drawTemporalRoute() const
draw temporal route
smooth elevation with regard to adjoining edges
long onCmdOpenPolygon(FXObject *, FXSelector, void *)
open closed polygon
hotkey for mode deleting things
void abortEdgeCreation()
abort current edge creation
GNEStopFrame * getStopFrame() const
get frame for GNE_DMODE_STOP
double x() const
Returns the x-position.
mode for selecting network elements
bool isShown() const
return true if modul is shown
GNEFrameModuls::EdgePathCreator * getEdgePathCreator() const
get EdgePathCreator modul
GNEPoly * editedShapePoly
polygon used for edit shapes
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
GNEAdditional * getAdditionalAtPopupPosition()
try to retrieve a additional at popup position
void processClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool oppositeEdge, bool chainEdge)
handle processClick and set the relative colouring
void smooth(GNEUndoList *undoList)
make geometry smooth
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)
bool selectEdges() const
check if select edges checkbox is enabled
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
hotkey for mode editing crossing AND routes
void processMoveMouseNetwork()
process move mouse function in Supermode Network
static const RGBColor ORANGE
mode for moving demand elements
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
transform lane to bikelane
std::vector< GNEEdge * > processEdgeRectangleSelection()
process rectangle Selection (only limited to Edges)
void resetJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
reset junction's connections
TAZCurrent * getTAZCurrentModul() const
get Current TAZ modul
FXMenuCheck * menuCheckWarnAboutMerge
menu check to we should warn about merging junctions
A NBNetBuilder extended by visualisation and editing capabilities.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
PositionVector shape
The crossing's shape.
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
long onCmdToogleShowConnections(FXObject *, FXSelector, void *)
toogle show connections
bool stopConsecutiveLaneSelector()
stop selection of consecutive lanes
turn junction into multiple junctions and reconnect them heuristically
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
long onCmdToogleLockPerson(FXObject *, FXSelector, void *)
toogle lock person in super mode demand
long onCmdStraightenEdgesElevation(FXObject *, FXSelector, void *)
interpolate z values linear between junctions
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
mode for selecting demand elements
void buildNetworkViewOptionsMenuChecks()
build menu checks
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when user press a key
begin/end of the description of a Point of interest
hotkey for mode editing additionals AND stops
void processEdgeSelection(const std::vector< GNEEdge *> &edges)
process selection of edges in view net
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
long onCmdEditConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
GNEProhibitionFrame * getProhibitionFrame() const
get frame for GNE_NMODE_PROHIBITION
double getHeight() const
Returns the image height of the POI.
Remove from selected items - Menu Etry.
GNEPersonTypeFrame * getPersonTypeFrame() const
get frame for GNE_DMODE_PERSONTYPE
GUIDialog_ViewSettings * myVisualizationChanger
Visualization changer.
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
unselect AC under cursor
void beginMoveSelection(GNEAttributeCarrier *originAC)
begin move selection
void show()
show delete frame
long onCmdResetConnections(FXObject *, FXSelector, void *)
reset junction connections
const std::vector< std::pair< GNELane *, double > > & getSelectedLanes() const
get current selected lanes
void updateControls()
update control contents after undo/redo or recompute
static void drawFilledCircle(double width, int steps=8)
Draws a filled circle around (0,0)
Transform POI to POILane, and viceversa.
turn junction into geometry node
void deleteSelectedShapes()
delete all currently selected shapes
FXMenuCheck * menuCheckShowGrid
menu check to show grid button
#define UNUSED_PARAMETER(x)
GNEPolygonFrame * getPolygonFrame() const
get frame for GNE_NMODE_POLYGON
void editEndpoint(Position pos, GNEUndoList *undoList)
makes pos the new geometry endpoint at the appropriate end, or remove current existent endpoint ...
A class that stores a 2D geometrical boundary.
long onCmdSetMode(FXObject *, FXSelector sel, void *)
called when user press a mode button (Network or demand)
virtual void selectAttributeCarrier(bool changeFlag=true)=0
void hideNetworkViewOptionsMenuChecks()
hide all options menu checks
bool isChangesPending() const
return true if there is changes to save
void closePolygon(bool allowUndo=true)
close polygon
GNEViewNetHelper::SelectingArea mySelectingArea
variable used to save variables related with selecting areas
#define WRITE_WARNING(msg)
A single child window which contains a view of the simulation area.
bool mergeJunctions(GNEJunction *moved, const Position &oldPos)
try to merge moved junction with another junction in that spot return true if merging did take place ...
mode for moving network elements
DemandEditMode demandEditMode
the current Demand edit mode
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_NMODE_TLS
static OptionsCont & getOptions()
Retrieves the options.
const std::string & getShapeType() const
Returns the (abstract) type of the Shape.
GNEViewNetHelper::KeyPressed myKeyPressed
variable used to save key status after certain events
OverlappedInspection * getOverlappedInspection() const
get OverlappedInspection modul
bool beginMoveSingleElementNetworkMode()
begin move single element in Network mode
const GNEViewNetHelper::CommonViewOptions & getCommonViewOptions() const
get Common view options
GNEPOI * getPOIFront() const
get front POI (or a pointer to nullptr if there isn't)
void hideCommonViewOptionsMenuChecks()
hide all options menu checks
bool changeAllPhases() const
change all phases
void handleEdgeClick(GNEEdge *clickedEdge)
handle edge click
GNEViewNetHelper::MoveMultipleElementValues myMoveMultipleElementValues
variable used to save variables related with movement of multiple elements
void buildDemandViewOptionsMenuChecks()
build menu checks
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
void drawRectangleSelection(const RGBColor &color) const
draw rectangle selection
void updateNetworkModeSpecificControls()
updates Network mode specific controls
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_NMODE_ADDITIONAL
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
Mode for editing vehicles.
NBEdge * getNBEdge() const
returns the internal NBEdge
int getCircleResolution() const
function to calculate circle resolution for all circles drawn in drawGL(...) functions ...
void setNetworkEditMode(NetworkEditMode networkMode, bool force=false)
set Network edit mode
FXMenuCheck * menuCheckShowDemandElements
menu check to show Demand Elements
long onCmdToogleShowAllPersonPlans(FXObject *, FXSelector, void *)
toogle show all person plans in super mode demand
void stopEditCustomShape()
edit edit shape
void unlockPerson()
unlock person
void buildEditModeControls()
create edit mode buttons and elements
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
GNEViewNetHelper::DemandCheckableButtons myDemandCheckableButtons
variable used to save checkable buttons for Supermode Demand
GUIGlID getObjectAtPosition(Position pos)
returns the id of the object at position using GL_SELECT
GNEUndoList * getUndoList() const
get the undoList object
int getIndex() const
returns the index of the lane
void processLeftButtonReleaseNetwork()
process left button release function in Supermode Network
mode for inspecting network elements
void buildCommonViewOptionsMenuChecks()
build menu checks
long onLeftBtnPress(FXObject *, FXSelector, void *)
long onRightBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's right button
long onCmdSimplifyShape(FXObject *, FXSelector, void *)
simply shape of current polygon
Mode for editing additionals.
static const RGBColor GREEN
void computeNodeShape(double mismatchThreshold)
Compute the junction shape for this node.
bool getShapeRelativePath() const
Returns the relativePath of the Shape.
Locate polygons - button.
FXMenuCheck * menuCheckMoveElevation
menu check to apply movement to elevation
hotkey for mode connecting lanes
bool showLockIcon() const
check if lock icon should be visible
virtual long onPaint(FXObject *, FXSelector, void *)
GNEAdditionalFrame::SelectorLaneParents * getConsecutiveLaneSelector() const
getConsecutive Lane Selector
int addColor(const T &color, const double threshold, const std::string &name="")
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
FXMenuCheck * menuCheckAutoOppositeEdge
menu check to create auto create opposite edge
Mode for editing vehicle types.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
GNEFrameModuls::DrawingShape * getDrawingShapeModul() const
get drawing mode editor
std::string name
The name of this setting.
void deleteSelectedConnections()
delete all currently selected connections
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
remove restricted lane
FXMenuCheck * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
std::vector< GNEDemandElement * > retrieveDemandElements(bool onlySelected=false) const
return all demand elements
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual void setStatusBarText(const std::string &)
void deleteSelectedCrossings()
delete all currently selected crossings
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
GNEEdge & getParentEdge()
Returns underlying parent edge.
void processClick(void *eventData)
Auxiliar function used by onLeftBtnPress(...)
void handleProhibitionClick(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
handle prohibitions and set the relative colouring
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
GNEEdge * getEdgeAtPopupPosition()
try to retrieve an edge at popup position
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
bool startDrawing
whether we have started rectangle-selection
transform lane to busLane
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
A point in 2D or 3D with translation and scaling methods.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
RGBColor selectionColor
basic selection color
bool processDemandSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Demand
FXMenuCheck * menuCheckChainEdges
menu check to the endpoint for a created edge should be set as the new source
GNEPOI * getPOIAtPopupPosition()
try to retrieve a POILane at popup position
Supermode currentSupermode
the current supermode
long onCmdReplaceJunction(FXObject *, FXSelector, void *)
replace node by geometry
long onCmdClearConnections(FXObject *, FXSelector, void *)
clear junction connections
void abortPersonPlanCreation()
abort person plan creation
GNEFrameAttributesModuls::AttributesEditor * getAttributesEditor() const
get AttributesEditor
virtual GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)=0
Returns an own popup-menu.
FXMenuCheck * menuCheckSelectEdges
menu check to select only edges
void drawTemporalDrawShape() const
draw temporal polygon shape in Polygon Mode
GNEEdge * getOppositeEdge() const
get opposite edge
long onCmdToogleHideConnections(FXObject *, FXSelector, void *)
toogle hide connections
void buildSuperModeButtons()
build checkable buttons
bool isPerson() const
return true if tag correspond to a person element
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
const RGBColor & getShapeColor() const
Returns the color of the Shape.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
long onCmdToogleAutoOppositeEdge(FXObject *, FXSelector, void *)
toogle autoOpposite edge
mode for creating new edges
virtual bool isAttributeCarrierSelected() const =0
check if attribute carrier is selected
void drawTemporalRoute() const
draw temporal route
ToolbarsGrip & getToolbarsGrip()
get ToolbarsGrip
bool processNetworkSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Network
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.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
GNEVehicleFrame * getVehicleFrame() const
get frame for GNE_DMODE_VEHICLE
long onCmdSaveChanges(FXObject *, FXSelector, void *)
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
bool isMovingSelection() const
check if currently there is element being moved
long onCmdCancelModifications(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any connection modifications.
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
bool removeRestrictedLane(SUMOVehicleClass vclass)
remove restricted lane
void setDottedAC(const GNEAttributeCarrier *AC)
set attributeCarrier under cursor
long onCmdSplitEdgeBidi(FXObject *, FXSelector, void *)
split edge at cursor position
bool autoSelectNodes()
whether to autoselect nodes or to lanes
Mode for editing Polygons.
static const RGBColor MAGENTA
double xmin() const
Returns minimum x-coordinate.
hotkey for mode moving element
void initGNEConnections()
initialize GNEConnections
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
virtual bool onRightBtnRelease(void *data)
called when user releases right button
turn junction into multiple junctions
void updateObjectUnderCursor(const std::vector< GUIGlObject *> &GUIGlObjects, GNEPoly *editedPolyShape)
update objects under cursor (Called only in onLeftBtnPress(...) function)
void updateCursor()
update cursor after every click/key press/release
PersonPlanCreator * getPersonPlanCreator() const
get PersonPlanCreator modul
edge: the shape in xml-definition
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
void createCrossingHotkey()
create crossing (used when user press ENTER key in Crossing mode)
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
Boundary & grow(double by)
extends the boundary by the given amount
const GNEViewNetHelper::KeyPressed & getKeyPressed() const
get Key Pressed modul
GNEPersonPlanFrame * getPersonPlanFrame() const
get frame for GNE_DMODE_PERSONFRAME
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
long onCmdSetSupermode(FXObject *, FXSelector sel, void *)
const std::string getID() const
function to support debugging
show junctions as bubbles
void deleteGeometryPoint(const Position &pos, bool allowUndo=true)
delete the geometry point closest to the given pos
const NetElementGeometry & getGeometry() const
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
mode for deleting network elements
void focusUpperElement()
focus upper element of frame
hide non-inspected demand element
long onCmdEditEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag, bool onlySelected=false)
return shape by type shapes
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any prohibition modifications.
GNECreateEdgeFrame * getCreateEdgeFrame() const
get frame for GNE_NMODE_CREATEEDGE
FXMenuCheck * menuCheckExtendSelection
menu check to extend to edge nodes
void p_abort()
reverts and discards ALL active command groups
GUIPerspectiveChanger * myChanger
The perspective changer.
long onCmdResetLaneCustomShape(FXObject *, FXSelector, void *)
reset custom shapes of selected lanes
hotkey for mode inspecting object attributes
bool myUseToolTips
use tool tips
GNEConnection * getConnectionAtPopupPosition()
try to retrieve a connection at popup position
long onCmdToogleShowGrid(FXObject *, FXSelector, void *)
toogle show grid
virtual void onLeftBtnPress(void *data)
mouse functions
GUIGLObjectPopupMenu * myPopup
The current popup-menu.
ask before merging junctions
void selectAttributeCarrier(bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
double getShapeLayer() const
Returns the layer of the Shape.
void destroyPopup()
destoys the popup
double getWidth() const
Returns the image width of the POI.
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
const PositionVector & getTemporalShape() const
get Temporal shape
void doInit()
called after some features are already initialized
begin/end of the description of an edge
void startDrawing()
start drawing
long onCmdSplitJunction(FXObject *, FXSelector, void *)
split junction into multiple junctions
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
void setSelectionScaling(double selectionScale)
set selection scaling
void processLeftButtonPressDemand(void *eventData)
process left button press function in Supermode Demand
const PositionVector & getShape() const
retrieve the junction shape
long onCmdClosePolygon(FXObject *, FXSelector, void *)
close opened polygon
void removeLastAddedElement()
remove last added element
transform lane to sidewalk
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
A road/street connecting two junctions (netedit-version)
bool shiftKeyPressed() const
check if SHIFT key was pressed during click
void duplicateLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
duplicates lane
GNEViewNetHelper::CommonCheckableButtons myCommonCheckableButtons
variable used to save checkable buttons for common supermodes
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when user release a key
FXbool makeCurrent()
A reimplementation due to some internal reasons.
const std::vector< GNEDemandElement * > & getDemandElementParents() const
return vector of demand elements that have as Parent this edge (For example, Calibrators) ...
void startEditCustomShape(GNENetElement *element, const PositionVector &shape, bool fill)
start edit custom shape
long onCmdToogleShowJunctionBubbles(FXObject *, FXSelector, void *)
toogle show junction bubbles
void setTAZ(GNETAZ *editedTAZ)
set current TAZ
void beginRectangleSelection()
begin rectangle selection
Connection getConnection(int fromLane, const NBEdge *to, int toLane) const
Returns the specified connection This method goes through "myConnections" and returns the specified o...
virtual long onLeftBtnRelease(FXObject *, FXSelector, void *)
Mode for editing person plan.
GNEJunction * getJunctionAtPopupPosition()
try to retrieve a junction at popup position
change default geometry endpoints
void handleLaneClick(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
either sets the current lane or toggles the connection of the
long onCmdSmoothEdgesElevation(FXObject *, FXSelector, void *)
smooth elevation with regard to adjoining edges
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
hotkey for mode adding edges
static const RGBColor YELLOW
struct used to group all variables related with edit shapes of NetElements
bool checkSavedPosition(const Position &clickedPosition) const
check if given position is near to saved position
static const RGBColor RED
named colors
reset junction's connections
long onCmdSaveModifications(FXObject *, FXSelector, void *)
Called when the user presses the OK-Button saves any connection modifications.
double selectionScale
the current selection scaling in NETEDIT (temporary)
double m2p(double meter) const
meter-to-pixels conversion method
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
virtual void show()
show Frame
static const RGBColor CYAN
Set a vertex of polygon as first verte.
GUIGlObject * getNetObject() const
Returns the network object.
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
bool addSelectedLane(GNELane *lane, const Position &clickedPosition)
return true if lane can be selected as consecutive lane
GUIVisualizationSettings * myVisualizationSettings
visualization settings
hotkey for mode create vehicles
void simplifyShape(bool allowUndo=true)
replace the current shape with a rectangle
long onCmdDeleteGeometryPoint(FXObject *, FXSelector, void *)
delete the closes geometry point
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
GNEViewNetHelper::NetworkCheckableButtons myNetworkCheckableButtons
variable used to save checkable buttons for Supermode Network
PositionVector customShape
optional customShape for this crossing
Position myPopupPosition
The current popup-menu position.
FXMenuCheck * menuCheckShowConnections
menu check to show connections
An Element which don't belongs to GNENet but has influency in the simulation.
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_NMODE_CONNECT
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
void clearCurrentSelection() const
clear current selection with possibility of undo/redo
bool addPerson(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
FXMenuCheck * menuCheckShowJunctionBubble
menu check to show connection as buuble in "Move" mode.
bool deleteOnlyGeometryPoints() const
check if only delete geometry points checkbox is enabled
GNEViewNetHelper::CommonViewOptions myCommonViewOptions
variable used to save variables related with common view options
GNEViewNetHelper::VehicleTypeOptions myVehicleTypeOptions
variable used to save variables related with vehicle type options
long onCmdOK(FXObject *, FXSelector, void *)
long onCmdReverseEdge(FXObject *, FXSelector, void *)
reverse edge
simplify polygon geometry
Demanding mode (Routes, Vehicles etc..)
GNEViewNetHelper::EditShapes myEditShapes
struct for grouping all variables related with edit shapes
int doPaintGL(int mode, const Boundary &bound)
do paintGL
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
hotkey for mode selecting objects
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
open additional dialog
TAZSaveChanges * getTAZSaveChangesModul() const
get TAZ Save Changes modul
void updateDemandModeSpecificControls()
updates Demand mode specific controls
GNEViewNetHelper::VehicleOptions myVehicleOptions
variable used to save variables related with vehicle options
open additional dialog (used in netedit)
reset default geometry endpoints
GNECrossingFrame * getCrossingFrame() const
get frame for GNE_NMODE_CROSSING
bool addStop(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool shiftPressed)
add Stop element
bool addPersonPlan(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
void deleteSelectedAdditionals()
delete all currently selected additionals
void clearJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
clear junction's connections
void computeAndUpdate(OptionsCont &oc, bool volatileOptions)
recompute the network and update lane geometries
crossing between edges for pedestrians
bool IsObjectTypeLocked(const GUIGlObjectType type) const
check if an object is locked
bool addVehicle(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add vehicle element
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
GNECrossing * getCrossingAtPopupPosition()
try to retrieve a crossing at popup position
bool showGrid
Information whether a grid shall be shown.
mode for inspecting demand elements
long onCmdSmoothEdges(FXObject *, FXSelector, void *)
smooth geometry
void drawTestingElements(GUIMainWindow *mainWindow)
draw testing element
void drawDecals()
Draws the stored decals.
FXComboBox * getColoringSchemesCombo()
return combobox with the current coloring schemes (standard, fastest standard, real world...
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_NMODE_DELETE
void show()
show inspector frame
struct used to group all variables related with Supermodes
void processRectangleSelection()
process rectangle Selection
GNENet * getNet() const
get the net object
GNEViewNetHelper::MoveSingleElementValues myMoveSingleElementValues
const Position & getPosition() const
hotkey for mode creating polygons
mode for connecting lanes
Mode for editing person types.
GNEConnection * getConnectionFront() const
get front connection (or a pointer to nullptr if there isn't)
GUIGlID getGlID() const
Returns the numerical id of the object.
void swapLane2Edge()
swap lane to edge
long onCmdToogleShowDemandElements(FXObject *, FXSelector, void *)
long onCmdEditCrossingShape(FXObject *, FXSelector, void *)
edit crossing shape
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
void setStatusBarText(const std::string &text)
set staturBar text
bool isSelectingLanes() const
return true if modul is selecting lane
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
void finishMoveSingleElement()
finish moving single elements in Network AND Demand mode
double distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
hotkey for mode editing TAZ
void abortDrawing()
abort drawing
void hideAllFrames()
hide all frames
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
NetworkEditMode networkEditMode
the current Network edit mode
void startConsecutiveLaneSelector(GNELane *lane, const Position &clickedPosition)
start selection of consecutive lanes
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
GUIVisualizationColorSettings colorSettings
color settings
void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
virtual void unselectAttributeCarrier(bool changeFlag=true)=0
unselect attribute carrier using GUIGlobalSelection
FXMenuCheck * menuCheckHideShapes
Hide shapes (Polygons and POIs)
automatically create opposite edge
NBNode::Crossing * getNBCrossing() const
get referente to NBode::Crossing
const GNEAttributeCarrier * myDottedAC
current AttributeCarrier that is drawn using with a dotted contour note: it's constant because is edi...
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
void unblockObject(GUIGlID id)
Marks an object as unblocked.
GNEPoly * getPolyFront() const
get front Poly (or a pointer to nullptr if there isn't)
long onCmdLaneOperation(FXObject *, FXSelector sel, void *)
add/remove/restrict lane
struct used to group all variables related to view options in all supermodes
void abortEdgePathCreation()
abort edge path creation
long onCmdStraightenEdges(FXObject *, FXSelector, void *)
makes selected edges straight
GNEViewNetHelper::DemandViewOptions myDemandViewOptions
variable used to save variables related with view options in Demand Supermode
GNERouteFrame * getRouteFrame() const
get frame for GNE_DMODE_ROUTE
virtual long onRightBtnPress(FXObject *, FXSelector, void *)
long onCmdSetFirstGeometryPoint(FXObject *, FXSelector, void *)
set as first geometry point the closes geometry point
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
std::vector< GUIGlObject * > getGUIGlObjectsUnderCursor()
returns the GUIGlObject under the cursor using GL_SELECT (including overlapped objects) ...
Add to selected items - menu entry.
GUIGlID getObjectUnderCursor()
returns the id of the front object under the cursor using GL_SELECT
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type (or a pointer to nullptr if there isn't)
GNELane * getLaneAtPopupPosition()
try to retrieve a lane at popup position
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
void drawLaneCandidates() const
draw functions
bool drawForSelecting
whether drawing is performed for the purpose of selecting objects
mode for deleting demand elements
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
double ymax() const
Returns maximum y-coordinate.
long onCmdTransformPOI(FXObject *, FXSelector, void *)
Transform POI to POILane, and viceversa.
void hotkeyDel()
handle del keypress
long onCmdAddReversedEdge(FXObject *, FXSelector, void *)
add reversed edge
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
bool forceDrawForSelecting
flag to force draw to selecting (see drawForSelecting)
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
void saveEditedShape()
save edited shape
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
Network mode (Edges, junctions, etc..)
hot key <F3> set network mode in NETEDIT
void closePolygon()
ensures that the last position equals the first
NBNode * getNBNode() const
Return net build node.
void finishPersonPlanCreation()
finish person plan creation
const std::vector< GNEAttributeCarrier * > & getEditedACs() const
get current edited ACs
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
C++ TraCI client API implementation.
void processLeftButtonPressNetwork(void *eventData)
mouse process functions
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const
Find all within search rectangle.
GNENet * myNet
Pointer to current net. (We are not responsible for deletion)
void hotkeyEnter()
handle enter keypress
bool selectingUsingRectangle
whether we have started rectangle-selection
void resetEndpoint(const Position &pos, GNEUndoList *undoList)
restores the endpoint to the junction position at the appropriate end
void deleteSelectedLanes()
delete all currently selected lanes
void addCrossing(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
add Crossing element
long onCmdToogleWarnAboutMerge(FXObject *, FXSelector, void *)
toogle warn for merge
long onCmdEditJunctionShape(FXObject *, FXSelector, void *)
edit junction shape
void changeFirstGeometryPoint(int oldIndex, bool allowUndo=true)
change first geometry point
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
Position getSplitPos(const Position &clickPos)
const GNEViewNetHelper::EditShapes & getEditShapes() const
get Edit Shape modul
void abortConsecutiveLaneSelector()
abort selection of consecutive lanes
vehicles ignoring classes
void splitEdgesBidi(GNEEdge *edge, GNEEdge *oppositeEdge, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
void requireRecompute()
inform the net about the need for recomputation
void setDemandEditMode(DemandEditMode demandMode, bool force=false)
set Demand edit mode
void deleteSelectedDemandElements()
delete all currently selected demand elements
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
struct used to group all variables related to view options in supermode Demand
void hotkeyEnter()
function called when user press ENTER key
long onCmdToogleExtendSelection(FXObject *, FXSelector, void *)
toogle extend selection
double getShapeNaviDegree() const
Returns the angle of the Shape in navigational degrees.
transform lane to greenVerge
void deleteSelectedEdges()
delete all currently selected edges
int getVertexIndex(Position pos, bool createIfNoExist, bool snapToGrid)
return index of a vertex of shape, or of a new vertex if position is over an shape's edge ...
clear junction's connections
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
virtual long onRightBtnRelease(FXObject *, FXSelector, void *)
An Element which don't belongs to GNENet but has influency in the simulation.
bool addRestrictedLane(SUMOVehicleClass vclass)
add restricted lane
void stopDrawing()
stop drawing and check if shape can be created
FXPopup * getLocatorPopup()
@ brief return a pointer to locator popup
void endGeometryMoving(bool extendToNeighbors=true)
begin movement (used when user click over edge to start a movement, to avoid problems with problems w...
const Position & getPopupPosition() const
get position of current popup
FXMenuCheck * menuCheckLockPerson
Lock Person.
GNEFrame * myCurrentFrame
the current frame
void removeSelectedAttributeCarriers()
remove selected attribute carriers (element)
GNEPoly * getPolygonAtPopupPosition()
try to retrieve a polygon at popup position
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet