![]() |
Audacity 3.2.0
|
(not quite a Toolbar) at foot of screen for setting and viewing the selection range. More...
#include <SelectionBar.h>
Public Member Functions | |
SelectionBar (AudacityProject &project) | |
virtual | ~SelectionBar () |
void | Create (wxWindow *parent) override |
void | Populate () override |
void | Repaint (wxDC *WXUNUSED(dc)) override |
void | EnableDisableButtons () override |
void | UpdatePrefs () override |
void | SetTimes (double start, double end, double audio) |
void | SetSnapTo (int) |
void | SetSelectionFormat (const NumericFormatSymbol &format) |
void | SetRate (double rate) |
void | SetListener (SelectionBarListener *l) |
void | RegenerateTooltips () override |
![]() | |
ToolBar (AudacityProject &project, int type, const TranslatableString &label, const wxString §ion, bool resizable=false) | |
virtual | ~ToolBar () |
bool | AcceptsFocus () const override |
virtual void | SetToDefaultSize () |
virtual void | Create (wxWindow *parent) |
virtual void | EnableDisableButtons ()=0 |
virtual void | ReCreateButtons () |
void | UpdatePrefs () override |
virtual void | RegenerateTooltips ()=0 |
int | GetType () |
TranslatableString | GetTitle () |
TranslatableString | GetLabel () |
wxString | GetSection () |
ToolDock * | GetDock () |
void | SetLabel (const TranslatableString &label) |
virtual void | SetDocked (ToolDock *dock, bool pushed) |
virtual bool | Expose (bool show=true) |
bool | IsResizable () const |
bool | IsVisible () const |
bool | IsDocked () const |
bool | IsPositioned () |
void | SetVisible (bool bVisible) |
void | SetPositioned () |
virtual int | GetInitialWidth () |
Resizable toolbars should implement these. More... | |
virtual int | GetMinToolbarWidth () |
virtual wxSize | GetDockedSize () |
wxSize | GetSmartDockedSize () |
virtual void | ResizingDone () |
![]() | |
wxPanelWrapper () | |
wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) | |
bool | Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) |
void | SetLabel (const TranslatableString &label) |
void | SetName (const TranslatableString &name) |
void | SetToolTip (const TranslatableString &toolTip) |
void | SetName () |
![]() | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Static Public Member Functions | |
static SelectionBar & | Get (AudacityProject &project) |
static const SelectionBar & | Get (const AudacityProject &project) |
![]() | |
static AButton * | MakeButton (wxWindow *parent, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxWindowID id, wxPoint placement, bool processdownevents, wxSize size) |
static void | MakeAlternateImages (AButton &button, int idx, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxSize size) |
static void | SetButtonToolTip (AudacityProject &project, AButton &button, const ComponentInterfaceSymbol commands[], size_t nCommands) |
static void | MakeButtonBackgroundsSmall () |
static void | MakeButtonBackgroundsLarge () |
Private Member Functions | |
auStaticText * | AddTitle (const TranslatableString &Title, wxSizer *pSizer) |
NumericTextCtrl * | AddTime (const TranslatableString &Name, int id, wxSizer *pSizer) |
void | AddVLine (wxSizer *pSizer) |
void | SetSelectionMode (int mode) |
void | ShowHideControls (int mode) |
void | SetDrivers (int driver1, int driver2) |
void | ValuesToControls () |
void | OnUpdate (wxCommandEvent &evt) |
void | OnChangedTime (wxCommandEvent &evt) |
void | OnRate (wxCommandEvent &event) |
void | OnSnapTo (wxCommandEvent &event) |
void | OnChoice (wxCommandEvent &event) |
void | OnFocus (wxFocusEvent &event) |
void | OnCaptureKey (wxCommandEvent &event) |
void | OnSize (wxSizeEvent &evt) |
void | OnIdle (wxIdleEvent &evt) |
void | ModifySelection (int newDriver, bool done=false) |
void | UpdateRates () |
void | SelectionModeUpdated () |
Private Attributes | |
SelectionBarListener * | mListener |
double | mRate |
double | mStart |
double | mEnd |
double | mLength |
double | mCenter |
double | mAudio |
int | mDrive1 |
int | mDrive2 |
int | mSelectionMode { 0 } |
int | mLastSelectionMode { 0 } |
NumericTextCtrl * | mStartTime |
NumericTextCtrl * | mCenterTime |
NumericTextCtrl * | mLengthTime |
NumericTextCtrl * | mEndTime |
NumericTextCtrl * | mAudioTime |
wxChoice * | mChoice |
wxStaticText * | mProxy |
wxComboBox * | mRateBox |
wxChoice * | mSnapTo |
wxWindow * | mRateText |
wxString | mLastValidText |
Additional Inherited Members | |
![]() | |
using | Holder = wxWindowPtr< ToolBar > |
![]() | |
void | SetButton (bool down, AButton *button) |
wxBoxSizer * | GetSizer () |
void | Add (wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL) |
void | Add (wxSizer *sizer, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL) |
void | Add (int width, int height, int proportion=0, int flag=0, int border=0, wxObject *userData=NULL) |
void | AddSpacer (int size=14) |
void | AddStretchSpacer (int prop=1) |
void | Detach (wxWindow *window) |
void | Detach (wxSizer *sizer) |
void | Updated () |
int | GetResizeGrabberWidth () |
Returns the width in pixels of the resizer element. More... | |
virtual void | Populate ()=0 |
virtual void | Repaint (wxDC *dc)=0 |
void | OnErase (wxEraseEvent &event) |
void | OnPaint (wxPaintEvent &event) |
void | OnMouseEvents (wxMouseEvent &event) |
![]() | |
virtual void | UpdateSelectedPrefs (int id) |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
![]() | |
static void | MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn) |
static void | MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn) |
![]() | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
![]() | |
AudacityProject & | mProject |
TranslatableString | mLabel |
wxString | mSection |
int | mType |
(not quite a Toolbar) at foot of screen for setting and viewing the selection range.
Definition at line 46 of file SelectionBar.h.
SelectionBar::SelectionBar | ( | AudacityProject & | project | ) |
Definition at line 111 of file SelectionBar.cpp.
References QualitySettings::DefaultSampleRate, gPrefs, and Read().
|
virtual |
Definition at line 134 of file SelectionBar.cpp.
|
private |
Definition at line 168 of file SelectionBar.cpp.
References SelectionBarListener::AS_GetSelectionFormat(), mListener, mRate, safenew, and NumericConverter::TIME.
Referenced by Populate().
|
private |
Definition at line 156 of file SelectionBar.cpp.
References ThemeBase::Colour(), safenew, theTheme, and TranslatableString::Translation().
Referenced by Populate().
|
private |
Definition at line 179 of file SelectionBar.cpp.
References safenew, and toolbarSingle.
Referenced by Populate().
|
overridevirtual |
Reimplemented from ToolBar.
Definition at line 149 of file SelectionBar.cpp.
References ToolBar::Create(), and UpdatePrefs().
|
inlineoverridevirtual |
|
static |
Definition at line 138 of file SelectionBar.cpp.
References ToolManager::Get(), and SelectionBarID.
Referenced by ProjectFileManager::AddImportedTracks(), SetProjectCommand::Apply(), ProjectSelectionManager::AS_SetRate(), ProjectSelectionManager::AS_SetSelectionFormat(), ProjectSelectionManager::AS_SetSnapTo(), Get(), AUPImportFileHandle::Import(), ProjectManager::New(), ProjectFileManager::OpenProjectFile(), and ProjectSettings::UpdatePrefs().
|
static |
Definition at line 144 of file SelectionBar.cpp.
References Get().
|
private |
Definition at line 413 of file SelectionBar.cpp.
References SelectionBarListener::AS_ModifySelection(), CenterTimeID, EndTimeID, NumericConverter::GetValue(), LengthTimeID, mCenter, mCenterTime, mDrive1, mDrive2, mEnd, mEndTime, mLength, mLengthTime, mListener, mStart, mStartTime, SetDrivers(), StartTimeID, and ValuesToControls().
Referenced by OnChangedTime().
|
private |
Definition at line 776 of file SelectionBar.cpp.
References mRateText.
|
private |
Definition at line 494 of file SelectionBar.cpp.
References ModifySelection().
|
private |
Definition at line 586 of file SelectionBar.cpp.
References mChoice, SelectionModeUpdated(), and SetSelectionMode().
|
private |
Definition at line 771 of file SelectionBar.cpp.
References KeyboardCapture::OnFocus().
Referenced by Populate().
|
private |
Definition at line 593 of file SelectionBar.cpp.
References AudioIO::Get(), ViewInfo::Get(), ProjectAudioIO::Get(), PlayRegion::GetStart(), ToolBar::mProject, ViewInfo::playRegion, ViewInfo::selectedRegion, and SetTimes().
|
private |
Definition at line 737 of file SelectionBar.cpp.
References SelectionBarListener::AS_SetRate(), mAudioTime, mCenterTime, mEndTime, mLastValidText, mLengthTime, mListener, mRate, mRateBox, and mStartTime.
|
private |
Definition at line 404 of file SelectionBar.cpp.
|
private |
Definition at line 808 of file SelectionBar.cpp.
References SelectionBarListener::AS_SetSnapTo(), mListener, and mSnapTo.
|
private |
Definition at line 500 of file SelectionBar.cpp.
References SelectionBarListener::AS_SetSelectionFormat(), format, NumericConverter::LookupFormat(), mAudioTime, mCenterTime, mChoice, mEndTime, mLengthTime, mListener, mRateBox, mRateText, mSnapTo, mStartTime, ToolBar::ReCreateButtons(), RegenerateTooltips(), NumericConverter::TIME, ToolBar::Updated(), and ValuesToControls().
Referenced by SetSelectionFormat(), and UpdatePrefs().
|
overridevirtual |
Implements ToolBar.
Definition at line 186 of file SelectionBar.cpp.
References _, ToolBar::Add(), AddTime(), AddTitle(), AddVLine(), SelectionBarListener::AS_GetSnapTo(), AudioTimeID, CenterTimeID, ChoiceID, ThemeBase::Colour(), EndTimeID, SnapManager::GetSnapLabels(), LengthTimeID, mAudioTime, mCenterTime, mChoice, mEndTime, mLengthTime, mListener, mRate, mRateBox, mRateText, mSelectionMode, mSnapTo, mStartTime, numbers, OnFocus(), RateID, RegenerateTooltips(), safenew, SetSelectionMode(), SIZER_COLS, SNAP_OFF, SnapToID, StartTimeID, theTheme, toolbarSingle, TranslatableString::Translation(), UpdateRates(), and XO.
|
overridevirtual |
Implements ToolBar.
Definition at line 391 of file SelectionBar.cpp.
References _, SelectionBarListener::AS_GetSelectionFormat(), mListener, and mSnapTo.
Referenced by OnUpdate(), Populate(), and UpdatePrefs().
|
inlineoverride |
Definition at line 58 of file SelectionBar.h.
|
private |
Definition at line 614 of file SelectionBar.cpp.
References FileConfig::Flush(), gPrefs, mSelectionMode, and ToolBar::Updated().
Referenced by OnChoice().
|
private |
Definition at line 550 of file SelectionBar.cpp.
References fast_float::fixed, mCenterTime, mDrive1, mDrive2, mEndTime, mLengthTime, mStartTime, wxPanelWrapper::SetName(), StartTimeID, and XO.
Referenced by ModifySelection(), and SetSelectionMode().
void SelectionBar::SetListener | ( | SelectionBarListener * | l | ) |
Definition at line 383 of file SelectionBar.cpp.
References SelectionBarListener::AS_GetRate(), SelectionBarListener::AS_GetSelectionFormat(), SelectionBarListener::AS_GetSnapTo(), mListener, SetRate(), SetSelectionFormat(), and SetSnapTo().
Referenced by ProjectManager::New().
void SelectionBar::SetRate | ( | double | rate | ) |
Definition at line 721 of file SelectionBar.cpp.
References mAudioTime, mCenterTime, mEndTime, mLengthTime, mRate, mRateBox, and mStartTime.
Referenced by ProjectFileManager::AddImportedTracks(), ProjectSelectionManager::AS_SetRate(), ProjectFileManager::OpenProjectFile(), and SetListener().
void SelectionBar::SetSelectionFormat | ( | const NumericFormatSymbol & | format | ) |
Definition at line 708 of file SelectionBar.cpp.
References format, NumericConverter::GetBuiltinFormat(), mStartTime, OnUpdate(), and NumericTextCtrl::SetFormatString().
Referenced by ProjectSelectionManager::AS_SetSelectionFormat(), and SetListener().
|
private |
Definition at line 631 of file SelectionBar.cpp.
References CenterTimeID, EndTimeID, LengthTimeID, mChoice, mSelectionMode, SetDrivers(), ShowHideControls(), and StartTimeID.
Referenced by OnChoice(), and Populate().
void SelectionBar::SetSnapTo | ( | int | snap | ) |
Definition at line 703 of file SelectionBar.cpp.
References mSnapTo.
Referenced by ProjectSelectionManager::AS_SetSnapTo(), and SetListener().
void SelectionBar::SetTimes | ( | double | start, |
double | end, | ||
double | audio | ||
) |
Definition at line 687 of file SelectionBar.cpp.
References PackedArray::end(), mAudio, mCenter, mEnd, mLastSelectionMode, mLength, mSelectionMode, mStart, and ValuesToControls().
Referenced by OnIdle().
|
private |
Definition at line 658 of file SelectionBar.cpp.
References mCenterTime, mEndTime, mLengthTime, and mStartTime.
Referenced by SetSelectionMode().
|
overridevirtual |
Implements PrefsListener.
Definition at line 352 of file SelectionBar.cpp.
References gPrefs, Internal, NumericConverter::LookupFormat(), mSelectionMode, OnUpdate(), RegenerateTooltips(), ToolBar::SetLabel(), NumericConverter::TIME, ToolBar::UpdatePrefs(), and XO.
Referenced by Create().
|
private |
Definition at line 760 of file SelectionBar.cpp.
References mRateBox, AudioIOBase::NumStandardRates, and AudioIOBase::StandardRates.
Referenced by Populate().
|
private |
Definition at line 676 of file SelectionBar.cpp.
References mAudio, mAudioTime, mCenter, mCenterTime, mEnd, mEndTime, mLength, mLengthTime, mStart, and mStartTime.
Referenced by ModifySelection(), OnUpdate(), and SetTimes().
|
private |
Definition at line 96 of file SelectionBar.h.
Referenced by SetTimes(), and ValuesToControls().
|
private |
Definition at line 110 of file SelectionBar.h.
Referenced by OnRate(), OnUpdate(), Populate(), SetRate(), and ValuesToControls().
|
private |
Definition at line 96 of file SelectionBar.h.
Referenced by ModifySelection(), SetTimes(), and ValuesToControls().
|
private |
Definition at line 107 of file SelectionBar.h.
Referenced by ModifySelection(), OnRate(), OnUpdate(), Populate(), SetDrivers(), SetRate(), ShowHideControls(), and ValuesToControls().
|
private |
Definition at line 111 of file SelectionBar.h.
Referenced by OnChoice(), OnUpdate(), Populate(), and SetSelectionMode().
|
private |
Definition at line 100 of file SelectionBar.h.
Referenced by ModifySelection(), and SetDrivers().
|
private |
Definition at line 101 of file SelectionBar.h.
Referenced by ModifySelection(), and SetDrivers().
|
private |
Definition at line 96 of file SelectionBar.h.
Referenced by ModifySelection(), SetTimes(), and ValuesToControls().
|
private |
Definition at line 109 of file SelectionBar.h.
Referenced by ModifySelection(), OnRate(), OnUpdate(), Populate(), SetDrivers(), SetRate(), ShowHideControls(), and ValuesToControls().
|
private |
Definition at line 104 of file SelectionBar.h.
Referenced by SetTimes().
|
private |
Definition at line 117 of file SelectionBar.h.
Referenced by OnRate().
|
private |
Definition at line 96 of file SelectionBar.h.
Referenced by ModifySelection(), SetTimes(), and ValuesToControls().
|
private |
Definition at line 108 of file SelectionBar.h.
Referenced by ModifySelection(), OnRate(), OnUpdate(), Populate(), SetDrivers(), SetRate(), ShowHideControls(), and ValuesToControls().
|
private |
Definition at line 94 of file SelectionBar.h.
Referenced by AddTime(), ModifySelection(), OnRate(), OnSnapTo(), OnUpdate(), Populate(), RegenerateTooltips(), and SetListener().
|
private |
Definition at line 112 of file SelectionBar.h.
|
private |
Definition at line 95 of file SelectionBar.h.
Referenced by AddTime(), OnRate(), Populate(), and SetRate().
|
private |
Definition at line 113 of file SelectionBar.h.
Referenced by OnRate(), OnUpdate(), Populate(), SetRate(), and UpdateRates().
|
private |
Definition at line 115 of file SelectionBar.h.
Referenced by OnCaptureKey(), OnUpdate(), and Populate().
|
private |
Definition at line 103 of file SelectionBar.h.
Referenced by Populate(), SelectionModeUpdated(), SetSelectionMode(), SetTimes(), and UpdatePrefs().
|
private |
Definition at line 114 of file SelectionBar.h.
Referenced by OnSnapTo(), OnUpdate(), Populate(), RegenerateTooltips(), and SetSnapTo().
|
private |
Definition at line 96 of file SelectionBar.h.
Referenced by ModifySelection(), SetTimes(), and ValuesToControls().
|
private |
Definition at line 106 of file SelectionBar.h.
Referenced by ModifySelection(), OnRate(), OnUpdate(), Populate(), SetDrivers(), SetRate(), SetSelectionFormat(), ShowHideControls(), and ValuesToControls().