/****************************************************************************/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 GNERunDialog.h14/// @author Pablo Alvarez Lopez15/// @date Aug 202516///17// Abstract dialog for running tools18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/dialogs/GNEDialog.h>23#include <utils/foxtools/MFXSynchQue.h>24#include <utils/foxtools/MFXThreadEvent.h>2526// ===========================================================================27// class declarations28// ===========================================================================2930class GUIEvent;3132// ===========================================================================33// class definitions34// ===========================================================================3536class GNERunDialog : public GNEDialog {37/// @brief FOX-declaration38FXDECLARE_ABSTRACT(GNERunDialog)3940public:41/// @brief Constructor42GNERunDialog(GNEApplicationWindow* applicationWindow,43const std::string& name, GUIIcon titleIcon);4445/// @brief destructor46~GNERunDialog();4748/// @brief run internal test49virtual void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument) = 0;5051/// @brief get run command52virtual std::string getRunCommand() const = 0;5354/// @brief add event in the queue55void addEvent(GUIEvent* event, const bool signal);5657/// @name FOX-callbacks58/// @{5960/// @brief event after press abort button61long onCmdAbort(FXObject*, FXSelector, void*);6263/// @brief event after press rerun button64long onCmdRun(FXObject*, FXSelector, void*);6566/// @brief event after press back button67virtual long onCmdBack(FXObject*, FXSelector, void*) = 0;6869/// @brief event after press close button70virtual long onCmdAccept(FXObject*, FXSelector, void*) = 0;7172/// @brief event after press save button73long onCmdSaveLog(FXObject*, FXSelector, void*);7475/// @brief called when the thread signals an event76long onThreadEvent(FXObject*, FXSelector, void*);7778/// @}7980protected:81/// @brief FOX needs this82FOX_CONSTRUCTOR(GNERunDialog);8384/// @brief text85FXText* myText = nullptr;8687/// @brief List of received events88MFXSynchQue<GUIEvent*> myEvents;8990/// @brief io-event with the runner thread91FXEX::MFXThreadEvent myThreadEvent;9293/// @brief flag to check if there is an error94bool myError = false;9596/// @brief update dialog buttons97void updateDialogButtons();9899private:100/// @brief Invalidated copy constructor.101GNERunDialog(const GNERunDialog&) = delete;102103/// @brief Invalidated assignment operator.104GNERunDialog& operator=(const GNERunDialog&) = delete;105};106107108