78 #ifdef CHECK_MEMORY_LEAKS 80 #endif // CHECK_MEMORY_LEAKS 121 FXGLVisual* glVis, FXGLCanvas* share, FXToolBar* toolBar) :
122 GUISUMOAbstractView(tmpParent, app, viewParent, net->getVisualisationSpeedUp(), glVis, share),
123 myViewParent(viewParent),
126 myPreviousEditMode(GNE_MODE_MOVE),
127 myShowConnectionActivated(false),
128 myCreateEdgeSource(0),
132 myAdditionalToMove(0),
133 myMoveSelection(false),
134 myAmInRectSelect(false),
138 myUndoList(undoList),
141 reparent(actualParent);
143 buildEditModeControls();
145 myNet->setViewNet(
this);
158 scheme =
GUIColorScheme(
"by selection (lane-/streetwise)",
RGBColor(128, 128, 128, 255),
"unselected",
true);
230 myVisualizationSettings->laneColorer = laneColorer;
254 myVisualizationSettings->junctionColorer = junctionColorer;
283 "\tLocate Junction\tLocate a junction within the network.",
285 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
288 "\tLocate Street\tLocate a street within the network.",
290 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
293 "\tLocate TLS\tLocate a traffic light within the network.",
295 ICON_ABOVE_TEXT | FRAME_THICK | FRAME_RAISED);
367 glMatrixMode(GL_MODELVIEW);
369 glDisable(GL_TEXTURE_2D);
370 glDisable(GL_ALPHA_TEST);
372 glEnable(GL_DEPTH_TEST);
377 glTranslated(0, 0,
GLO_MAX - 1);
380 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
400 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
401 const float minB[2] = { (float)bound.
xmin(), (float)bound.
ymin() };
402 const float maxB[2] = { (float)bound.
xmax(), (float)bound.
ymax() };
404 glEnable(GL_POLYGON_OFFSET_FILL);
405 glEnable(GL_POLYGON_OFFSET_LINE);
420 FXEvent* e = (FXEvent*) data;
441 pointed_edge = (
GNEEdge*)pointed;
444 pointed_lane = (
GNELane*)pointed;
448 pointed_poi = (
GNEPOI*)pointed;
451 pointed_poly = (
GNEPoly*)pointed;
471 if ((e->state & CONTROLMASK) == 0) {
476 if (!pointed_junction) {
497 std::cout <<
"edge created without an open CommandGroup )-:\n";
522 }
else if (pointed_junction) {
529 }
else if (pointed_edge) {
536 }
else if (pointed_additional) {
578 if (pointed_junction) {
587 }
else if (pointed_edge) {
594 }
else if (pointed_poi) {
598 }
else if (pointed_additional) {
601 }
else if (pointed_connection) {
612 if (pointed_junction) {
613 pointedAC = pointed_junction;
614 pointedO = pointed_junction;
615 }
else if (pointed_lane) {
617 pointedAC = pointed_edge;
618 pointedO = pointed_edge;
620 pointedAC = pointed_lane;
621 pointedO = pointed_lane;
623 }
else if (pointed_edge) {
624 pointedAC = pointed_edge;
625 pointedO = pointed_edge;
626 }
else if (pointed_crossing) {
627 pointedAC = pointed_crossing;
628 pointedO = pointed_crossing;
629 }
else if (pointed_additional) {
630 pointedAC = pointed_additional;
631 pointedO = pointed_additional;
632 }
else if (pointed_connection) {
633 pointedAC = pointed_connection;
634 pointedO = pointed_connection;
637 std::vector<GNEAttributeCarrier*> selected;
641 }
else if (pointedAC != 0) {
642 selected.push_back(pointedAC);
653 }
else if (pointed) {
669 const bool mayPass = (((FXEvent*)data)->state & SHIFTMASK) != 0;
670 const bool allowConflict = (((FXEvent*)data)->state & CONTROLMASK) != 0;
678 if (pointed_junction) {
686 if (pointed_additional == NULL) {
735 if (((FXEvent*)data)->state & SHIFTMASK) {
814 if (clearSelection) {
892 FXMessageBox::error(
this, MBOX_OK,
"invalid edit mode",
"%s",
"...");
971 edge = &(((
GNELane*)pointed)->getParentEdge());
1001 std::set<GNEEdge*> result;
1004 for (std::vector<GUIGlID>::const_iterator it = ids.begin(); it != ids.end(); ++it) {
1010 result.insert((
GNEEdge*)pointed);
1013 result.insert(&(((
GNELane*)pointed)->getParentEdge()));
1038 if (edges.size() != 0) {
1092 for (std::vector<GNEEdge*>::iterator it = edges.begin(); it != edges.end(); it++) {
1133 for (std::vector<GNELane*>::iterator it = lanes.begin(); it != lanes.end(); it++) {
1208 std::map<GNEEdge*, GNELane*> mapOfEdgesAndLanes;
1210 for (std::vector<GNELane*>::iterator i = lanes.begin(); i != lanes.end(); i++) {
1214 if (mapOfEdgesAndLanes.size() != lanes.size()) {
1215 FXMessageBox::information(getApp(), MBOX_OK,
1216 (
"Multiple lane in the same edge selected"),
"%s",
1217 (
"There are selected lanes that belong to the same edge.\n Only one lane pro edge will be restricted for " +
toString(vclass) +
".").c_str());
1220 if (mapOfEdgesAndLanes.size() > 0) {
1224 for (std::map<GNEEdge*, GNELane*>::iterator i = mapOfEdgesAndLanes.begin(); i != mapOfEdgesAndLanes.end(); i++) {
1225 if (i->first->hasRestrictedLane(vclass)) {
1230 if (counter == (
int)mapOfEdgesAndLanes.size()) {
1231 FXMessageBox::information(getApp(), MBOX_OK,
"%s",
1232 (
"Set vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1233 (
"All lanes own already another lane in the same edge with a restriction for " +
toString(vclass)).c_str());
1237 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1238 (
"Set vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1239 (
toString(mapOfEdgesAndLanes.size() - counter) +
" lanes will be restricted for " +
toString(vclass) +
". continue?").c_str());
1247 for (std::map<GNEEdge*, GNELane*>::iterator i = mapOfEdgesAndLanes.begin(); i != mapOfEdgesAndLanes.end(); i++) {
1275 std::set<GNEEdge*> setOfEdges;
1277 for (std::vector<GNEEdge*>::iterator i = edges.begin(); i != edges.end(); i++) {
1278 setOfEdges.insert(*i);
1281 for (std::vector<GNELane*>::iterator it = lanes.begin(); it != lanes.end(); it++) {
1286 if (setOfEdges.size() > 0) {
1290 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1292 if ((*it)->hasRestrictedLane(vclass) ==
true) {
1297 if (counter == (
int)setOfEdges.size()) {
1298 FXMessageBox::information(getApp(), MBOX_OK,
"%s",
1299 (
"Add vclass for" +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1300 (
"All lanes own already another lane in the same edge with a restriction for " +
toString(vclass)).c_str());
1304 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1305 (
"Add vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1306 (
toString(setOfEdges.size() - counter) +
" restrictions for " +
toString(vclass) +
" will be added. continue?").c_str());
1314 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1342 std::set<GNEEdge*> setOfEdges;
1344 for (std::vector<GNEEdge*>::iterator i = edges.begin(); i != edges.end(); i++) {
1345 setOfEdges.insert(*i);
1348 for (std::vector<GNELane*>::iterator it = lanes.begin(); it != lanes.end(); it++) {
1353 if (setOfEdges.size() > 0) {
1357 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1359 if ((*it)->hasRestrictedLane(vclass) ==
true) {
1365 FXMessageBox::information(getApp(), MBOX_OK,
"%s",
1366 (
"Remove vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1367 (
"Selected lanes and edges haven't a restriction for " +
toString(vclass)).c_str());
1371 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1372 (
"Remove vclass for " +
toString(vclass) +
" to selected lanes").c_str(),
"%s",
1373 (
toString(counter) +
" restrictions for " +
toString(vclass) +
" will be removed. continue?").c_str());
1381 for (std::set<GNEEdge*>::iterator it = setOfEdges.begin(); it != setOfEdges.end(); it++) {
1405 std::vector<GNELane*> lanes;
1411 for (std::vector<GNEEdge*>::iterator i = edges.begin(); i != edges.end(); i++) {
1412 for (std::vector<GNELane*>::const_iterator j = (*i)->getLanes().begin(); j != (*i)->getLanes().end(); j++) {
1413 lanes.push_back(*j);
1421 if (lanes.size() > 0) {
1425 for (std::vector<GNELane*>::iterator it = lanes.begin(); it != lanes.end(); it++) {
1432 FXMessageBox::information(getApp(), MBOX_OK,
1433 "Revert restriction",
"None of selected lanes has a previous restriction");
1437 FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO,
1438 "Revert restriction",
"%s",
1439 (
toString(counter) +
" restrictions of lanes lanes will be reverted. continue?").c_str());
1447 for (std::vector<GNELane*>::iterator it = lanes.begin(); it != lanes.end(); it++) {
1469 if (junction != 0) {
1512 if (junction != 0) {
1590 FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC | LAYOUT_CENTER_Y);
1593 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
1599 myChainCreateEdge =
new FXMenuCheck(
myToolbar,
"chain\t\tCreate consecutive edges with a single click (hit ESC to cancel chain).",
this, 0);
1601 "two-way\t\tAutomatically create an edge in the opposite direction",
this, 0);
1602 mySelectEdges =
new FXMenuCheck(
myToolbar,
"select edges\t\tToggle whether clicking should select edges or lanes",
this, 0);
1608 myExtendToEdgeNodes =
new FXMenuCheck(
myToolbar,
"auto-select nodes\t\tToggle whether selecting multiple edges should automatically select their nodes",
this, 0);
1610 myWarnAboutMerge =
new FXMenuCheck(
myToolbar,
"ask for merge\t\tAsk for confirmation before merging junctions.",
this, 0);
1616 myChangeAllPhases =
new FXMenuCheck(
myToolbar,
"apply change to all phases\t\tToggle whether clicking should apply state changes to all phases of the current traffic light plan",
this, 0);
1625 const int addChange = 4;
1636 int widthChange = 0;
1713 for (std::vector<GNEJunction*>::iterator it = junctions.begin(); it != junctions.end(); it++) {
1725 for (std::vector<GNEEdge*>::iterator it = edges.begin(); it != edges.end(); it++) {
1731 for (std::vector<GNELane*>::iterator it = lanes.begin(); it != lanes.end(); it++) {
1746 selection.
add(newPos);
1747 selection.
grow(0.1);
1750 for (std::vector<GUIGlID>::const_iterator it = ids.begin(); it != ids.end(); it++) {
1768 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
1769 "Confirm Junction Merger",
"%s",
1770 (
"Do you wish to merge junctions '" + moved->
getMicrosimID() +
1773 "' will be eliminated and its roads added to '" +
long onCmdAddRestrictedLaneSidewalk(FXObject *, FXSelector typeOfTransformation, void *)
Add restricted lane for pedestrians.
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
long onCmdResetEdgeEndpoint(FXObject *, FXSelector, void *)
restore geometry endpoint to node position
long onCmdDeleteGeometry(FXObject *, FXSelector, void *)
delete the closes geometry point
GNEViewParent * myViewParent
view parent
virtual void openAdditionalDialog()
open Additional Dialog
void paintGLGrid()
paints a grid
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
long onCmdRestrictLaneBikelane(FXObject *, FXSelector typeOfTransformation, void *)
restrict lane to bikes
GNELane * getLane() const
get lane of additional, or NULL if additional isn't placed over a Lane
static const RGBColor BLUE
ShapeContainer & getShapeContainer()
get shape container
Position moveGeometry(const Position &oldPos, const Position &newPos, bool relative=false)
draw the polygon and also little movement handles
FXDEFMAP(GNEViewNet) GNEViewNetMap[]
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
FXMenuCheck * mySelectEdges
menu check to select only edges
const std::set< GUIGlID > & getSelected() const
Returns the list of ids of all selected objects.
bool selectEdges()
whether inspection, selection and inversion should apply to edges or to lanes
GNEJunction * getJunctionAtCursorPosition(Position &pos)
try to retrieve a junction at the given position
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Position myPopupSpot
Poput spot.
GUICompleteSchemeStorage gSchemeStorage
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
bool isAdditionalBlocked() const
Check if additional item is currently blocked (i.e. cannot be moved with mouse)
void abortOperation(bool clearSelection=true)
abort current edition operation
void deleteSelectedJunctions()
delete all currently selected junctions
GNEEdge * getEdgeTemplate() const
get the template edge (to copy attributes from)
const SUMOReal SUMO_const_laneWidth
bool setColorScheme(const std::string &name)
set color schieme
bool restrictLane(SUMOVehicleClass vclass)
restrict lane
void markPopupPosition()
store the position where a popup-menu was requested
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
StringBijection< EditMode > myEditModeNames
since we cannot switch on strings we map the mode names to an enum
long onMouseMove(FXObject *, FXSelector, void *)
called when user moves mouse
void markAsCreateEdgeSource()
marks as first junction in createEdge-mode
The main window of the Netedit.
SUMORTree * myGrid
The visualization speed-up.
virtual void changeCanvassLeft(int change)=0
void setAllowsNegativeValues(bool value)
bool revertLaneRestriction(GNELane *lane, GNEUndoList *undoList)
revert prevously restricted lane
void toggleSelection(GUIGlID id)
Toggles selection of an object.
virtual long onMouseMove(FXObject *, FXSelector, void *)
FXMenuCheck * myChainCreateEdge
whether the endpoint for a created edge should be set as the new source
FXMenuCheck * myShowConnections
menu check to show connections
long onCmdSplitEdge(FXObject *, FXSelector, void *)
split edge at cursor position
const std::string & getString(const T key) const
GNEViewParent * getViewParent() const
get the net object
GUIMainWindow * myApp
The application.
FXMenuCheck * myChangeAllPhases
menu check to set change all phases
vehicle is a small delivery vehicle
void setEditMode(EditMode mode)
set edit mode
Position moveGeometry(const Position &oldPos, const Position &newPos, bool relative=false)
change the edge geometry It is up to the Edge to decide whether an new geometry node should be genera...
void computeEverything(GNEApplicationWindow *window, bool force=false)
Position mySelCorner2
second corner of the rectangle-selection
classes which (normally) do not drive on normal roads
void removeAdditionalGLObject(GUIGlObject *o)
Removes an additional object (detector/shape/trigger) from being visualised.
SUMOReal ymin() const
Returns minimum y-coordinate.
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
void setSelectionScaling(SUMOReal selectionScale)
set selection scaling
GNEJunction * getEditedJunction() const
retrieve the junction of which the shape is being edited
void updateJunctionShapes()
update junction shapes
void setLineWidth(SUMOReal lineWidth)
set a new shape and update the tesselation
long onCmdNodeShape(FXObject *, FXSelector, void *)
input custom node shape
static const RGBColor ORANGE
virtual long onLeftBtnPress(FXObject *, FXSelector, void *)
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connectino
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
A NBNetBuilder extended by visualisation and editing capabilities.
FXComboBox * myEditModesCombo
combo box for selecting the edit mode
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
GNEEdge * createEdge(GNEJunction *src, GNEJunction *dest, GNEEdge *tpl, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false)
creates a new edge (unless an edge with the same geometry already exists)
int editMode
the current NETEDIT mode (temporary)
void commmitAdditionalGeometryMoved(const Position &oldPos, GNEUndoList *undoList)
updated geometry changes in the attributes of additional
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...
void inspect(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement=NULL)
Inspect a single element.
void setEditModeFromHotkey(FXushort selid)
sets edit mode (from hotkey)
bool addAdditional(GNENetElement *netElement, GUISUMOAbstractView *parent)
add additional element
long onCmdSetEdgeEndpoint(FXObject *, FXSelector, void *)
set non-default geometry endpoint
SUMOReal ymax() const
Returns maximum y-coordinate.
static const RGBColor BLACK
const std::string & getID() const
Returns the id.
const SVCPermissions SVCAll
GUIDialog_ViewSettings * myVisualizationChanger
Visualization changer.
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList)
removes edge
void updateControls()
update control contents after undo/redo or recompute
EditMode myPreviousEditMode
the previous edit mode used for toggling
void registerMove(GNEUndoList *undoList)
registers completed movement with the undoList
const PositionVector & getShape() const
Returns whether the shape of the polygon.
GNEEdge * myEdgeToMove
the edge of which geometry is being moved
A class that stores a 2D geometrical boundary.
SUMOReal xmin() const
Returns minimum x-coordinate.
long onCmdChangeMode(FXObject *, FXSelector, void *)
sets edit mode via combo box
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool myShowConnectionActivated
whether show connections has been activated once
std::vector< std::string > getStrings() const
A single child window which contains a view of the simulation area.
GNETLSEditorFrame * getTLSEditorFrame() const
get frame for GNE_MODE_TLS
SUMOReal scale
information about a lane's width (temporary, used for a single view)
SUMOReal nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
std::map< const GUIGlObject *, int > myAdditionallyDrawn
List of objects for which GUIGlObject::drawGLAdditional is called.
bool changeAllPhases() const
change all phases
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
bool myMoveSelection
whether a selection is being moved
void hide()
hidde additional frame
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
void handleLaneClick(GNELane *lane, bool mayDefinitelyPass, bool allowConflict, bool toggle)
either sets the current lane or toggles the connection of the current lane to this lane (if they shar...
std::vector< GUIGlID > getObjectsAtPosition(Position pos, SUMOReal radius)
returns the ids of the object at position within the given (rectangular) radius using GL_SELECT ...
void insert(const std::string str, const T key, bool checkDuplicates=true)
std::string getAttribute(SumoXMLAttr key) const
Position myOldAdditionalPosition
variable for saving additional position before moving
void buildEditModeControls()
adds controls for setting the edit mode
GUIGlID getObjectAtPosition(Position pos)
returns the id of the object at position using GL_SELECT
std::set< GNEEdge * > getEdgesAtCursorPosition(Position &pos)
try to retrieve multiple edges at the given position
GNEUndoList * getUndoList() const
get the undoList object
long onLeftBtnPress(FXObject *, FXSelector, void *)
overloaded handlers
long onCmdSimplifyShape(FXObject *, FXSelector, void *)
simply shape of current polygon
int addColor(const T &color, const SUMOReal threshold, const std::string &name="")
static const RGBColor GREEN
static const RGBColor GREY
bool showLockIcon() const
check if lock icon should be visible
virtual long onPaint(FXObject *, FXSelector, void *)
GNEPoly * myCurrentPoly
current polygon
FXMenuCheck * myShowJunctionAsBubble
show connection as buuble in "Move" mode.
SUMOReal selectionScale
the current selection scaling in NETEDIT (temporary)
long onCmdRemoveRestrictedLaneBuslane(FXObject *, FXSelector typeOfTransformation, void *)
remove restricted lane for bus
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
bool hasCommandGroup() const
Check if undoList has command group.
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
remove restricted lane
FXMenuCheck * myWarnAboutMerge
whether we should warn about merging junctions
mode for inspecting object attributes
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
static bool hasAttribute(SumoXMLTag tag, SumoXMLAttr attr)
check if a element with certain tag has a certain attribute
virtual void setStatusBarText(const std::string &)
GNEAdditional * myAdditionalToMove
the stoppingPlace element which shape is being moved
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
GNEEdge & getParentEdge()
Returns underlying parent edge.
virtual ~GNEViewNet()
destructor
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.
virtual bool removePOI(const std::string &id)
Removes a PoI from the container.
void deleteLane(GNELane *lane, GNEUndoList *undoList)
removes lane
void deleteGeometryOrEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList)
removes geometry when pos is close to a geometry node, deletes the whole edge otherwise ...
long onCmdToogleShowConnection(FXObject *, FXSelector, void *)
toogle show connections
T get(const std::string &str) const
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
void removeAdditional(GNEAdditional *additional)
remove an additional element previously added
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
long onCmdRevertRestriction(FXObject *, FXSelector, void *)
revert transformation
bool removeRestrictedLane(SUMOVehicleClass vclass)
remove restricted lane
long onCmdSplitEdgeBidi(FXObject *, FXSelector, void *)
split edge at cursor position
bool autoSelectNodes()
whether to autoselect nodes or to lanes
static const RGBColor MAGENTA
SUMOReal x() const
Returns the x-position.
void initGNEConnections()
initialize GNEConnections
long onCmdRemoveRestrictedLaneBikelane(FXObject *, FXSelector typeOfTransformation, void *)
remove restricted lane for bikes
mode for selecting objects
void removeCurrentPoly()
remove the currently edited polygon
GNEJunction * myJunctionToMove
the Junction to be moved.
GNELane * getLaneAtCurserPosition(Position &pos)
try to retrieve a lane at the given position
Locate junction - button.
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_MODE_SELECT
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(const std::set< GUIGlID > &ids, GUIGlObjectType type)
get the attribute carriers based on GlIDs
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void unMarkAsCreateEdgeSource()
removes mark as first junction in createEdge-mode
void moveSelection(const Position &moveSrc, const Position &moveDest)
move all selected junctions and edges
GNEJunction * createJunction(const Position &pos, GNEUndoList *undoList)
creates a new junction
void splitEdgesBidi(const std::set< GNEEdge *> &edges, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
Position mySelCorner1
firstcorner of the rectangle-selection
Position myAdditionalMovingReference
variable for calculating moving offset of additionals
void p_abort()
reverts and discards ALL active command groups
GUIPerspectiveChanger * myChanger
The perspective changer.
long onCmdRestrictLaneBuslane(FXObject *, FXSelector typeOfTransformation, void *)
restrict lane to buslanes
bool myUseToolTips
use tool tips
SUMORTree & getVisualisationSpeedUp()
Returns the RTree used for visualisation speed-up.
vehicle is a passenger car (a "normal" car)
void doInit()
called after some features are already initialized
FXMenuCheck * myAutoCreateOppositeEdge
EditMode getCurrentEditMode() const
get the current edit mode
bool mergeJunctions(GNEJunction *moved)
try to merge moved junction with another junction in that spot return true if merging did take place ...
const PositionVector & getShape() const
retrieve the junction shape
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
A road/street connecting two junctions (netedit-version)
FXbool makeCurrent()
A reimplementation due to some internal reasons.
long onCmdOK(FXObject *, FXSelector, void *)
virtual long onLeftBtnRelease(FXObject *, FXSelector, void *)
static const RGBColor YELLOW
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
static const RGBColor RED
const PositionVector & getShape() const
returns the shape of the lane
FXMenuCheck * myExtendToEdgeNodes
menu check to extend to edge nodes
void moveAdditionalGeometry(const Position &offset)
change the position of the additional geometry
static const RGBColor CYAN
GUIVisualizationSettings * myVisualizationSettings
visualization settings
SUMOReal xmax() const
Returns maximum x-coordinate.
void show()
show additional frame
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
Position myMoveSrc
position from which to move edge geometry
void add(SUMOReal x, SUMOReal y, SUMOReal z=0)
Makes the boundary include the given coordinate.
long onCmdAddRestrictedLaneBikelane(FXObject *, FXSelector typeOfTransformation, void *)
Add restricted lane for bikes.
void addAdditionalGLObject(GUIGlObject *o)
Adds an additional object (detector/shape/trigger) for visualisation.
An Element which don't belongs to GNENet but has influency in the simulation.
GNEConnectorFrame * getConnectorFrame() const
get frame for GNE_MODE_CONNECT
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
bool showConnections()
show connections over junctions
long onCmdOK(FXObject *, FXSelector, void *)
long onCmdReverseEdge(FXObject *, FXSelector, void *)
reverse edge
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any connection modifications.
int doPaintGL(int mode, const Boundary &bound)
do paintGL
GNEJunction * myCreateEdgeSource
source junction for new edge 0 if no edge source is selected an existing (or newly created) junction ...
void move(Position pos)
reposition the node at pos and informs the edges
void set(SUMOReal x, SUMOReal y)
SUMOReal m2p(SUMOReal meter) const
meter-to-pixels conversion method
long onCmdAddRestrictedLaneBuslane(FXObject *, FXSelector typeOfTransformation, void *)
Add restricted lane for buses.
long onCmdRemoveRestrictedLaneSidewalk(FXObject *, FXSelector typeOfTransformation, void *)
remove restricted lane for pedestrians
void simplifyShape()
replace the current shape with a rectangle
void clear()
Clears the list of selected objects.
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
void handleIDs(std::vector< GUIGlID > ids, bool selectEdges, SetOperation setop=SET_DEFAULT)
apply list of ids to the current selection according to SetOperation,
bool showGrid
Information whether a grid shall be shown.
void drawDecals()
Draws the stored decals.
GNENet * getNet() const
get the net object
long onCmdRestrictLaneSidewalk(FXObject *, FXSelector typeOfTransformation, void *)
restrict lane to pedestrians
const Position & getPosition() const
Returns the position of this node.
void updateModeSpecificControls()
updates mode specific controls
GUIGlID getGlID() const
Returns the numerical id of the object.
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
void setStatusBarText(const std::string &text)
set staturBar text
Mode for editing additionals.
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
void setEndpoint(Position pos, GNEUndoList *undoList)
makes pos the new geometry endpoint at the appropriate end
GUIPropertyScheme< RGBColor > GUIColorScheme
static const RGBColor selectionColor
color of selection
void unblockObject(GUIGlID id)
Marks an object as unblocked.
long onCmdStraightenEdges(FXObject *, FXSelector, void *)
makes selected edges straight
mode for connecting lanes
mode for creating new edges
NBEdge * getNBEdge()
returns the internal NBEdge
long onDoubleClicked(FXObject *, FXSelector, void *)
called when user press mouse's left button two times
GUIGlID getObjectUnderCursor()
returns the id of the object under the cursor using GL_SELECT
long onCmdToogleShowBubbles(FXObject *, FXSelector, void *)
toogle show bubbles
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
GNEEdge * getEdgeAtCursorPosition(Position &pos)
try to retrieve an edge at the given position
long onCmdNodeReplace(FXObject *, FXSelector, void *)
replace node by geometry
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.
SUMOReal y() const
Returns the y-position.
void closePolygon()
ensures that the last position equals the first
NBNode * getNBNode() const
Return net build node.
bool myAmInRectSelect
whether we have started rectangle-selection
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
bool addSRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
add restricted lane to edge
virtual int Search(const float a_min[2], const float a_max[2], const GUIVisualizationSettings &c) const
Find all within search rectangle.
GUISelectedStorage gSelected
A global holder of selected objects.
GNENet * myNet
we are not responsible for deletion
void hotkeyEnter()
handle enter keypress
void resetEndpoint(const Position &pos, GNEUndoList *undoList)
restores the endpoint to the junction position at the appropriate end
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
Position getSplitPos(const Position &clickPos)
void requireRecompute()
inform the net about the need for recomputation
void computeNodeShape(SUMOReal mismatchThreshold)
Compute the junction shape for this node.
void duplicateLane(GNELane *lane, GNEUndoList *undoList)
duplicates lane
void deleteSelectedEdges()
delete all currently selected edges
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
EditMode myEditMode
the current edit mode
bool addRestrictedLane(SUMOVehicleClass vclass)
add restricted lane
std::vector< GUIGlID > getObjectsInBoundary(const Boundary &bound)
returns the ids of all objects in the given boundary
FXPopup * getLocatorPopup()
void deleteGeometryNear(const Position &pos)
delete the geometry point closest to the given pos
GNEPoly * myPolyToMove
the poly of which geometry is being moved
void finishMoveSelection(GNEUndoList *undoList)
register changes to junction and edge positions with the undoList
SumoXMLTag getTag() const
get Tag assigned to this object
virtual Position getPositionInView() const =0
Returns position of additional in view.