Audacity 3.2.0
TimeDialog.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 TimeDialog.h
6
7 Dominic Mazzoni
8
9**********************************************************************/
10
11#ifndef __AUDACITY_TimeDialog__
12#define __AUDACITY_TimeDialog__
13
14#include <wx/defs.h>
15
16#include "ComponentInterface.h" // member variable
17
18#include "widgets/wxPanelWrapper.h" // to inherit
19
20class NumericTextCtrl;
21class ShuttleGui;
22
23class AUDACITY_DLL_API TimeDialog final : public wxDialogWrapper
24{
25 public:
26
27 TimeDialog(wxWindow *parent,
30 double rate,
31 double time,
32 const TranslatableString &prompt = XO("Duration"));
33
34 void SetFormatString(const NumericFormatSymbol &formatString);
35 void SetSampleRate(double sampleRate);
36 void SetTimeValue(double newTime);
37 const double GetTimeValue();
38
39 private:
40
41 void PopulateOrExchange(ShuttleGui & S);
42 bool TransferDataToWindow() override;
43 bool TransferDataFromWindow() override;
44
45 void OnUpdate(wxCommandEvent &event);
46
47 private:
48
51 double mRate;
52 double mTime;
53
55
56 DECLARE_EVENT_TABLE()
57};
58
59#endif
int format
Definition: ExportPCM.cpp:53
XO("Cut/Copy/Paste")
static const auto title
#define S(N)
Definition: ToChars.cpp:64
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628
Dialog used to request a time value.
Definition: TimeDialog.h:24
double mTime
Definition: TimeDialog.h:52
NumericFormatSymbol mFormat
Definition: TimeDialog.h:50
NumericTextCtrl * mTimeCtrl
Definition: TimeDialog.h:54
TranslatableString mPrompt
Definition: TimeDialog.h:49
double mRate
Definition: TimeDialog.h:51
Holds a msgid for the translation catalog; may also bind format arguments.