-
Notifications
You must be signed in to change notification settings - Fork 0
/
Slider_Frame.cpp
43 lines (32 loc) · 1.19 KB
/
Slider_Frame.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "sliderFrame.hpp"
#include "BME465_Template.hpp"
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
#include <iostream>
using namespace std;
#define MENU_FILTER_BINARIZE 5000
BEGIN_EVENT_TABLE(MySliderFrame, wxFrame)
EVT_SLIDER(SLIDER_ID, MySliderFrame::OnSliderUpdate)
END_EVENT_TABLE()
MySliderFrame::
MySliderFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxFrame(NULL, -1, title, pos, size, style) {
binarize = new wxCheckBox(this, MENU_FILTER_BINARIZE, wxString("Check box "), wxPoint(5,40));
binarize->Show(true);
//SetIcon(wxICON(myIcon));
}
MySliderFrame::~MySliderFrame() {
((MyFrame *)parent)->sliderWindowCloses();
}
void MySliderFrame::MySliderSetParent(wxFrame *parent) {
this->parent = parent;
}
void MySliderFrame::OnSliderUpdate( wxCommandEvent& event ) {
((MyFrame *)parent)->sliderHandler();
if (binarize->GetValue())
cout << "checked\n";
}