Eclipse SUMO - Simulation of Urban MObility
GUIDialog_Breakpoints.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 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>
27
28
29// ===========================================================================
30// class definition
31// ===========================================================================
40class GUIDialog_Breakpoints : public FXMainWindow {
41 // FOX-declarations
42 FXDECLARE(GUIDialog_Breakpoints)
43
44public:
48 GUIDialog_Breakpoints(GUIApplicationWindow* parent, std::vector<SUMOTime>& breakpoints, FXMutex& breakpointLock);
49
52
54 void show();
55
58
60 long onCmdLoad(FXObject*, FXSelector, void*);
61
63 long onCmdSave(FXObject*, FXSelector, void*);
64
66 long onCmdClear(FXObject*, FXSelector, void*);
67
69 long onCmdUpdateBreakpoints(FXObject*, FXSelector, void*);
70
72 long onCmdClose(FXObject*, FXSelector, void*);
73
75 long onCmdEditTable(FXObject*, FXSelector, void*);
77
78 virtual void layout();
79
81 void rebuildList();
82
83protected:
84 FOX_CONSTRUCTOR(GUIDialog_Breakpoints)
85
86private:
87
91 std::string encode2TXT();
92
94 FXTable* myTable;
95
98
100 std::vector<SUMOTime>* myBreakpoints;
101
104};
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.
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.
GUIDialog_Breakpoints(GUIApplicationWindow *parent, std::vector< SUMOTime > &breakpoints, FXMutex &breakpointLock)
Constructor.
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
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()
Builds a text representation of the items in the list.