1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-22 16:41:18 +01:00

Add option of Start/Center to SelectionBar

We now have Start/Center and End/Length, per Robert and Martyn's suggestion
I've also tidied up the code here that was repetitive/messy.
This commit is contained in:
James Crook
2017-05-09 12:37:55 +01:00
parent 94c43773fc
commit 52509d4bbd
2 changed files with 150 additions and 63 deletions

View File

@@ -52,12 +52,16 @@ class SelectionBar final : public ToolBar {
void RegenerateTooltips() override;
private:
wxRadioButton * AddRadioButton( const wxString & Name, int id,
std::unique_ptr<wxBoxSizer>& pSizer, long style);
void ValuesToControls();
void OnUpdate(wxCommandEvent &evt);
void OnLeftTime(wxCommandEvent &evt);
void OnRightTime(wxCommandEvent &evt);
void OnStartRadio(wxCommandEvent &evt);
void OnCenterRadio(wxCommandEvent &evt);
void OnEndRadio(wxCommandEvent &evt);
void OnLengthRadio(wxCommandEvent &evt);
@@ -79,10 +83,12 @@ class SelectionBar final : public ToolBar {
double mStart, mEnd, mAudio;
wxString mField[10];
bool mbUseNativeRadioButton;
NumericTextCtrl *mLeftTime;
NumericTextCtrl *mRightTime;
wxRadioButton *mRightEndButton;
wxRadioButton *mRightLengthButton;
wxRadioButton *mSelStartButton; // for start/center
wxRadioButton *mSelEndButton; // for end/length
NumericTextCtrl *mAudioTime;
wxComboBox *mRateBox;