![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEFrame.h>


Public Member Functions | |
| void | abortDrawing () |
| abort drawing More... | |
| void | addNewPoint (const Position &P) |
| add new point to temporal shape More... | |
| DrawingMode (GNEFrame *frameParent) | |
| FOX-declaration. More... | |
| const PositionVector & | getTemporalShape () const |
| get Temporal shape More... | |
| void | hideDrawingMode () |
| hide Drawing mode More... | |
| bool | isDrawing () const |
| return true if currently a shape is drawed More... | |
| void | removeLastPoint () |
| remove last added point More... | |
| void | showDrawingMode () |
| show Drawing mode More... | |
| void | startDrawing () |
| start drawing More... | |
| void | stopDrawing () |
| stop drawing and create polygon or More... | |
| ~DrawingMode () | |
| destructor More... | |
FOX-callbacks | |
Called when the user press start drawing button | |
| long | onCmdStartDrawing (FXObject *, FXSelector, void *) |
| long | onCmdStopDrawing (FXObject *, FXSelector, void *) |
| Called when the user press stop drawing button. More... | |
| long | onCmdAbortDrawing (FXObject *, FXSelector, void *) |
| Called when the user press abort drawing button. More... | |
Protected Member Functions | |
| DrawingMode () | |
| FOX needs this. More... | |
Private Attributes | |
| FXButton * | myAbortDrawingButton |
| button for abort drawing More... | |
| GNEFrame * | myFrameParent |
| frame frame parent More... | |
| FXLabel * | myInformationLabel |
| Label with information. More... | |
| FXButton * | myStartDrawingButton |
| button for start drawing More... | |
| FXButton * | myStopDrawingButton |
| button for stop drawing More... | |
| PositionVector | myTemporalShapeShape |
| current drawed shape More... | |
Definition at line 213 of file GNEFrame.h.
| GNEFrame::DrawingMode::DrawingMode | ( | GNEFrame * | frameParent | ) |
FOX-declaration.
constructor
Definition at line 342 of file GNEFrame.cpp.
References GUIDesignButton, GUIDesignLabelFrameInformation, MID_GNE_POLYGONFRAME_ABORTDRAWING, MID_GNE_POLYGONFRAME_STARTDRAWING, MID_GNE_POLYGONFRAME_STOPDRAWING, myAbortDrawingButton, myInformationLabel, myStartDrawingButton, and myStopDrawingButton.
| GNEFrame::DrawingMode::~DrawingMode | ( | ) |
destructor
Definition at line 366 of file GNEFrame.cpp.
|
inlineprotected |
FOX needs this.
Definition at line 265 of file GNEFrame.h.
| void GNEFrame::DrawingMode::abortDrawing | ( | ) |
abort drawing
Definition at line 424 of file GNEFrame.cpp.
References GNEFrame::getViewNet(), myAbortDrawingButton, myFrameParent, myStartDrawingButton, myStopDrawingButton, and myTemporalShapeShape.
Referenced by GNEViewNet::abortOperation(), hideDrawingMode(), onCmdAbortDrawing(), showDrawingMode(), and stopDrawing().
| void GNEFrame::DrawingMode::addNewPoint | ( | const Position & | P | ) |
add new point to temporal shape
Definition at line 436 of file GNEFrame.cpp.
References myStopDrawingButton, and myTemporalShapeShape.
Referenced by GNEPolygonFrame::processClick().
| const PositionVector & GNEFrame::DrawingMode::getTemporalShape | ( | ) | const |
get Temporal shape
Definition at line 458 of file GNEFrame.cpp.
References myTemporalShapeShape.
Referenced by GNEViewNet::doPaintGL().
| void GNEFrame::DrawingMode::hideDrawingMode | ( | ) |
hide Drawing mode
Definition at line 377 of file GNEFrame.cpp.
References abortDrawing().
Referenced by GNEPolygonFrame::onCmdSelectShape().
| bool GNEFrame::DrawingMode::isDrawing | ( | ) | const |
return true if currently a shape is drawed
Definition at line 464 of file GNEFrame.cpp.
References myStopDrawingButton.
Referenced by GNEViewNet::doPaintGL(), GNEViewNet::hotkeyEnter(), GNEViewNet::onRightBtnPress(), GNEViewNet::onRightBtnRelease(), and GNEPolygonFrame::processClick().
| long GNEFrame::DrawingMode::onCmdAbortDrawing | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user press abort drawing button.
Definition at line 484 of file GNEFrame.cpp.
References abortDrawing().
| long GNEFrame::DrawingMode::onCmdStartDrawing | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Definition at line 470 of file GNEFrame.cpp.
References startDrawing().
| long GNEFrame::DrawingMode::onCmdStopDrawing | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user press stop drawing button.
Definition at line 477 of file GNEFrame.cpp.
References stopDrawing().
| void GNEFrame::DrawingMode::removeLastPoint | ( | ) |
remove last added point
Definition at line 446 of file GNEFrame.cpp.
References myStopDrawingButton, and myTemporalShapeShape.
Referenced by GNEViewNet::onRightBtnPress().
| void GNEFrame::DrawingMode::showDrawingMode | ( | ) |
show Drawing mode
Definition at line 369 of file GNEFrame.cpp.
References abortDrawing().
Referenced by GNEPolygonFrame::onCmdSelectShape().
| void GNEFrame::DrawingMode::startDrawing | ( | ) |
start drawing
Definition at line 386 of file GNEFrame.cpp.
References myAbortDrawingButton, myStartDrawingButton, and myStopDrawingButton.
Referenced by GNEViewNet::hotkeyEnter(), and onCmdStartDrawing().
| void GNEFrame::DrawingMode::stopDrawing | ( | ) |
stop drawing and create polygon or
NOTE: This solution using dynamic_cast is provisional, and has to be changed for task #1112.
Definition at line 398 of file GNEFrame.cpp.
References abortDrawing(), PositionVector::closePolygon(), GNEFrame::getNeteditAttributes(), GNEFrame::getViewNet(), GNEFrame::NeteditAttributes::isCloseShapeEnabled(), myAbortDrawingButton, myFrameParent, myStartDrawingButton, myStopDrawingButton, and myTemporalShapeShape.
Referenced by GNEViewNet::hotkeyEnter(), and onCmdStopDrawing().
|
private |
button for abort drawing
Definition at line 278 of file GNEFrame.h.
Referenced by abortDrawing(), DrawingMode(), startDrawing(), and stopDrawing().
|
private |
frame frame parent
Definition at line 269 of file GNEFrame.h.
Referenced by abortDrawing(), and stopDrawing().
|
private |
|
private |
button for start drawing
Definition at line 272 of file GNEFrame.h.
Referenced by abortDrawing(), DrawingMode(), startDrawing(), and stopDrawing().
|
private |
button for stop drawing
Definition at line 275 of file GNEFrame.h.
Referenced by abortDrawing(), addNewPoint(), DrawingMode(), isDrawing(), removeLastPoint(), startDrawing(), and stopDrawing().
|
private |
current drawed shape
Definition at line 284 of file GNEFrame.h.
Referenced by abortDrawing(), addNewPoint(), getTemporalShape(), removeLastPoint(), and stopDrawing().