1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00
audacity/src/TimeDialog.h
Emily Mabrey 40d4883233
Revert "Replace header guards with #pragma once"
This reverts commit a6bc896e246d48821ff7ae70d572aefcf0cbedd6.
2021-08-24 16:57:24 -04:00

60 lines
1.3 KiB
C++

/**********************************************************************
Tenacity
TimeDialog.h
Dominic Mazzoni
**********************************************************************/
#ifndef __AUDACITY_TimeDialog__
#define __AUDACITY_TimeDialog__
#include <wx/defs.h>
#include "tenacity/ComponentInterface.h" // member variable
#include "widgets/wxPanelWrapper.h" // to inherit
class NumericTextCtrl;
class ShuttleGui;
class TENACITY_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