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-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // Editor for simulation breakpoints
19 /****************************************************************************/
20 #ifndef GUIDialog_Breakpoints_h
21 #define GUIDialog_Breakpoints_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <string>
34 #include <vector>
35 #include <fx.h>
36 
37 
38 // ===========================================================================
39 // class definition
40 // ===========================================================================
49 class GUIDialog_Breakpoints : public FXMainWindow {
50  // FOX-declarations
51  FXDECLARE(GUIDialog_Breakpoints)
52 
53 public:
57  GUIDialog_Breakpoints(GUIMainWindow* parent, std::vector<SUMOTime>& breakpoints, FXMutex& breakpointLock);
58 
59 
62 
64  void show();
65 
66 
67 
70 
72  long onCmdLoad(FXObject*, FXSelector, void*);
73 
75  long onCmdSave(FXObject*, FXSelector, void*);
76 
78  long onCmdClear(FXObject*, FXSelector, void*);
79 
81  long onCmdClose(FXObject*, FXSelector, void*);
82 
84  long onCmdEditTable(FXObject*, FXSelector, void*);
86 
87 
88 private:
90  void rebuildList();
91 
95  std::string encode2TXT();
96 
97 
98 private:
100  FXTable* myTable;
101 
104 
106  std::vector<SUMOTime>* myBreakpoints;
107 
110 
111 
112 protected:
115 
116 };
117 
118 
119 #endif
120 
121 /****************************************************************************/
122 
std::vector< SUMOTime > * myBreakpoints
List of breakpoints.
GUIMainWindow * myParent
The parent window.
long onCmdSave(FXObject *, FXSelector, void *)
Called when the user presses the Save-button.
void show()
sets the focus after the window is created
Editor for simulation breakpoints.
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user presses the Close-button.
FXMutex * myBreakpointLock
Lock for modifying the list of breakpoints.
long onCmdClear(FXObject *, FXSelector, void *)
Called when the user presses the Clear-button.
long onCmdEditTable(FXObject *, FXSelector, void *)
Called when the table was changed.
GUIDialog_Breakpoints()
FOX needs this.
void rebuildList()
Rebuilds the entire list.
std::string encode2TXT()
Builds a text representation of the items in the list.
long onCmdLoad(FXObject *, FXSelector, void *)
Called when the user presses the Load-button.
FXTable * myTable
The list that holds the ids.