-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCookTimerFrame.h
108 lines (84 loc) · 2.42 KB
/
CookTimerFrame.h
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// -*- C++ -*- generated by wxGlade 0.5 on Wed May 30 14:46:15 2007 from Z:\WIP\CookTimer\CookTimer.wxg
#include <wx/wx.h>
#include <wx/image.h>
#include <wx/taskbar.h>
#include <wx/sound.h>
#include <vector>
#ifndef COOKTIMERFRAME_H
#define COOKTIMERFRAME_H
// begin wxGlade: ::dependencies
#include <wx/spinctrl.h>
#include <wx/statline.h>
// end wxGlade
class CookTimerTaskBarIcon: public wxTaskBarIcon
{
public:
#if defined(__WXCOCOA__)
CookTimerTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE)
: wxTaskBarIcon(iconType)
#else
CookTimerTaskBarIcon()
#endif
{
}
wxTopLevelWindow *window;
private:
// event handlers
void OnLeftButtonDClick(wxTaskBarIconEvent &evt);
DECLARE_EVENT_TABLE()
};
class CookTimerFrame: public wxFrame
{
public:
// begin wxGlade: CookTimerFrame::ids
enum {
ID_StartStopButton = wxID_HIGHEST + 1000,
ID_ResetButton = wxID_HIGHEST + 1001,
ID_AutoRestartCheckBox = wxID_HIGHEST + 1002
};
// end wxGlade
CookTimerFrame(wxWindow* parent);
~CookTimerFrame();
void SetTime(unsigned long seconds, bool start);
private:
// begin wxGlade: CookTimerFrame::methods
void set_properties();
void do_layout();
// end wxGlade
unsigned int GetPeriod() const;
void UpdateControls();
unsigned int GetCustomValue() const;
bool IsCustomSelected() const;
void StartStopTimer();
void OnTimer(wxTimerEvent &event);
void OnStartStopButton(wxCommandEvent &evt);
void OnResetButton(wxCommandEvent &evt);
void OnIconize(wxIconizeEvent &evt);
void OnPresetsRadioBox(wxCommandEvent &evt) { UpdateControls(); }
void OnAutoResetChecked(wxCommandEvent &evt);
wxTimer _timer;
int _seconds;
bool _running, _reset;
wxRadioBox *_presetsRadioBox;
std::vector<unsigned int> _times;
wxSound timeoutSound;
CookTimerTaskBarIcon *_taskBarIcon;
#if defined(__WXCOCOA__)
CookTimerTaskBarIcon *_dockIcon;
#endif
protected:
// begin wxGlade: CookTimerFrame::attributes
wxSpinCtrl* _hoursSpinCtrl;
wxSpinCtrl* _minutesSpinCtrl;
wxSpinCtrl* _secondsSpinCtrl;
wxStaticText* _remainingTimeStatic;
wxGauge* _progressBar;
wxButton* _startStopButton;
wxButton* _resetButton;
wxCheckBox* _autoRestartCheckbox;
wxCheckBox* _ringForeverCheckbox;
wxPanel* rootPanel;
// end wxGlade
DECLARE_EVENT_TABLE();
}; // wxGlade: end class
#endif // COOKTIMERFRAME_H