222 void update(
void *eventData);
225 bool shiftKeyPressed()
const;
228 bool controlKeyPressed()
const;
248 FXGLVisual* glVis, FXGLCanvas* share, FXToolBar* toolBar);
292 long onKeyPress(FXObject* o, FXSelector sel,
void* data);
295 long onKeyRelease(FXObject* o, FXSelector sel,
void* data);
596 Position calculateOffsetMovement()
const;
599 void calculatePolyValues();
602 void calculateEdgeValues();
605 void calculateTAZValues();
638 void moveSelection();
641 void finishMoveSelection();
644 bool isMovingSelection()
const;
674 void beginRectangleSelection();
677 void moveRectangleSelection();
680 void finishRectangleSelection();
683 void processRectangleSelection();
686 std::vector<GNEEdge*> processEdgeRectangleSelection();
692 void drawRectangleSelection(
const RGBColor& color)
const;
702 void processBoundarySelection(
const Boundary &boundary);
721 void initTestingMode();
747 void buildCreateEdgeOptionMenuChecks();
750 void hideCreateEdgeOptionMenuChecks();
782 void buildViewOptionsMenuChecks();
785 void hideViewOptionsMenuChecks();
struct used to group all variables related with movement of groups of elements
void startEditCustomShape(GNENetElement *element, const PositionVector &shape, bool fill)
start edit custom shape
long onCmdResetEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
GNEViewParent * myViewParent
view parent
FXMenuCheck * getMenuCheckShowGrid() const
get grid button
long onCmdRemoveRestrictedLaneGreenVerge(FXObject *, FXSelector, void *)
remove restricted lane for all vehicles
GNEPoly * polyToMove
the poly of which geometry is being moved
long onCmdResetJunctionShape(FXObject *, FXSelector, void *)
reset junction shape
GNEEdge * edgeToMove
the edge of which geometry is being moved
GNENetElement * getNetElementFront() const
get front net element (or a pointer to nullptr if there isn't)
std::set< std::pair< std::string, GNEAttributeCarrier * > > getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges=false)
get AttributeCarriers in Boundary
long onCmdAddRestrictedLaneSidewalk(FXObject *, FXSelector, void *)
Add restricted lane for pedestrians.
long onCmdAddRestrictedLaneBikelane(FXObject *, FXSelector, void *)
Add restricted lane for bikes.
bool selectEdges() const
whether inspection, selection and inversion should apply to edges or to lanes
GNEPOI * getPOIFront() const
get front POI (or a pointer to nullptr if there isn't)
void abortOperation(bool clearSelection=true)
abort current edition operation
void deleteSelectedJunctions()
delete all currently selected junctions
class used to group all variables related with key pressed after certain events
bool setColorScheme(const std::string &name)
set color scheme
long onCmdSetModeAdditional(FXObject *, FXSelector, void *)
called when user press the button for additional mode
FXMenuCheck * menuCheckShowBubbleOverJunction
show connection as buuble in "Move" mode.
bool restrictLane(SUMOVehicleClass vclass)
restrict lane
ObjectsUnderCursor & operator=(const ObjectsUnderCursor &)=delete
Invalidated assignment operator.
const KeyPressed & getKeyPressed() const
get Key Pressed modul
long onCmdDuplicateLane(FXObject *, FXSelector, void *)
duplicate selected lane
long onRightBtnPress(FXObject *, FXSelector, void *)
called when user press mouse's right button
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
long onMouseMove(FXObject *, FXSelector, void *)
called when user moves mouse
GNEViewNet * myViewNet
pointer to viewNet
Mode for editing connection prohibits.
GNEViewNet()
FOX needs this.
MovedItems myMovedItems
variable use to save pointers to moved elements
long onCmdAddSelected(FXObject *, FXSelector, void *)
select AC under cursor
long onCmdToogleMoveElevation(FXObject *, FXSelector, void *)
toogle move elevation
long onCmdSetModeSelect(FXObject *, FXSelector, void *)
called when user press the button for select mode
GNETAZ * tazToMove
the TAZ element which their Shape is being moved (it's the only additional with a shape instead a pos...
void hotkeyFocusFrame()
handle focus frame keypress
void stopEditCustomShape()
edit edit shape
void buildColorRainbow(const GUIVisualizationSettings &s, GUIColorScheme &scheme, int active, GUIGlObjectType objectType)
recalibrate color scheme according to the current value range
Stores the information about how to visualize structures.
long onCmdSplitEdge(FXObject *, FXSelector, void *)
split edge at cursor position
long onCmdToogleSelectEdges(FXObject *, FXSelector, void *)
toogle selet edges
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers() const
get vector with clicked ACs
MFXCheckableButton * myEditModeTAZ
chekable button for edit mode TAZ
long onCmdAddRestrictedLaneBuslane(FXObject *, FXSelector, void *)
Add restricted lane for buses.
GNEViewParent * getViewParent() const
get the net object
GNETAZ * getTAZFront() const
get front TAZ (or a pointer to nullptr if there isn't)
MoveSingleElementValues myMoveSingleElementValues
variable used to save variables related with movement of single elements
std::vector< GNEShape * > myShapes
vector with the clicked shape elements (Poly and POIs)
Position selectionCorner1
firstcorner of the rectangle-selection
CreateEdgeOptions myCreateEdgeOptions
variable used to save all elements related to creation of Edges
GNEViewNet * myViewNet
pointer to viewNet
void setEditMode(EditMode mode)
set edit mode
MFXCheckableButton * myEditModeSelect
chekable button for edit mode select
long onCmdOpenPolygon(FXObject *, FXSelector, void *)
open closed polygon
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
struct used to group all variables related with testing
bool movingStartPos
bool to indicate that startPos are being moved
GNEAdditional * getAdditionalAtPopupPosition()
try to retrieve a additional at popup position
ObjectsUnderCursor myObjectsUnderCursor
variable use to save all pointers to objects under cursor after a click
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
void updateObjectUnderCursor(const std::vector< GUIGlObject *> &GUIGlObjects, GNEPoly *editedPolyShape)
update objects under cursor (Called only in onLeftBtnPress(...) function)
long onCmdAddRestrictedLaneGreenVerge(FXObject *, FXSelector, void *)
Add restricted lane for all vehicles.
MFXCheckableButton * myEditModeMove
chekable button for edit mode move
int movingIndexShape
index moved
MFXCheckableButton * myEditModeDelete
chekable button for edit mode delete
A NBNetBuilder extended by visualisation and editing capabilities.
bool myTestingEnabled
flag to enable or disable testing mode
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GUIGlID getGlIDFront() const
get front GUI GL ID (or a pointer to nullptr if there isn't)
long onCmdStraightenEdgesElevation(FXObject *, FXSelector, void *)
interpolate z values linear between junctions
void setEditModeFromHotkey(FXushort selid)
sets edit mode (from hotkey)
long onKeyPress(FXObject *o, FXSelector sel, void *data)
called when user press a key
long onCmdRemoveRestrictedLaneBikelane(FXObject *, FXSelector, void *)
remove restricted lane for bikes
long onCmdRestrictLaneGreenVerge(FXObject *, FXSelector, void *)
restrict lane to all vehicles
long onCmdEditConnectionShape(FXObject *, FXSelector, void *)
edit connection shape
ObjectsUnderCursor()
constructor
GNEPoly * getPolyFront() const
get front Poly (or a pointer to nullptr if there isn't)
MFXCheckableButton * myEditModeProhibition
checkable button for edit mode polygon
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
unselect AC under cursor
long onCmdResetConnections(FXObject *, FXSelector, void *)
reset junction connections
void updateControls()
update control contents after undo/redo or recompute
EditMode myPreviousEditMode
the previous edit mode before edit junction's shapes
std::vector< GNETAZ * > myTAZs
vector with the clicked TAZ elements (needed because uses a shape instead a position) ...
Position originalPositionInView
original position of geometry position (needed for commmit position changes)
void deleteSelectedShapes()
delete all currently selected shapes
GNEAdditional * additionalToMove
the additional element which position is being moved
FXEvent * myEventInfo
information of event
A class that stores a 2D geometrical boundary.
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type (or a pointer to nullptr if there isn't)
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 ...
GNEViewNet * myViewNet
pointer to viewNet
GNEJunction * createEdgeSource
source junction for new edge 0 if no edge source is selected an existing (or newly created) junction ...
bool changeAllPhases() const
change all phases
long onCmdSetModeCrossing(FXObject *, FXSelector, void *)
called when user press the button for crossing mode
SelectingArea mySelectingArea
variable used to save variables related with selecting areas
std::map< GNEJunction *, Position > myMovedJunctionOriginPositions
container used for move junctions
struct used to group all variables related to create edges
long onCmdSetModeTAZ(FXObject *, FXSelector, void *)
called when user press the button for TAZ mode
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
void setCreatedJunction(GNEJunction *junction)
set created junction
void buildEditModeControls()
adds controls for setting the edit mode
GNEUndoList * getUndoList() const
get the undoList object
long onLeftBtnPress(FXObject *, FXSelector, void *)
long onRightBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's right button
long onCmdSimplifyShape(FXObject *, FXSelector, void *)
simply shape of current polygon
std::vector< GNEAttributeCarrier * > myAttributeCarriers
vector with the clicked attribute carriers
bool showLockIcon() const
check if lock icon should be visible
FXMenuCheck * menuCheckExtendSelection
menu check to extend to edge nodes
void deleteSelectedConnections()
delete all currently selected connections
mode for inspecting object attributes
void deleteSelectedCrossings()
delete all currently selected crossings
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
void processClick(void *eventData)
Auxiliar function used by onLeftBtnPress(...)
GNEEdge * getEdgeAtPopupPosition()
try to retrieve an edge at popup position
void sortGUIGlObjectsByAltitude(const std::vector< GUIGlObject *> &GUIGlObjects)
invert GUIGlObjects
long onCmdRemoveRestrictedLaneSidewalk(FXObject *, FXSelector, void *)
remove restricted lane for pedestrians
ViewOptions myViewOptions
variable used to save variables related with view options
long onCmdSetModeMove(FXObject *, FXSelector, void *)
called when user press the button for move mode
FXMenuCheck * menuCheckShowConnections
menu check to show connections
A point in 2D or 3D with translation and scaling methods.
GNEPOI * getPOIAtPopupPosition()
try to retrieve a POILane at popup position
long onCmdReplaceJunction(FXObject *, FXSelector, void *)
replace node by geometry
long onCmdClearConnections(FXObject *, FXSelector, void *)
clear junction connections
long onCmdRestrictLaneBuslane(FXObject *, FXSelector, void *)
restrict lane to buslanes
FXToolBar * myToolbar
a reference to the toolbar in myParent
long onCmdToogleShowConnection(FXObject *, FXSelector, void *)
toogle show connections
KeyPressed myKeyPressed
variable used to save key status after certain events
void drawTemporalDrawShape() const
draw temporal polygon shape in Polygon Mode
MFXCheckableButton * myEditModeCreateEdge
FXMenuCheck * menuCheckShowGrid
show grid button
GNEViewNet * myViewNet
pointer to viewNet
bool showJunctionAsBubbles() const
return true if junction must be showed as bubbles
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
long onCmdSetModeProhibition(FXObject *, FXSelector, void *)
called when user press the button for polygon mode
bool startDrawing
whether we have started rectangle-selection
MFXCheckableButton * myEditModeTrafficLight
chekable button for edit mode traffic light
FXMenuCheck * chainCreateEdge
whether the endpoint for a created edge should be set as the new source
mode for selecting objects
MFXCheckableButton * myEditModeAdditional
chekable button for edit mode additional
void updateCursor()
update cursor after every click/key press/release
std::vector< GNEEdge * > myEdges
vector with the clicked edges
struct used to group all pointers to moved elements
bool myMovingSelection
flag to check if a selection is being moved
struct used to group all variables related with selecting using a square or polygon ...
long onCmdEditEdgeEndpoint(FXObject *, FXSelector, void *)
change geometry endpoint
FXMenuCheck * menuCheckWarnAboutMerge
whether we should warn about merging junctions
std::vector< GNELane * > myLanes
vector with the clicked lanes
GNECrossing * getCrossingFront() const
get front crossing (or a pointer to nullptr if there isn't)
long onCmdResetLaneCustomShape(FXObject *, FXSelector, void *)
reset custom shapes of selected lanes
GNEConnection * getConnectionAtPopupPosition()
try to retrieve a connection at popup position
Position relativeClickedPosition
relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user does...
std::vector< GNEJunction * > myJunctions
vector with the clicked junctions
void doInit()
called after some features are already initialized
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
struct used to group all variables related with movement of single elements
long onCmdSplitJunction(FXObject *, FXSelector, void *)
split junction into multiple junctions
void setSelectionScaling(double selectionScale)
set selection scaling
EditMode getCurrentEditMode() const
get the current edit mode
MFXCheckableButton * myEditModeInspect
chekable button for edit mode inspect
long onCmdClosePolygon(FXObject *, FXSelector, void *)
close opened polygon
A road/street connecting two junctions (netedit-version)
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when user release a key
std::vector< GNEPOI * > myPOIs
vector with the clicked POIs
long onCmdRemoveRestrictedLaneBuslane(FXObject *, FXSelector, void *)
remove restricted lane for bus
GNEJunction * getJunctionAtPopupPosition()
try to retrieve a junction at popup position
long onCmdSmoothEdgesElevation(FXObject *, FXSelector, void *)
smooth elevation with regard to adjoining edges
PositionVector originalShapeBeforeMoving
original shape of element before start moving (used by polygons, edges, etc., needed for commmit posi...
Mode for editing Polygons.
void buildSelectionACPopupEntry(GUIGLObjectPopupMenu *ret, GNEAttributeCarrier *AC)
Builds an entry which allows to (de)select the object.
MoveMultipleElementValues myMoveMultipleElementValues
variable used to save variables related with movement of multiple elements
long onCmdDeleteGeometryPoint(FXObject *, FXSelector, void *)
delete the closes geometry point
bool selectingUsingRectangle
whether we have started rectangle-selection
GNEViewNet * myViewNet
pointer to viewNet
An Element which don't belongs to GNENet but has influency in the simulation.
const GNEAttributeCarrier * getDottedAC() const
get AttributeCarrier under cursor
bool editingElevation() const
return true if elevation is being edited
MFXCheckableButton * myEditModeConnection
chekable button for edit mode connection
bool showConnections()
show connections over junctions
GNEViewNet * myViewNet
pointer to viewNet
struct used to group all variables related to view options
long onCmdReverseEdge(FXObject *, FXSelector, void *)
reverse edge
GNEPOI * poiToMove
the poi which position is being moved
long onCmdSetModeTLS(FXObject *, FXSelector, void *)
called when user press the button for traffic lights mode
FXMenuCheck * menuCheckChangeAllPhases
menu check to set change all phases
int doPaintGL(int mode, const Boundary &bound)
do paintGL
long onCmdOpenAdditionalDialog(FXObject *, FXSelector, void *)
open additional dialog
GNEJunction * junctionToMove
the Junction to be moved.
std::vector< GNEPoly * > myPolys
vector with the clicked Polys
void deleteSelectedAdditionals()
delete all currently selected additionals
std::map< GNEEdge *, PositionVector > myMovedEdgesOriginShape
container used for move entire edges
GNECrossing * getCrossingAtPopupPosition()
try to retrieve a crossing at popup position
long onCmdSmoothEdges(FXObject *, FXSelector, void *)
smooth geometry
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
GNENet * getNet() const
get the net object
std::vector< GNENetElement * > myNetElements
vector with the clicked net elements
Position selectionCorner2
second corner of the rectangle-selection
std::vector< GNEAdditional * > myAdditionals
vector with the clicked additional elements
std::vector< GUIGlObject * > myGUIGlObjects
vector with the clicked GUIGlObjects
void updateModeSpecificControls()
updates mode specific controls
FXMenuCheck * menuCheckMoveElevation
apply movement to elevation
MFXCheckableButton * myEditModeCrossing
chekable button for edit mode crossing
long onCmdEditCrossingShape(FXObject *, FXSelector, void *)
edit crossing shape
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
void setStatusBarText(const std::string &text)
set staturBar text
void swapLane2Edge()
swap lane to edge
long onCmdSetModeConnect(FXObject *, FXSelector, void *)
called when user press the button for connect mode
Mode for editing additionals.
int myTestingWidth
Width of viewNet in testing mode.
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
const GNEAttributeCarrier * myDottedAC
current AttributeCarrier that is drawn using with a dotted contour note: it's constant because is edi...
FXMenuCheck * autoCreateOppositeEdge
create auto create opposite edge
long onCmdSetModePolygon(FXObject *, FXSelector, void *)
called when user press the button for polygon mode
Mode for editing crossing.
GNEShape * getShapeFront() const
get front shape element (or a pointer to nullptr if there isn't)
GNEConnection * getConnectionFront() const
get front connection (or a pointer to nullptr if there isn't)
long onCmdStraightenEdges(FXObject *, FXSelector, void *)
makes selected edges straight
long onCmdSetModeInspect(FXObject *, FXSelector, void *)
called when user press the button for inspect mode
mode for connecting lanes
mode for creating new edges
Position myClickedPosition
original clicked position when moveSelection is called (used for calculate offset during moveSelectio...
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
long onCmdSetFirstGeometryPoint(FXObject *, FXSelector, void *)
set as first geometry point the closes geometry point
std::vector< GNECrossing * > myCrossings
vector with the clicked crossings
GNELane * getLaneAtPopupPosition()
try to retrieve a lane at popup position
long onCmdToogleShowBubbles(FXObject *, FXSelector, void *)
toogle show bubbles
int myTestingHeight
Height of viewNet in testing mode.
void drawLaneCandidates() const
draw functions
long onCmdTransformPOI(FXObject *, FXSelector, void *)
Transform POI to POILane, and viceversa.
void hotkeyDel()
handle del keypress
long onCmdAddReversedEdge(FXObject *, FXSelector, void *)
add reversed edge
GNEPoly * myEditShapePoly
std::vector< GNEConnection * > myConnections
vector with the clicked connections
TestingMode myTestingMode
variable used to save variables related with testing mode
std::map< GNEEdge *, MoveSingleElementValues * > myMovedEgdesGeometryPoints
container used for move GeometryPoints of edges
GNENet * myNet
Pointer to current net. (We are not responsible for deletion)
void hotkeyEnter()
handle enter keypress
long onCmdRestrictLaneBikelane(FXObject *, FXSelector, void *)
restrict lane to bikes
void deleteSelectedLanes()
delete all currently selected lanes
long onCmdEditJunctionShape(FXObject *, FXSelector, void *)
edit junction shape
long onLeftBtnRelease(FXObject *, FXSelector, void *)
called when user releases mouse's left button
long onCmdShowGrid(FXObject *, FXSelector, void *)
toogle show grid
long onCmdSetModeCreateEdge(FXObject *, FXSelector, void *)
long onCmdSetModeDelete(FXObject *, FXSelector, void *)
called when user press the button for delete mode
void deleteSelectedEdges()
delete all currently selected edges
GNEUndoList * myUndoList
a reference to the undolist maintained in the application
EditMode myEditMode
the current edit mode
bool addRestrictedLane(SUMOVehicleClass vclass)
add restricted lane
MFXCheckableButton * myEditModePolygon
chekable button for edit mode polygon
FXMenuCheck * menuCheckSelectEdges
menu check to select only edges
GNEFrame * myCurrentFrame
the current frame
long onCmdRestrictLaneSidewalk(FXObject *, FXSelector, void *)
restrict lane to pedestrians
GNEPoly * getPolygonAtPopupPosition()
try to retrieve a polygon at popup position