mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 16:48:44 +02:00
... Should have no effect on generated code, except perhaps some slight faster virtual function calls. Mostly useful as documentation of design intent. Tried to mark every one of our classes that inherits from another, or is a base for others, or has abstract virtual functions, and a few others besides.
59 lines
1.1 KiB
C++
59 lines
1.1 KiB
C++
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
TimeDialog.h
|
|
|
|
Dominic Mazzoni
|
|
|
|
**********************************************************************/
|
|
|
|
#ifndef __AUDACITY_TimeDialog__
|
|
#define __AUDACITY_TimeDialog__
|
|
|
|
#include <wx/defs.h>
|
|
#include <wx/dialog.h>
|
|
#include <wx/event.h>
|
|
#include <wx/string.h>
|
|
|
|
class NumericTextCtrl;
|
|
class ShuttleGui;
|
|
|
|
class TimeDialog final : public wxDialog
|
|
{
|
|
public:
|
|
|
|
TimeDialog(wxWindow *parent,
|
|
const wxString &title,
|
|
const wxString &format,
|
|
double rate,
|
|
double time,
|
|
const wxString &prompt = _("Duration"));
|
|
|
|
void SetFormatString(const wxString &formatString);
|
|
void SetSampleRate(double sampleRate);
|
|
void SetTimeValue(double newTime);
|
|
const double GetTimeValue();
|
|
|
|
private:
|
|
|
|
void PopulateOrExchange(ShuttleGui & S);
|
|
bool TransferDataToWindow();
|
|
bool TransferDataFromWindow();
|
|
|
|
void OnUpdate(wxCommandEvent &event);
|
|
|
|
private:
|
|
|
|
wxString mPrompt;
|
|
wxString mFormat;
|
|
double mRate;
|
|
double mTime;
|
|
|
|
NumericTextCtrl *mTimeCtrl;
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
};
|
|
|
|
#endif
|