/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2026 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 GUIDialog_Breakpoints.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @date Thu, 17 Jun 200417///18// Editor for simulation breakpoints19/****************************************************************************/20#pragma once21#include <config.h>2223#include <string>24#include <vector>25#include <memory>26#include <utils/foxtools/fxheader.h>27#include <utils/gui/div/GUIPersistentWindowPos.h>282930// ===========================================================================31// class definition32// ===========================================================================33/**34* @class GUIDialog_Breakpoints35* @brief Editor for simulation breakpoints36*37* This dialog shows and lets the user edit the list of breakpoints - simulation38* time steps where the simulation halts.39* @todo Use a LineReader instead of >> while reading40*/41class GUIDialog_Breakpoints : public FXMainWindow {42// FOX-declarations43FXDECLARE(GUIDialog_Breakpoints)4445public:46/** @brief Constructor47* @param[in] parent The parent window48*/49GUIDialog_Breakpoints(GUIApplicationWindow* parent, std::vector<SUMOTime>& breakpoints, FXMutex& breakpointLock, const SUMOTime simBegin);5051/// @brief Destructor52~GUIDialog_Breakpoints();5354/// @brief sets the focus after the window is created55void show();56using FXMainWindow::show; // to silence the warning C4266 about a hidden function5758/// @name FOX-callbacks59/// @{6061/// @brief keyboard functions62//@{63long onKeyPress(FXObject* o, FXSelector sel, void* data);64//@}6566/// @brief Called when the user presses the Load-button67long onCmdLoad(FXObject*, FXSelector, void*);6869/// @brief Called when the user presses the Save-button70long onCmdSave(FXObject*, FXSelector, void*);7172/// @brief Called when the user presses the Clear-button73long onCmdClear(FXObject*, FXSelector, void*);7475/// @brief Called when the user clicks a time link in the message window76long onCmdUpdateBreakpoints(FXObject*, FXSelector, void*);7778/// @brief Called when the user presses the Close-button79long onCmdClose(FXObject*, FXSelector, void*);8081/// @brief Called when the table was changed82long onCmdEditTable(FXObject*, FXSelector, void*);83/// @}8485virtual void layout();8687/// @brief Rebuilds the entire list88void rebuildList();8990protected:91/// @brief FOX need this92FOX_CONSTRUCTOR(GUIDialog_Breakpoints)9394private:9596/** @brief Builds a text representation of the items in the list97* @return Breakpoints encoded as a string98*/99std::string encode2TXT();100101/// @brief The list that holds the ids102FXTable* myTable;103104/// @brief The parent window105GUIApplicationWindow* myParent;106107/// @brief List of breakpoints108std::vector<SUMOTime>* myBreakpoints;109110/// @brief Lock for modifying the list of breakpoints111FXMutex* myBreakpointLock;112113/// @brief simulation begin114SUMOTime mySimBegin;115116/// @brief persisting the position on close117std::unique_ptr<GUIPersistentWindowPos> myPersistentPos;118};119120121