/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GNEDrawingShape.h14/// @author Pablo Alvarez Lopez15/// @date Mar 202216///17// Frame for draw shapes18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/foxtools/MFXGroupBoxModule.h>2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNEFrame;2930// ===========================================================================31// class definitions32// ===========================================================================3334class GNEDrawingShape : public MFXGroupBoxModule {35/// @brief FOX-declaration36FXDECLARE(GNEDrawingShape)3738public:39/// @brief constructor40GNEDrawingShape(GNEFrame* frameParent);4142/// @brief destructor43~GNEDrawingShape();4445/// @brief show Drawing mode46void showDrawingShape();4748/// @brief hide Drawing mode49void hideDrawingShape();5051/// @brief start drawing52void startDrawing();5354/// @brief stop drawing and check if shape can be created55void stopDrawing();5657/// @brief abort drawing58void abortDrawing();5960/// @brief add new point to temporal shape61void addNewPoint(const Position& P);6263/// @brief remove last added point64void removeLastPoint();6566/// @brief get Temporal shape67const PositionVector& getTemporalShape() const;6869/// @brief return true if currently a shape is drawed70bool isDrawing() const;7172/// @brief enable or disable delete last created point73void setDeleteLastCreatedPoint(bool value);7475/// @brief get flag delete last created point76bool getDeleteLastCreatedPoint();7778/// @name FOX-callbacks79/// @{80/// @brief Called when the user press start drawing button81long onCmdStartDrawing(FXObject*, FXSelector, void*);8283/// @brief Called when the user press stop drawing button84long onCmdStopDrawing(FXObject*, FXSelector, void*);8586/// @brief Called when the user press abort drawing button87long onCmdAbortDrawing(FXObject*, FXSelector, void*);88/// @}8990protected:91FOX_CONSTRUCTOR(GNEDrawingShape)9293private:94/// @brief pointer to frame parent95GNEFrame* myFrameParent;9697/// @brief flag to enable/disable delete point mode98bool myDeleteLastCreatedPoint;99100/// @brief current drawed shape101PositionVector myTemporalShape;102103/// @brief button for start drawing104FXButton* myStartDrawingButton;105106/// @brief button for stop drawing107FXButton* myStopDrawingButton;108109/// @brief button for abort drawing110FXButton* myAbortDrawingButton;111112/// @brief Label with information113FXLabel* myInformationLabel;114};115116117