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
64 long onKeyPress(FXObject* o, FXSelector sel, void* data);
66
68 long onCmdLoad(FXObject*, FXSelector, void*);
69
71 long onCmdSave(FXObject*, FXSelector, void*);
72
74 long onCmdClear(FXObject*, FXSelector, void*);
75
77 long onCmdUpdateBreakpoints(FXObject*, FXSelector, void*);
78
80 long onCmdClose(FXObject*, FXSelector, void*);
81
83 long onCmdEditTable(FXObject*, FXSelector, void*);
85
86 virtual void layout();
87
89 void rebuildList();
90
91protected:
93 FOX_CONSTRUCTOR(GUIDialog_Breakpoints)
94
95private:
96
100 std::string encode2TXT();
101
103 FXTable* myTable;
104
107
109 std::vector<SUMOTime>* myBreakpoints;
110
113
116
118 std::unique_ptr<GUIPersistentWindowPos> myPersistentPos;
119};
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 onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
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.