SUMO - Simulation of Urban MObility
GNEFrame::DrawingShape Class Reference

#include <GNEFrame.h>

Inheritance diagram for GNEFrame::DrawingShape:
Inheritance graph
Collaboration diagram for GNEFrame::DrawingShape:
Collaboration graph

Public Member Functions

void abortDrawing ()
 abort drawing More...
 
void addNewPoint (const Position &P)
 add new point to temporal shape More...
 
 DrawingShape (GNEFrame *frameParent)
 FOX-declaration. More...
 
bool getDeleteLastCreatedPoint ()
 get flag delete last created point More...
 
const PositionVectorgetTemporalShape () const
 get Temporal shape More...
 
void hideDrawingShape ()
 hide Drawing mode More...
 
bool isDrawing () const
 return true if currently a shape is drawed More...
 
void removeLastPoint ()
 remove last added point More...
 
void setDeleteLastCreatedPoint (bool value)
 enable or disable delete last created point More...
 
void showDrawingShape ()
 show Drawing mode More...
 
void startDrawing ()
 start drawing More...
 
void stopDrawing ()
 stop drawing and check if shape can be created More...
 
 ~DrawingShape ()
 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

 DrawingShape ()
 FOX needs this. More...
 

Private Attributes

FXButton * myAbortDrawingButton
 button for abort drawing More...
 
bool myDeleteLastCreatedPoint
 flag to enable/disable delete point mode More...
 
GNEFramemyFrameParent
 pointer to 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...
 

Detailed Description

Definition at line 376 of file GNEFrame.h.

Constructor & Destructor Documentation

◆ DrawingShape() [1/2]

GNEFrame::DrawingShape::DrawingShape ( GNEFrame frameParent)

◆ ~DrawingShape()

GNEFrame::DrawingShape::~DrawingShape ( )

destructor

Definition at line 1219 of file GNEFrame.cpp.

◆ DrawingShape() [2/2]

GNEFrame::DrawingShape::DrawingShape ( )
inlineprotected

FOX needs this.

Definition at line 434 of file GNEFrame.h.

Member Function Documentation

◆ abortDrawing()

◆ addNewPoint()

void GNEFrame::DrawingShape::addNewPoint ( const Position P)

add new point to temporal shape

Definition at line 1281 of file GNEFrame.cpp.

References myStopDrawingButton, and myTemporalShapeShape.

Referenced by GNEPolygonFrame::processClick(), and GNETAZFrame::processClick().

◆ getDeleteLastCreatedPoint()

bool GNEFrame::DrawingShape::getDeleteLastCreatedPoint ( )

get flag delete last created point

Definition at line 1315 of file GNEFrame.cpp.

References myDeleteLastCreatedPoint.

Referenced by GNEViewNet::drawTemporalDrawShape(), GNEPolygonFrame::processClick(), and GNETAZFrame::processClick().

◆ getTemporalShape()

const PositionVector & GNEFrame::DrawingShape::getTemporalShape ( ) const

get Temporal shape

Definition at line 1297 of file GNEFrame.cpp.

References myTemporalShapeShape.

Referenced by GNEPolygonFrame::buildShape(), GNETAZFrame::buildShape(), and GNEViewNet::drawTemporalDrawShape().

◆ hideDrawingShape()

void GNEFrame::DrawingShape::hideDrawingShape ( )

hide Drawing mode

Definition at line 1230 of file GNEFrame.cpp.

References abortDrawing().

Referenced by GNEPolygonFrame::disableModuls(), GNEPolygonFrame::enableModuls(), and GNETAZFrame::TAZCurrent::setTAZ().

◆ isDrawing()

◆ onCmdAbortDrawing()

long GNEFrame::DrawingShape::onCmdAbortDrawing ( FXObject *  ,
FXSelector  ,
void *   
)

Called when the user press abort drawing button.

Definition at line 1335 of file GNEFrame.cpp.

