Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIDialog_Breakpoints.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
19// Editor for simulation breakpoints
20/****************************************************************************/
21#pragma once
22#include <config.h>
23
24#include <string>
25#include <vector>
26#include <memory>
29
30
31// ===========================================================================
32// class definition
33// ===========================================================================
42class GUIDialog_Breakpoints : public FXMainWindow {
43 // FOX-declarations
44 FXDECLARE(GUIDialog_Breakpoints)
45
46public:
50 GUIDialog_Breakpoints(GUIApplicationWindow* parent, std::vector<SUMOTime>& breakpoints, FXMutex& breakpointLock, const SUMOTime simBegin);
51
54
56 void show();
57 using FXMainWindow::show; // to silence the warning C4266 about a hidden function
58
61
63 long onCmdLoad(FXObject*, FXSelector, void*);
64
66 long onCmdSave(FXObject*, FXSelector, void*);
67
69 long onCmdClear(FXObject*, FXSelector, void*);
70
72 long onCmdUpdateBreakpoints(FXObject*, FXSelector, void*);
73
75 long onCmdClose(FXObject*, FXSelector, void*);
76
78 long onCmdEditTable(FXObject*, FXSelector, void*);
80
81 virtual void layout();
82
84 void rebuildList();
85
86protected:
88 FOX_CONSTRUCTOR(GUIDialog_Breakpoints)
89
90private:
91
95 std::string encode2TXT();
96
98 FXTable* myTable;
99
102
104 std::vector<SUMOTime>* myBreakpoints;
105
108
111
113 std::unique_ptr<GUIPersistentWindowPos> myPersistentPos;
114};
long long int SUMOTime
Definition GUI.h:36
The main window of the SUMO-gui.
Editor for simulation breakpoints.
long onCmdUpdateBreakpoints(FXObject *, FXSelector, void *)
Called when the user clicks a time link in the message window.
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user presses the Close-button.
FXMutex * myBreakpointLock
Lock for modifying the list of breakpoints.
SUMOTime mySimBegin
simulation begin
FXTable * myTable
The list that holds the ids.
GUIApplicationWindow * myParent
The parent window.
long onCmdLoad(FXObject *, FXSelector, void *)
Called when the user presses the Load-button.
std::vector< SUMOTime > * myBreakpoints
List of breakpoints.
long onCmdClear(FXObject *, FXSelector, void *)
Called when the user presses the Clear-button.
void show()
sets the focus after the window is created
std::unique_ptr< GUIPersistentWindowPos > myPersistentPos
persisting the position on close
long onCmdEditTable(FXObject *, FXSelector, void *)
Called when the table was changed.
long onCmdSave(FXObject *, FXSelector, void *)
Called when the user presses the Save-button.
void rebuildList()
Rebuilds the entire list.
std::string encode2TXT()
FOX need this.