51 myFrameParent(frameParent),
52 myDeleteLastCreatedPoint(false) {
58 std::ostringstream information;
60 <<
"- " <<
TL(
"'Start drawing' or ENTER to create a shape.") <<
"\n"
61 <<
"- " <<
TL(
"'Stop drawing' or ENTER to finish shape creation.") <<
"\n"
62 <<
"- " <<
TL(
"'Abort drawing' or ESC to abort shape creation.") <<
"\n"
63 <<
"- " <<
TL(
"'Shift + Click' to remove the last inserted point.");
66 myStopDrawingButton->disable();
67 myAbortDrawingButton->disable();
78 MFXGroupBoxModule::show();
86 MFXGroupBoxModule::hide();
135 throw ProcessError(
TL(
"A new point cannot be added if drawing wasn't started"));
FXDEFMAP(GNEDrawingShape) DrawingShapeMap[]
@ MID_GNE_STARTDRAWING
start drawing polygon
@ MID_GNE_ABORTDRAWING
abort drawing polygon
@ MID_GNE_STOPDRAWING
stop drawing polygon
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
void startDrawing()
start drawing
GNEFrame * myFrameParent
pointer to frame parent
bool isDrawing() const
return true if currently a shape is drawed
FXButton * myStartDrawingButton
button for start drawing
FXButton * myAbortDrawingButton
button for abort drawing
void addNewPoint(const Position &P)
add new point to temporal shape
bool getDeleteLastCreatedPoint()
get flag delete last created point
void abortDrawing()
abort drawing
bool myDeleteLastCreatedPoint
flag to enable/disable delete point mode
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
~GNEDrawingShape()
destructor
long onCmdAbortDrawing(FXObject *, FXSelector, void *)
Called when the user press abort drawing button.
PositionVector myTemporalShape
current drawed shape
void removeLastPoint()
remove last added point
long onCmdStartDrawing(FXObject *, FXSelector, void *)
FXButton * myStopDrawingButton
button for stop drawing
void showDrawingShape()
show Drawing mode
void stopDrawing()
stop drawing and check if shape can be created
void hideDrawingShape()
hide Drawing mode
long onCmdStopDrawing(FXObject *, FXSelector, void *)
Called when the user press stop drawing button.
const PositionVector & getTemporalShape() const
get Temporal shape
GNEViewNet * getViewNet() const
get view net
virtual bool shapeDrawed()
build a shaped element using the drawed shape
void updateViewNet(const bool ignoreViewUpdater=true) const
Mark the entire GNEViewNet to be repainted later.
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
A list item which allows for custom coloring.
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.