References abortDrawing().

◆ onCmdStartDrawing()

long GNEFrame::DrawingShape::onCmdStartDrawing ( FXObject *  ,
FXSelector  ,
void *   
)

Definition at line 1321 of file GNEFrame.cpp.

References startDrawing().

◆ onCmdStopDrawing()

long GNEFrame::DrawingShape::onCmdStopDrawing ( FXObject *  ,
FXSelector  ,
void *   
)

Called when the user press stop drawing button.

Definition at line 1328 of file GNEFrame.cpp.

References stopDrawing().

◆ removeLastPoint()

void GNEFrame::DrawingShape::removeLastPoint ( )

remove last added point

Definition at line 1291 of file GNEFrame.cpp.

Referenced by GNEPolygonFrame::processClick(), and GNETAZFrame::processClick().

◆ setDeleteLastCreatedPoint()

void GNEFrame::DrawingShape::setDeleteLastCreatedPoint ( bool  value)

enable or disable delete last created point

Definition at line 1309 of file GNEFrame.cpp.

References myDeleteLastCreatedPoint.

Referenced by GNEViewNet::onKeyPress(), GNEViewNet::onKeyRelease(), and GNEViewNet::onMouseMove().

◆ showDrawingShape()

void GNEFrame::DrawingShape::showDrawingShape ( )

show Drawing mode

Definition at line 1222 of file GNEFrame.cpp.

References abortDrawing().

Referenced by GNEPolygonFrame::enableModuls(), and GNETAZFrame::TAZCurrent::setTAZ().

◆ startDrawing()

void GNEFrame::DrawingShape::startDrawing ( )

start drawing

Definition at line 1239 of file GNEFrame.cpp.

References myAbortDrawingButton, myStartDrawingButton, and myStopDrawingButton.

Referenced by GNEViewNet::hotkeyEnter(), and onCmdStartDrawing().

◆ stopDrawing()

void GNEFrame::DrawingShape::stopDrawing ( )

Field Documentation

◆ myAbortDrawingButton

FXButton* GNEFrame::DrawingShape::myAbortDrawingButton
private

button for abort drawing

Definition at line 453 of file GNEFrame.h.

Referenced by abortDrawing(), DrawingShape(), startDrawing(), and stopDrawing().

◆ myDeleteLastCreatedPoint

bool GNEFrame::DrawingShape::myDeleteLastCreatedPoint
private

flag to enable/disable delete point mode

Definition at line 441 of file GNEFrame.h.

Referenced by getDeleteLastCreatedPoint(), and setDeleteLastCreatedPoint().

◆ myFrameParent

GNEFrame* GNEFrame::DrawingShape::myFrameParent
private

pointer to frame parent

Definition at line 438 of file GNEFrame.h.

Referenced by abortDrawing(), and stopDrawing().

◆ myInformationLabel

FXLabel* GNEFrame::DrawingShape::myInformationLabel
private

Label with information.

Definition at line 456 of file GNEFrame.h.

Referenced by DrawingShape().

◆ myStartDrawingButton

FXButton* GNEFrame::DrawingShape::myStartDrawingButton
private

button for start drawing

Definition at line 447 of file GNEFrame.h.

Referenced by abortDrawing(), DrawingShape(), startDrawing(), and stopDrawing().

◆ myStopDrawingButton

FXButton* GNEFrame::DrawingShape::myStopDrawingButton
private

button for stop drawing

Definition at line 450 of file GNEFrame.h.

Referenced by abortDrawing(), addNewPoint(), DrawingShape(), isDrawing(), startDrawing(), and stopDrawing().

◆ myTemporalShapeShape

PositionVector GNEFrame::DrawingShape::myTemporalShapeShape
private

current drawed shape

Definition at line 444 of file GNEFrame.h.

Referenced by abortDrawing(), addNewPoint(), getTemporalShape(), and stopDrawing().


The documentation for this class was generated from the following files: