 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef GNEViewNetHelper_h
17 #define GNEViewNetHelper_h
267 void update(
void* eventData);
MFXCheckableButton * demandButton
chekable button for supermode Demand
bool isMovingSelection() const
check if currently there is element being moved
EditModes & operator=(const EditModes &)=delete
Invalidated assignment operator.
GNEPoly * getPolyFront() const
get front Poly (or a pointer to nullptr if there isn't)
FXMenuCheck * menuCheckShowGrid
menu check to show grid button
An Element which don't belongs to GNENet but has influency in the simulation.
EditShapes(GNEViewNet *viewNet)
default constructor
@ GNE_DMODE_VEHICLETYPES
Mode for editing vehicle types.
std::vector< GNELane * > myLanes
vector with the clicked lanes
An Element which don't belongs to GNENet but has influency in the simulation.
std::map< GNEEdge *, MoveSingleElementValues * > myMovedEgdesGeometryPoints
container used for move GeometryPoints of edges
bool shiftKeyPressed() const
check if SHIFT key was pressed during click
DemandEditMode
@brie enum for demand edit modes
void moveSelection()
move selection
CommonViewOptions(GNEViewNet *viewNet)
default constructor
@ GNE_DMODE_PERSONPLAN
Mode for editing person plan.
std::vector< GNEDemandElement * > myDemandElements
vector with the clicked demand elements
bool calculateTAZValues()
calculate TAZ movement values (Position, Index, etc.)
void processShapeSelection(const PositionVector &shape)
process shape selection
GNEPOI * myPOIToMove
the poi which position is being moved
std::vector< GNEJunction * > myJunctions
vector with the clicked junctions
std::vector< GNEPoly * > myPolys
vector with the clicked Polys
FXMenuCheck * menuCheckShowAllPersonPlans
show all person plans
GNEPOI * getPOIFront() const
get front POI (or a pointer to nullptr if there isn't)
NetworkViewOptions & operator=(const NetworkViewOptions &)=delete
Invalidated assignment operator.
struct used to group all variables related with movement of groups of elements
GNEDemandElement * myDemandElementToMove
the demand element which position is being moved
void lockPerson(const GNEDemandElement *person)
lock person
const GNEDemandElement * getLockedPerson() const
get locked person
FXMenuCheck * menuCheckShowDemandElements
menu check to show Demand Elements
bool myTestingEnabled
flag to enable or disable testing mode
GNEPoly * myPolyToMove
the poly of which geometry is being moved
std::vector< GNEEdge * > myEdges
vector with the clicked edges
class used to group all variables related with key pressed after certain events
A NBNetBuilder extended by visualisation and editing capabilities.
@ GNE_DMODE_ROUTE
Mode for editing routes.
bool controlKeyPressed() const
check if CONTROL key was pressed during click
void hideDemandViewOptionsMenuChecks()
hide all options menu checks
void getVisibleDemandMenuCommands(std::vector< FXMenuCheck * > &commands) const
get visible demand menu commands
GNEPoly * editedShapePoly
polygon used for edit shapes
struct used to group all variables related to view options in supermode Demand
Position myClickedPosition
original clicked position when moveSelection is called (used for calculate offset during moveSelectio...
void updateObjectUnderCursor(const std::vector< GUIGlObject * > &GUIGlObjects, GNEPoly *editedPolyShape)
update objects under cursor (Called only in onLeftBtnPress(...) function)
@ GNE_DMODE_NONE
empty Demand mode
std::vector< GNEAdditional * > myAdditionals
vector with the clicked additional elements
@ GNE_DMODE_INSPECT
mode for inspecting demand elements
void setNetworkEditMode(NetworkEditMode networkMode, bool force=false)
set Network edit mode
GNEViewNet * myViewNet
pointer to viewNet
TestingMode(GNEViewNet *viewNet)
default constructor
GNETAZ * getTAZFront() const
get front TAZ (or a pointer to nullptr if there isn't)
std::vector< GUIGlObject * > myGUIGlObjects
vector with the clicked GUIGlObjects
@ GNE_DMODE_PERSONTYPES
Mode for editing person types.
ObjectsUnderCursor(const ObjectsUnderCursor &)=delete
Invalidated copy constructor.
void hideCommonViewOptionsMenuChecks()
hide all options menu checks
bool showDemandElements() const
check if show demand elements checkbox is enabled
bool calculateEdgeValues()
calculate Edge movement values (Position, Index, etc.)
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
GNEViewNet * myViewNet
pointer to viewNet
GNETAZ * myTAZToMove
the TAZ element which their Shape is being moved (it's the only additional with a shape instead a pos...
GUIGlID getGlIDFront() const
get front GUI GL ID (or a pointer to nullptr if there isn't)
VehicleOptions(GNEViewNet *viewNet)
constructor
@ GNE_NMODE_CREATE_EDGE
mode for creating new edges
void drawTestingElements(GUIMainWindow *mainWindow)
draw testing element
DemandEditMode demandEditMode
the current Demand edit mode
NetworkViewOptions(const NetworkViewOptions &)=delete
Invalidated copy constructor.
@ GNE_NMODE_TLS
mode for editing tls
FXMenuCheck * menuCheckShowJunctionBubble
menu check to show connection as buuble in "Move" mode.
KeyPressed & operator=(const KeyPressed &)=delete
Invalidated assignment operator.
bool selectingUsingRectangle
whether we have started rectangle-selection
GNEAdditional * myAdditionalToMove
the additional element which position is being moved
NetworkEditMode myPreviousNetworkEditMode
the previous edit mode before edit NetElement's shapes
GNEViewNet * myViewNet
pointer to viewNet
@ GNE_NMODE_POLYGON
Mode for editing Polygons.
A single child window which contains a view of the simulation area.
void moveRectangleSelection()
move rectangle selection
FXMenuCheck * menuCheckExtendSelection
menu check to extend to edge nodes
GNEViewNet * myViewNet
pointer to viewNet
@ GNE_NMODE_DELETE
mode for deleting network elements
DemandViewOptions(GNEViewNet *viewNet)
default constructor
PositionVector originalShapeBeforeMoving
original shape of element before start moving (used by polygons, edges, etc., needed for commmit posi...
struct used to group all variables related with testing
int movingIndexShape
index moved
A road/street connecting two junctions (netedit-version)
bool myMovingSelection
flag to check if a selection is being moved
void unlockPerson()
unlock person
bool isTestingEnabled() const
check if testing mode is enabled
@ GNE_NMODE_ADDITIONAL
Mode for editing additionals.
void buildDemandViewOptionsMenuChecks()
build menu checks
GNEJunction * myJunctionToMove
the Junction to be moved.
FXMenuCheck * menuCheckShowConnections
menu check to show connections
@ GNE_DMODE_SELECT
mode for selecting demand elements
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
@ GNE_NMODE_TAZ
Mode for editing TAZ.
std::vector< GNEPOI * > myPOIs
vector with the clicked POIs
void setSupermode(Supermode supermode)
set Network edit mode
void finishMoveSingleElement()
finish moving single elements in Network AND Demand mode
void drawRectangleSelection(const RGBColor &color) const
draw rectangle selection
void beginRectangleSelection()
begin rectangle selection
FXMenuCheck * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
void processBoundarySelection(const Boundary &boundary)
Process boundary Selection.
@ GNE_DMODE_PERSON
Mode for editing person.
void buildSuperModeButtons()
build checkable buttons
GNEViewNet * myViewNet
pointer to viewNet
struct used to group all variables related with Supermodes
class used to group all variables related with objects under cursor after a click over view
GNEViewNet * myViewNet
pointer to viewNet
Position originalPositionInView
original position of geometry position (needed for commmit position changes)
SelectingArea(GNEViewNet *viewNet)
default constructor
struct used to group all variables related with movement of single elements
struct used to group all variables related to view options in all supermodes
void beginMoveSelection(GNEAttributeCarrier *originAC)
begin move selection
void processRectangleSelection()
process rectangle Selection
std::vector< GNETAZ * > myTAZs
vector with the clicked TAZ elements (needed because uses a shape instead a position)
A class that stores a 2D geometrical boundary.
bool beginMoveSingleElementNetworkMode()
begin move single element in Network mode
GNEViewNet * myViewNet
pointer to viewNet
@ GNE_NMODE_SELECT
mode for selecting network elements
@ GNE_SUPERMODE_NETWORK
Network mode (Edges, junctions, etc..)
Supermode currentSupermode
the current supermode
bool startDrawing
whether we have started rectangle-selection
GNEViewNet * myViewNet
pointer to viewNet
A point in 2D or 3D with translation and scaling methods.
@ GNE_NMODE_CONNECT
mode for connecting lanes
void getVisibleCommonMenuCommands(std::vector< FXMenuCheck * > &commands) const
get visible common menu commands
void getVisibleNetworkMenuCommands(std::vector< FXMenuCheck * > &commands) const
get visible network menu commands
void finishMoveSelection()
finish moving selection
bool editingElevation() const
check if we're editing elevation
KeyPressed(const KeyPressed &)=delete
Invalidated copy constructor.
GNEConnection * getConnectionFront() const
get front connection (or a pointer to nullptr if there isn't)
Supermode
@brie enum for supermodes
void initTestingMode()
init testing mode
bool showConnections() const
check if select show connections checkbox is enabled
struct used to group all variables related with movement of groups of elements
FXMenuCheck * menuCheckWarnAboutMerge
menu check to we should warn about merging junctions
bool showShapes() const
check if shapes has to be hide
void buildNetworkViewOptionsMenuChecks()
build menu checks
GNEEdge * myEdgeToMove
the edge of which geometry is being moved
NetworkEditMode
@brie enum for network edit modes
void startEditCustomShape(GNENetElement *element, const PositionVector &shape, bool fill)
start edit custom shape
void hideNetworkViewOptionsMenuChecks()
hide all options menu checks
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
struct used to group all variables related with edit shapes of NetElements
void update(void *eventData)
update status of KeyPressed
GNEViewNet * myViewNet
pointer to viewNet
ObjectsUnderCursor()
constructor
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type (or a pointer to nullptr if there isn't)
@ GNE_DMODE_VEHICLE
Mode for editing vehicles.
void saveEditedShape()
save edited shape
bool showNonInspectedDemandElements(const GNEDemandElement *demandElement) const
check if non inspected element has to be hidden
@ GNE_NMODE_CROSSING
Mode for editing crossing.
struct used to group all variables related to view options in supermode Network
@ GNE_NMODE_PROHIBITION
Mode for editing connection prohibitions.
int myTestingWidth
Width of viewNet in testing mode.
std::vector< GNEEdge * > processEdgeRectangleSelection()
process rectangle Selection (only limited to Edges)
FXMenuCheck * menuCheckHideConnections
menu check to hide connections in connect mode
VehicleTypeOptions(GNEViewNet *viewNet)
constructor
void moveSingleElement()
move single element in Network AND Demand mode
CommonViewOptions & operator=(const CommonViewOptions &)=delete
Invalidated assignment operator.
NetworkViewOptions(GNEViewNet *viewNet)
default constructor
DemandViewOptions & operator=(const DemandViewOptions &)=delete
Invalidated assignment operator.
bool calculatePolyValues()
calculate Poly movement values (Position, Index, etc.)
@ GNE_SUPERMODE_DEMAND
Demanding mode (Routes, Vehicles etc..)
std::vector< GNECrossing * > myCrossings
vector with the clicked crossings
std::vector< GNEShape * > myShapes
vector with the clicked shape elements (Poly and POIs)
struct used to group all variables related with movement of groups of elements
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
CommonViewOptions(const CommonViewOptions &)=delete
Invalidated copy constructor.
struct used to group all variables related with selecting using a square or polygon
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
bool selectEdges() const
check if select edges checkbox is enabled
MoveMultipleElementValues(GNEViewNet *viewNet)
constructor
FXMenuCheck * menuCheckAutoOppositeEdge
menu check to create auto create opposite edge
GNECrossing * getCrossingFront() const
get front crossing (or a pointer to nullptr if there isn't)
EditModes(GNEViewNet *viewNet)
default constructor
GNEViewNet * myViewNet
pointer to viewNet
std::map< GNEJunction *, Position > myMovedJunctionOriginPositions
container used for move junctions
void hideVehicleOptionsMenuChecks()
hide all options menu checks
FXEvent * myEventInfo
information of event
Position myRelativeClickedPosition
relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user does...
void buildVehicleOptionsMenuChecks()
build menu checks
std::vector< GNEAttributeCarrier * > myAttributeCarriers
vector with the clicked attribute carriers
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
FXMenuCheck * menuCheckChainEdges
menu check to the endpoint for a created edge should be set as the new source
DemandViewOptions(const DemandViewOptions &)=delete
Invalidated copy constructor.
@ GNE_SUPERMODE_NONE
empty super mode
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers() const
get vector with clicked ACs
MoveSingleElementValues(GNEViewNet *viewNet)
constructor
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
FXMenuCheck * menuCheckChangeAllPhases
menu check to set change all phases
@ GNE_DMODE_MOVE
mode for moving demand elements
Position selectionCorner1
firstcorner of the rectangle-selection
ObjectsUnderCursor & operator=(const ObjectsUnderCursor &)=delete
Invalidated assignment operator.
void setDemandEditMode(DemandEditMode demandMode, bool force=false)
set Demand edit mode
std::vector< GNENetElement * > myNetElements
vector with the clicked net elements
GNEViewNet * myViewNet
pointer to viewNet
FXMenuCheck * menuCheckHideShapes
Hide shapes (Polygons and POIs)
Position selectionCorner2
second corner of the rectangle-selection
bool showAllPersonPlans() const
check all person plans has to be show
bool myMovingEndPos
bool to indicate that end pos of an edge is being moved
bool editingNetElementShapes
flag to edit net element shapes
EditModes(const EditModes &)=delete
Invalidated copy constructor.
@ GNE_NMODE_INSPECT
mode for inspecting network elements
void stopEditCustomShape()
edit edit shape
int myTestingHeight
Height of viewNet in testing mode.
std::map< GNEEdge *, PositionVector > myMovedEdgesOriginShape
container used for move entire edges
NetworkEditMode networkEditMode
the current Network edit mode
GNEShape * getShapeFront() const
get front shape element (or a pointer to nullptr if there isn't)
MFXCheckableButton * networkButton
chekable button for supermode Network
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
@ GNE_DMODE_DELETE
mode for deleting demand elements
std::vector< GNEConnection * > myConnections
vector with the clicked connections
@ GNE_NMODE_MOVE
mode for moving network elements
@ GNE_DMODE_STOP
Mode for editing stops.
void sortGUIGlObjectsByAltitude(const std::vector< GUIGlObject * > &GUIGlObjects)
invert GUIGlObjects
@ GNE_NMODE_NONE
empty Network mode
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
void buildCommonViewOptionsMenuChecks()
build menu checks
FXMenuCheck * menuCheckLockPerson
Lock Person.
FXMenuCheck * menuCheckMoveElevation
menu check to apply movement to elevation
void hideVehicleTypeOptionsMenuChecks()
hide all options menu checks
void swapLane2Edge()
swap lane to edge
void finishRectangleSelection()
finish rectangle selection
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
bool myMovingStartPos
bool to indicate that startPos of an edge is being moved
const GNEDemandElement * myLockedPerson
pointer to locked person
void buildVehicleTypeOptionsMenuChecks()
build menu checks
FXMenuCheck * menuCheckSelectEdges
menu check to select only edges
GNENetElement * getNetElementFront() const
get front net element (or a pointer to nullptr if there isn't)