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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Editor for simulation breakpoints
16 /****************************************************************************/
17 #ifndef GUIDialog_Breakpoints_h
18 #define GUIDialog_Breakpoints_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <string>
27 #include <vector>
28 #include <fx.h>
29 
30 
31 // ===========================================================================
32 // class definition
33 // ===========================================================================
42 class GUIDialog_Breakpoints : public FXMainWindow {
43  // FOX-declarations
44  FXDECLARE(GUIDialog_Breakpoints)
45 
46 public:
50  GUIDialog_Breakpoints(GUIMainWindow* parent, std::vector<SUMOTime>& breakpoints, FXMutex& breakpointLock);
51 
54 
56  void show();
57 
60 
62  long onCmdLoad(FXObject*, FXSelector, void*);
63 
65  long onCmdSave(FXObject*, FXSelector, void*);
66 
68  long onCmdClear(FXObject*, FXSelector, void*);
69 
71  long onCmdClose(FXObject*, FXSelector, void*);
72 
74  long onCmdEditTable(FXObject*, FXSelector, void*);
76 
77  virtual void layout();
78 
79 protected:
81 
82 private:
84  void rebuildList();
85 
89  std::string encode2TXT();
90 
92  FXTable* myTable;
93 
96 
98  std::vector<SUMOTime>* myBreakpoints;
99 
102 };
103 
104 
105 #endif
106 
107 /****************************************************************************/
108 
GUIDialog_Breakpoints::show
void show()
sets the focus after the window is created
Definition: GUIDialog_Breakpoints.cpp:109
GUIDialog_Breakpoints::onCmdLoad
long onCmdLoad(FXObject *, FXSelector, void *)
Called when the user presses the Load-button.
Definition: GUIDialog_Breakpoints.cpp:135
GUIDialog_Breakpoints::encode2TXT
std::string encode2TXT()
Builds a text representation of the items in the list.
Definition: GUIDialog_Breakpoints.cpp:174
GUIDialog_Breakpoints::myBreakpoints
std::vector< SUMOTime > * myBreakpoints
List of breakpoints.
Definition: GUIDialog_Breakpoints.h:98
GUIDialog_Breakpoints::myBreakpointLock
FXMutex * myBreakpointLock
Lock for modifying the list of breakpoints.
Definition: GUIDialog_Breakpoints.h:101
GUIDialog_Breakpoints::GUIDialog_Breakpoints
GUIDialog_Breakpoints(GUIMainWindow *parent, std::vector< SUMOTime > &breakpoints, FXMutex &breakpointLock)
Constructor.
Definition: GUIDialog_Breakpoints.cpp:68
GUIDialog_Breakpoints::onCmdClear
long onCmdClear(FXObject *, FXSelector, void *)
Called when the user presses the Clear-button.
Definition: GUIDialog_Breakpoints.cpp:186
GUIDialog_Breakpoints::~GUIDialog_Breakpoints
~GUIDialog_Breakpoints()
Destructor.
Definition: GUIDialog_Breakpoints.cpp:102
FOX_CONSTRUCTOR
#define FOX_CONSTRUCTOR(classname)
Definition: config.h:13
GUIDialog_Breakpoints::onCmdSave
long onCmdSave(FXObject *, FXSelector, void *)
Called when the user presses the Save-button.
Definition: GUIDialog_Breakpoints.cpp:156
GUIDialog_Breakpoints::myTable
FXTable * myTable
The list that holds the ids.
Definition: GUIDialog_Breakpoints.h:92
GUIDialog_Breakpoints
Editor for simulation breakpoints.
Definition: GUIDialog_Breakpoints.h:42
GUIMainWindow
Definition: GUIMainWindow.h:46
GUIDialog_Breakpoints::rebuildList
void rebuildList()
Rebuilds the entire list.
Definition: GUIDialog_Breakpoints.cpp:116
GUIDialog_Breakpoints::onCmdEditTable
long onCmdEditTable(FXObject *, FXSelector, void *)
Called when the table was changed.
Definition: GUIDialog_Breakpoints.cpp:203
config.h
GUIDialog_Breakpoints::onCmdClose
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user presses the Close-button.
Definition: GUIDialog_Breakpoints.cpp:196
GUIDialog_Breakpoints::layout
virtual void layout()
Definition: GUIDialog_Breakpoints.cpp:234
GUIDialog_Breakpoints::myParent
GUIMainWindow * myParent
The parent window.
Definition: GUIDialog_Breakpoints.h:95