46 FXIMPLEMENT(
GNECreateEdgeFrame, FXVerticalFrame, GNECreateEdgeFrameMap, ARRAYNUMBER(GNECreateEdgeFrameMap))
59 myCreateEdgeSource(
nullptr) {
93 std::cout <<
"edge created without an open CommandGroup )-:\n";
FXDEFMAP(GNECreateEdgeFrame) GNECreateEdgeFrameMap[]
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_NMODE_INSPECT
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button discards any edge modifications.
void markAsCreateEdgeSource()
marks as first junction in createEdge-mode
GNEViewParent * getViewParent() const
get the net object
void abortEdgeCreation()
abort current edge creation
~GNECreateEdgeFrame()
Destructor.
void processClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool oppositeEdge, bool chainEdge)
handle processClick and set the relative colouring
GNEEdge * createEdge(GNEJunction *src, GNEJunction *dest, GNEEdge *tpl, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false, bool recomputeConnections=true)
creates a new edge (unless an edge with the same geometry already exists)
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 hide()
hide prohibition frame
C++ TraCI client API implementation.
GNEViewNet * myViewNet
View Net.
NBEdge * getNBEdge() const
returns the internal NBEdge
GNEUndoList * getUndoList() const
get the undoList object
bool hasCommandGroup() const
Check if undoList has command group.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GNEJunction * getJunctionFront() const
get front junction (or a pointer to nullptr if there isn't)
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.
A point in 2D or 3D with translation and scaling methods.
const std::string & getID() const
class used to group all variables related with objects under cursor after a click over view ...
void unMarkAsCreateEdgeSource()
removes mark as first junction in createEdge-mode
void setCreatedJunction(GNEJunction *junction)
set created junction
GNEJunction * createJunction(const Position &pos, GNEUndoList *undoList)
creates a new junction
begin/end of the description of an edge
A road/street connecting two junctions (netedit-version)
virtual void show()
show Frame
GNEJunction * myCreateEdgeSource
source junction for new edge
long onCmdOK(FXObject *, FXSelector, void *)
TemplateEditor * getTemplateEditor() const
get template editor
virtual void hide()
hide Frame
GNENet * getNet() const
get the net object
void setStatusBarText(const std::string &text)
set staturBar text
void show()
show prohibition frame
GNEEdge * getEdgeTemplate() const
get the template edge (to copy attributes from)