TBTK
Need a break? Support the development by playing Polarity Puzzles
DataManagerFrame.h
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 
17 
24 #ifndef COM_DAFER45_TBTK_DATA_MANAGER_FRAME
25 #define COM_DAFER45_TBTK_DATA_MANAGER_FRAME
26 
27 #include "TBTK/DataManager.h"
28 #include "TBTK/ParameterSliderPanel.h"
29 
30 #include <wx/wx.h>
31 #include <wx/sizer.h>
32 
33 namespace TBTK{
34 
35 class DataManagerFrame : public wxFrame{
36 public:
38  DataManagerFrame(wxWindow *parent);
39 
41  ~DataManagerFrame();
42 
44  void setDataManager(
45  const DataManager *dataManager,
46  bool isOwner = false
47  );
48 
50  void onPaintEvent(wxPaintEvent &event);
51 
53  void onSizeEvent(wxSizeEvent &event);
54 
56  void onMenuFileOpen(wxCommandEvent &event);
57 
59  void onMenuFileQuit(wxCommandEvent &event);
60 
62  void onMenuHelpAbout(wxCommandEvent &event);
63 
65  void onCheckboxEvent(wxCommandEvent &event);
66 
68  void onSliderChange(wxScrollEvent &event);
69 protected:
70  DECLARE_EVENT_TABLE();
71 private:
73  const DataManager *dataManager;
74 
77  bool isOwner;
78 
80  std::vector<wxCheckBox*> checkboxes;
81 
83  std::vector<ParameterSliderPanel*> parameterSliders;
84 
86  wxSizer* dataTypeSizer;
87 
89  wxSizer* parameterSizer;
90 
92  std::vector<wxWindow*> currentDataWindows;
93 
95  void updateOpenWindows();
96 };
97 
98 }; //End namespace TBTK
99 
100 #endif
101 
Definition: Boolean.h:32