TBTK
DataManagerFrame.h
Go to the documentation of this file.
1 /* Copyright 2017 Kristofer Bj√∂rnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
23 #ifndef COM_DAFER45_TBTK_DATA_MANAGER_FRAME
24 #define COM_DAFER45_TBTK_DATA_MANAGER_FRAME
25 
26 #include "TBTK/DataManager.h"
27 #include "TBTK/ParameterSliderPanel.h"
28 
29 #include <wx/wx.h>
30 #include <wx/sizer.h>
31 
32 namespace TBTK{
33 
34 class DataManagerFrame : public wxFrame{
35 public:
37  DataManagerFrame(wxWindow *parent);
38 
41 
43  void setDataManager(
44  const DataManager *dataManager,
45  bool isOwner = false
46  );
47 
49  void onPaintEvent(wxPaintEvent &event);
50 
52  void onSizeEvent(wxSizeEvent &event);
53 
55  void onMenuFileOpen(wxCommandEvent &event);
56 
58  void onMenuFileQuit(wxCommandEvent &event);
59 
61  void onMenuHelpAbout(wxCommandEvent &event);
62 
64  void onCheckboxEvent(wxCommandEvent &event);
65 
67  void onSliderChange(wxScrollEvent &event);
68 protected:
69  DECLARE_EVENT_TABLE();
70 private:
72  const DataManager *dataManager;
73 
76  bool isOwner;
77 
79  std::vector<wxCheckBox*> checkboxes;
80 
82  std::vector<ParameterSliderPanel*> parameterSliders;
83 
85  wxSizer* dataTypeSizer;
86 
88  wxSizer* parameterSizer;
89 
91  std::vector<wxWindow*> currentDataWindows;
92 
94  void updateOpenWindows();
95 };
96 
97 }; //End namespace TBTK
98 
99 #endif
void onPaintEvent(wxPaintEvent &event)
void onSizeEvent(wxSizeEvent &event)
void onSliderChange(wxScrollEvent &event)
void onMenuFileOpen(wxCommandEvent &event)
Definition: DataManager.h:33
void setDataManager(const DataManager *dataManager, bool isOwner=false)
void onMenuHelpAbout(wxCommandEvent &event)
void onCheckboxEvent(wxCommandEvent &event)
Definition: ModelFactory.h:35
Definition: DataManagerFrame.h:34
Manages data.
DataManagerFrame(wxWindow *parent)
void onMenuFileQuit(wxCommandEvent &event)