forked from Sneeds-Feed-and-Seed/sneedacity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimeDialog.h
59 lines (39 loc) · 1.3 KB
/
TimeDialog.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
/**********************************************************************
Sneedacity: A Digital Audio Editor
TimeDialog.h
Dominic Mazzoni
**********************************************************************/
#ifndef __SNEEDACITY_TimeDialog__
#define __SNEEDACITY_TimeDialog__
#include <wx/defs.h>
#include "sneedacity/ComponentInterface.h" // member variable
#include "widgets/wxPanelWrapper.h" // to inherit
class NumericTextCtrl;
class ShuttleGui;
class SNEEDACITY_DLL_API TimeDialog final : public wxDialogWrapper
{
public:
TimeDialog(wxWindow *parent,
const TranslatableString &title,
const NumericFormatSymbol &format,
double rate,
double time,
const TranslatableString &prompt = XO("Duration"));
void SetFormatString(const NumericFormatSymbol &formatString);
void SetSampleRate(double sampleRate);
void SetTimeValue(double newTime);
const double GetTimeValue();
private:
void PopulateOrExchange(ShuttleGui & S);
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
void OnUpdate(wxCommandEvent &event);
private:
TranslatableString mPrompt;
NumericFormatSymbol mFormat;
double mRate;
double mTime;
NumericTextCtrl *mTimeCtrl;
DECLARE_EVENT_TABLE()
};
#endif