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 /****************************************************************************/
16 // Editor for simulation breakpoints
17 /****************************************************************************/
18 #ifndef GUIDialog_Breakpoints_h
19 #define GUIDialog_Breakpoints_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <vector>
29 #include <fx.h>
30 
31 
32 // ===========================================================================
33 // class definition
34 // ===========================================================================
43 class GUIDialog_Breakpoints : public FXMainWindow {
44  // FOX-declarations
45  FXDECLARE(GUIDialog_Breakpoints)
46 
47 public:
51  GUIDialog_Breakpoints(GUIMainWindow* parent, std::vector<SUMOTime>& breakpoints, FXMutex& breakpointLock);
52 
55 
57  void show();
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 onCmdClose(FXObject*, FXSelector, void*);
73 
75  long onCmdEditTable(FXObject*, FXSelector, void*);
77 
78  virtual void layout();
79 
80 protected:
83 
84 private:
86  void rebuildList();
87 
91  std::string encode2TXT();
92 
94  FXTable* myTable;
95 
98 
100  std::vector<SUMOTime>* myBreakpoints;
101 
104 };
105 
106 
107 #endif
108 
109 /****************************************************************************/
110 
GUIDialog_Breakpoints::show
void show()
sets the focus after the window is created
Definition: GUIDialog_Breakpoints.cpp:110
GUIDialog_Breakpoints::onCmdLoad
long onCmdLoad(FXObject *, FXSelector, void *)
Called when the user presses the Load-button.
Definition: GUIDialog_Breakpoints.cpp:136
GUIDialog_Breakpoints::encode2TXT
std::string encode2TXT()
Builds a text representation of the items in the list.
Definition: GUIDialog_Breakpoints.cpp:175
GUIDialog_Breakpoints::myBreakpoints
std::vector< SUMOTime > * myBreakpoints
List of breakpoints.
Definition: GUIDialog_Breakpoints.h:100
GUIDialog_Breakpoints::myBreakpointLock
FXMutex * myBreakpointLock
Lock for modifying the list of breakpoints.
Definition: GUIDialog_Breakpoints.h:103
GUIDialog_Breakpoints::onCmdClear
long onCmdClear(FXObject *, FXSelector, void *)
Called when the user presses the Clear-button.
Definition: GUIDialog_Breakpoints.cpp:187
GUIDialog_Breakpoints::~GUIDialog_Breakpoints
~GUIDialog_Breakpoints()
Destructor.
Definition: GUIDialog_Breakpoints.cpp:103
GUIDialog_Breakpoints::onCmdSave
long onCmdSave(FXObject *, FXSelector, void *)
Called when the user presses the Save-button.
Definition: GUIDialog_Breakpoints.cpp:157
GUIDialog_Breakpoints::myTable
FXTable * myTable
The list that holds the ids.
Definition: GUIDialog_Breakpoints.h:94
GUIDialog_Breakpoints::GUIDialog_Breakpoints
GUIDialog_Breakpoints()
FOX needs this.
Definition: GUIDialog_Breakpoints.h:82
GUIDialog_Breakpoints
Editor for simulation breakpoints.
Definition: GUIDialog_Breakpoints.h:43
GUIMainWindow
Definition: GUIMainWindow.h:47
GUIDialog_Breakpoints::rebuildList
void rebuildList()
Rebuilds the entire list.
Definition: GUIDialog_Breakpoints.cpp:117
GUIDialog_Breakpoints::onCmdEditTable
long onCmdEditTable(FXObject *, FXSelector, void *)
Called when the table was changed.
Definition: GUIDialog_Breakpoints.cpp:204
config.h
GUIDialog_Breakpoints::onCmdClose
long onCmdClose(FXObject *, FXSelector, void *)
Called when the user presses the Close-button.
Definition: GUIDialog_Breakpoints.cpp:197
GUIDialog_Breakpoints::layout
virtual void layout()
Definition: GUIDialog_Breakpoints.cpp:235
GUIDialog_Breakpoints::myParent
GUIMainWindow * myParent
The parent window.
Definition: GUIDialog_Breakpoints.h:97