Audacity 3.2.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SelectionBar Class Referencefinal

(not quite a Toolbar) at foot of screen for setting and viewing the selection range. More...

#include <SelectionBar.h>

Inheritance diagram for SelectionBar:
[legend]
Collaboration diagram for SelectionBar:
[legend]

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
 
- Public Member Functions inherited from ToolBar
 ToolBar (AudacityProject &project, int type, const TranslatableString &label, const wxString &section, bool resizable=false)
 
virtual ~ToolBar ()
 
bool AcceptsFocus () const override
 
bool AcceptsFocusFromKeyboard () 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 ()
 
ToolDockGetDock ()
 
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 ()
 
- Public Member Functions inherited from wxPanelWrapper
 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 ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Static Public Member Functions

static SelectionBarGet (AudacityProject &project)
 
static const SelectionBarGet (const AudacityProject &project)
 
- Static Public Member Functions inherited from ToolBar
static AButtonMakeButton (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 AButtonMakeButton (ToolBar *parent, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, bool processdownevents, const TranslatableString &label)
 
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

auStaticTextAddTitle (const TranslatableString &Title, wxSizer *pSizer)
 
NumericTextCtrlAddTime (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

SelectionBarListenermListener
 
double mRate
 
double mStart
 
double mEnd
 
double mLength
 
double mCenter
 
double mAudio
 
int mDrive1
 
int mDrive2
 
int mSelectionMode { 0 }
 
int mLastSelectionMode { 0 }
 
NumericTextCtrlmStartTime
 
NumericTextCtrlmCenterTime
 
NumericTextCtrlmLengthTime
 
NumericTextCtrlmEndTime
 
NumericTextCtrlmAudioTime
 
wxChoice * mChoice
 
wxStaticText * mProxy
 
wxComboBox * mRateBox
 
wxChoice * mSnapTo
 
wxWindow * mRateText
 
wxString mLastValidText
 

Additional Inherited Members

- Public Types inherited from ToolBar
using Holder = wxWindowPtr< ToolBar >
 
- Protected Member Functions inherited from 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)
 
- Protected Member Functions inherited from PrefsListener
virtual void UpdateSelectedPrefs (int id)
 
 PrefsListener ()
 
virtual ~PrefsListener ()
 
virtual void UpdatePrefs ()=0
 
- Static Protected Member Functions inherited from ToolBar
static void MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
static void MakeMacRecoloredImageSize (teBmps eBmpOut, teBmps eBmpIn, const wxSize &size)
 
static void MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
static void MakeRecoloredImageSize (teBmps eBmpOut, teBmps eBmpIn, const wxSize &size)
 
- Static Protected Member Functions inherited from PrefsListener
static void Broadcast (int id=0)
 Call this static function to notify all PrefsListener objects. More...
 
- Protected Attributes inherited from ToolBar
AudacityProjectmProject
 
TranslatableString mLabel
 
wxString mSection
 
int mType
 

Detailed Description

(not quite a Toolbar) at foot of screen for setting and viewing the selection range.

Definition at line 46 of file SelectionBar.h.

Constructor & Destructor Documentation

◆ SelectionBar()

SelectionBar::SelectionBar ( AudacityProject project)

Definition at line 111 of file SelectionBar.cpp.

112: ToolBar(project, SelectionBarID, XO("Selection"), wxT("Selection")),
113 mListener(NULL), mRate(0.0),
114 mStart(0.0), mEnd(0.0), mLength(0.0), mCenter(0.0), mAudio(0.0),
117 mStartTime(NULL), mCenterTime(NULL), mLengthTime(NULL), mEndTime(NULL),
118 mAudioTime(NULL),
119 mChoice(NULL)
120{
121 // Make sure we have a valid rate as the NumericTextCtrl()s
122 // created in Populate()
123 // depend on it. Otherwise, division-by-zero floating point exceptions
124 // will occur.
125 // Refer to bug #462 for a scenario where the division-by-zero causes
126 // Audacity to fail.
127 // We expect mRate to be set from the project later.
129
130 // Selection mode of 0 means showing 'start' and 'end' only.
131 mSelectionMode = gPrefs->ReadLong(wxT("/SelectionToolbarMode"), 0);
132}
wxT("CloseDown"))
#define XO(s)
Definition: Internat.h:31
gPrefs Read(wxT("/GUI/VerticalZooming"), &bVZoom, false)
FileConfig * gPrefs
Definition: Prefs.cpp:71
@ EndTimeID
@ StartTimeID
@ SelectionBarID
Definition: ToolBar.h:81
NumericTextCtrl * mStartTime
Definition: SelectionBar.h:106
double mLength
Definition: SelectionBar.h:96
NumericTextCtrl * mAudioTime
Definition: SelectionBar.h:110
NumericTextCtrl * mLengthTime
Definition: SelectionBar.h:108
double mRate
Definition: SelectionBar.h:95
NumericTextCtrl * mEndTime
Definition: SelectionBar.h:109
wxChoice * mChoice
Definition: SelectionBar.h:111
double mCenter
Definition: SelectionBar.h:96
double mStart
Definition: SelectionBar.h:96
NumericTextCtrl * mCenterTime
Definition: SelectionBar.h:107
double mAudio
Definition: SelectionBar.h:96
SelectionBarListener * mListener
Definition: SelectionBar.h:94
ToolBar(AudacityProject &project, int type, const TranslatableString &label, const wxString &section, bool resizable=false)
Definition: ToolBar.cpp:330
PROJECT_RATE_API IntSetting DefaultSampleRate

References QualitySettings::DefaultSampleRate, gPrefs, Read(), and wxT().

Here is the call graph for this function:

◆ ~SelectionBar()

SelectionBar::~SelectionBar ( )
virtual

Definition at line 134 of file SelectionBar.cpp.

135{
136}

Member Function Documentation

◆ AddTime()

NumericTextCtrl * SelectionBar::AddTime ( const TranslatableString Name,
int  id,
wxSizer *  pSizer 
)
private

Definition at line 168 of file SelectionBar.cpp.

169 {
170 auto formatName = mListener ? mListener->AS_GetSelectionFormat()
172 auto pCtrl = safenew NumericTextCtrl(
173 this, id, NumericConverter::TIME, formatName, 0.0, mRate);
174 pCtrl->SetName( Name );
175 pSizer->Add(pCtrl, 0, wxALIGN_TOP | wxRIGHT, 5);
176 return pCtrl;
177}
#define safenew
Definition: MemoryX.h:10
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
virtual const NumericFormatSymbol & AS_GetSelectionFormat()=0

References SelectionBarListener::AS_GetSelectionFormat(), mListener, mRate, safenew, and NumericConverter::TIME.

Referenced by Populate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddTitle()

auStaticText * SelectionBar::AddTitle ( const TranslatableString Title,
wxSizer *  pSizer 
)
private

Definition at line 156 of file SelectionBar.cpp.

157 {
158 const auto translated = Title.Translation();
159 auStaticText * pTitle = safenew auStaticText(this, translated );
160 pTitle->SetBackgroundColour( theTheme.Colour( clrMedium ));
161 pTitle->SetForegroundColour( theTheme.Colour( clrTrackPanelText ) );
162 pSizer->Add( pTitle, 0, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxRIGHT, 5 );
163
164 return pTitle;
165}
THEME_API Theme theTheme
Definition: Theme.cpp:82
wxColour & Colour(int iIndex)
wxString Translation() const
is like wxStaticText, except it can be themed. wxStaticText can't be.
Definition: auStaticText.h:20

References ThemeBase::Colour(), safenew, theTheme, and TranslatableString::Translation().

Referenced by Populate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddVLine()

void SelectionBar::AddVLine ( wxSizer *  pSizer)
private

Definition at line 179 of file SelectionBar.cpp.

179 {
180 pSizer->Add(safenew wxStaticLine(this, -1, wxDefaultPosition,
181 wxSize(1, toolbarSingle-10),
182 wxLI_VERTICAL),
183 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5);
184}
#define toolbarSingle
Definition: ToolBar.h:59

References safenew, and toolbarSingle.

Referenced by Populate().

Here is the caller graph for this function:

◆ Create()

void SelectionBar::Create ( wxWindow *  parent)
overridevirtual

Reimplemented from ToolBar.

Definition at line 149 of file SelectionBar.cpp.

150{
151 ToolBar::Create(parent);
152 UpdatePrefs();
153}
void UpdatePrefs() override
virtual void Create(wxWindow *parent)
Definition: ToolBar.cpp:484

References ToolBar::Create(), and UpdatePrefs().

Here is the call graph for this function:

◆ EnableDisableButtons()

void SelectionBar::EnableDisableButtons ( )
inlineoverridevirtual

Implements ToolBar.

Definition at line 59 of file SelectionBar.h.

59{};

◆ Get() [1/2]

SelectionBar & SelectionBar::Get ( AudacityProject project)
static

Definition at line 138 of file SelectionBar.cpp.

139{
140 auto &toolManager = ToolManager::Get( project );
141 return *static_cast<SelectionBar*>( toolManager.GetToolBar(SelectionBarID) );
142}
(not quite a Toolbar) at foot of screen for setting and viewing the selection range.
Definition: SelectionBar.h:46
static ToolManager & Get(AudacityProject &project)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get() [2/2]

const SelectionBar & SelectionBar::Get ( const AudacityProject project)
static

Definition at line 144 of file SelectionBar.cpp.

145{
146 return Get( const_cast<AudacityProject&>( project )) ;
147}
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
static SelectionBar & Get(AudacityProject &project)

References Get().

Here is the call graph for this function:

◆ ModifySelection()

void SelectionBar::ModifySelection ( int  newDriver,
bool  done = false 
)
private

Definition at line 413 of file SelectionBar.cpp.

414{
415 // If the user moved to a different control, then update which
416 // two controls drive the others.
417 if( newDriver != mDrive2 )
418 SetDrivers( mDrive2, newDriver);
419
420 // Only update a value if user typed something in.
421 // The reason is the controls may be less accurate than
422 // the values.
423 if( newDriver == StartTimeID )
425 if( newDriver == EndTimeID )
427 if( newDriver == LengthTimeID )
429 if( newDriver == CenterTimeID )
431
432 // There are four controls, and two constraints, which are:
433 // mid = (start+end)/2
434 // length = (end-start)
435 // Therefore we can select any two controls as 'drivers' of
436 // the other two.
437 // Here we compute 'i' which combines the identity of the two
438 // driving controls, to use it as an index.
439 // The order of the two drivers generally does not matter much,
440 // except that we want:
441 // start < end
442 // and preserve that by adjusting the least dominant driving
443 // control.
444 int i = mDrive1 + 4 * mDrive2;
445 switch(i) {
446 case StartTimeID + 4 * EndTimeID:
447 if( mEnd < mStart )
448 mStart = mEnd;
449 case StartTimeID * 4 + EndTimeID:
450 if( mStart > mEnd )
451 mEnd = mStart;
452 mLength = mEnd - mStart;
453 mCenter = (mStart+mEnd)/2.0;
454 break;
455
456 case StartTimeID + 4 * LengthTimeID:
457 case StartTimeID * 4 + LengthTimeID:
459 mCenter = (mStart+mEnd)/2.0;
460 break;
461
462 case EndTimeID + 4 * LengthTimeID:
463 if( mEnd - mLength < 0 )
464 mEnd += (mLength - mEnd);
465 case EndTimeID * 4 + LengthTimeID:
466 if( mEnd - mLength < 0)
467 mLength -= (mLength - mEnd);
468 mStart = mEnd - mLength;
469 mCenter = (mStart+mEnd)/2.0;
470 break;
471
472 case LengthTimeID + 4 * CenterTimeID:
473 if( mCenter - (mLength / 2) < 0 )
474 mLength = (mCenter * 2);
475 case LengthTimeID * 4 + CenterTimeID:
476 if( mCenter - (mLength / 2) < 0 )
477 mCenter = (mLength / 2);
478 mStart = mCenter - mLength/2.0;
479 mEnd = mCenter + mLength/2.0;
480 break;
481
482 default:
483 // The above should cover all legal combinations of two distinct controls.
484 wxFAIL_MSG( "Illegal sequence of selection changes");
485 }
486
487 // Refresh the controls now
489
490 // Places the start-end markers on the track panel.
492}
@ CenterTimeID
@ LengthTimeID
void SetDrivers(int driver1, int driver2)
void ValuesToControls()
virtual void AS_ModifySelection(double &start, double &end, bool done)=0

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnCaptureKey()

void SelectionBar::OnCaptureKey ( wxCommandEvent &  event)
private

Definition at line 776 of file SelectionBar.cpp.

777{
778 wxKeyEvent *kevent = (wxKeyEvent *)event.GetEventObject();
779 wxWindow *w = FindFocus();
780 int keyCode = kevent->GetKeyCode();
781
782 // Convert numeric keypad entries.
783 if ((keyCode >= WXK_NUMPAD0) && (keyCode <= WXK_NUMPAD9)) {
784 keyCode -= WXK_NUMPAD0 - '0';
785 }
786
787 if (keyCode >= '0' && keyCode <= '9') {
788 return;
789 }
790
791 // UP/DOWN/LEFT/RIGHT for mRateText
792 if (w == mRateText) {
793 switch (keyCode)
794 {
795 case WXK_LEFT:
796 case WXK_RIGHT:
797 case WXK_UP:
798 case WXK_DOWN:
799 case WXK_DELETE:
800 case WXK_BACK:
801 return;
802 }
803 }
804
805 event.Skip();
806}
wxWindow * mRateText
Definition: SelectionBar.h:115

References mRateText.

◆ OnChangedTime()

void SelectionBar::OnChangedTime ( wxCommandEvent &  evt)
private

Definition at line 494 of file SelectionBar.cpp.

495{
496 ModifySelection(event.GetId(), event.GetInt() != 0);
497}
void ModifySelection(int newDriver, bool done=false)

References ModifySelection().

Here is the call graph for this function:

◆ OnChoice()

void SelectionBar::OnChoice ( wxCommandEvent &  event)
private

Definition at line 586 of file SelectionBar.cpp.

587{
588 int mode = mChoice->GetSelection();
589 SetSelectionMode( mode );
591}
void SelectionModeUpdated()
void SetSelectionMode(int mode)

References mChoice, SelectionModeUpdated(), and SetSelectionMode().

Here is the call graph for this function:

◆ OnFocus()

void SelectionBar::OnFocus ( wxFocusEvent &  event)
private

Definition at line 771 of file SelectionBar.cpp.

772{
773 KeyboardCapture::OnFocus( *this, event );
774}
void OnFocus(wxWindow &window, wxFocusEvent &event)
a function useful to implement a focus event handler The window releases the keyboard if the event is...

References KeyboardCapture::OnFocus().

Referenced by Populate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnIdle()

void SelectionBar::OnIdle ( wxIdleEvent &  evt)
private

Definition at line 593 of file SelectionBar.cpp.

594{
595 evt.Skip();
596 auto &project = mProject;
597 const auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
598
599 double audioTime;
600
601 auto &projectAudioIO = ProjectAudioIO::Get( project );
602 if ( projectAudioIO.IsAudioActive() ){
603 auto gAudioIO = AudioIO::Get();
604 audioTime = gAudioIO->GetStreamTime();
605 }
606 else {
607 const auto &playRegion = ViewInfo::Get( project ).playRegion;
608 audioTime = playRegion.GetStart();
609 }
610
611 SetTimes(selectedRegion.t0(), selectedRegion.t1(), audioTime);
612}
static AudioIO * Get()
Definition: AudioIO.cpp:133
double GetStart() const
Definition: ViewInfo.h:127
static ProjectAudioIO & Get(AudacityProject &project)
void SetTimes(double start, double end, double audio)
AudacityProject & mProject
Definition: ToolBar.h:251
PlayRegion playRegion
Definition: ViewInfo.h:217
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:216
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:235

References AudioIO::Get(), ViewInfo::Get(), ProjectAudioIO::Get(), PlayRegion::GetStart(), ToolBar::mProject, ViewInfo::playRegion, ViewInfo::selectedRegion, and SetTimes().

Here is the call graph for this function:

◆ OnRate()

void SelectionBar::OnRate ( wxCommandEvent &  event)
private

Definition at line 737 of file SelectionBar.cpp.

738{
739 auto value = mRateBox->GetValue();
740
741 if (value.ToDouble(&mRate) && // is a numeric value
742 (mRate != 0.0))
743 {
745 int i;
746 for(i=0;i<5;i++)
747 if( *Ctrls[i] )
748 (*Ctrls[i])->SetSampleRate( mRate );
750
751 mLastValidText = value;
752 }
753 else
754 {
755 // Bug 2497 - Undo paste into text box if it's not numeric
756 mRateBox->SetValue(mLastValidText);
757 }
758}
wxString mLastValidText
Definition: SelectionBar.h:117
wxComboBox * mRateBox
Definition: SelectionBar.h:113
virtual void AS_SetRate(double rate)=0

References SelectionBarListener::AS_SetRate(), mAudioTime, mCenterTime, mEndTime, mLastValidText, mLengthTime, mListener, mRate, mRateBox, and mStartTime.

Here is the call graph for this function:

◆ OnSize()

void SelectionBar::OnSize ( wxSizeEvent &  evt)
private

Definition at line 404 of file SelectionBar.cpp.

405{
406 Refresh( true );
407
408 evt.Skip();
409}

◆ OnSnapTo()

void SelectionBar::OnSnapTo ( wxCommandEvent &  event)
private

Definition at line 808 of file SelectionBar.cpp.

809{
810 mListener->AS_SetSnapTo(mSnapTo->GetSelection());
811}
wxChoice * mSnapTo
Definition: SelectionBar.h:114
virtual void AS_SetSnapTo(int snap)=0

References SelectionBarListener::AS_SetSnapTo(), mListener, and mSnapTo.

Here is the call graph for this function:

◆ OnUpdate()

void SelectionBar::OnUpdate ( wxCommandEvent &  evt)
private

Definition at line 500 of file SelectionBar.cpp.

501{
502 wxWindow *w = FindFocus();
504 int i;
505 int iFocus = -1;
506 for(i=0;i<5;i++)
507 if( w == *Ctrls[i] )
508 iFocus = i;
509
510 evt.Skip(false);
511
513
514 // Save format name before recreating the controls so they resize properly
515 if (mStartTime)
516 {
517 if (mListener)
519 }
520
521 // ReCreateButtons() will get rid of our sizers and controls
522 // so reset pointers first.
523 for( i=0;i<5;i++)
524 *Ctrls[i]=NULL;
525
526 mChoice = NULL;
527 mRateBox = NULL;
528 mRateText = NULL;
529 mSnapTo = NULL;
530
532
534
535 for( i=0;i<5;i++)
536 if( *Ctrls[i] )
537 (*Ctrls[i])->SetFormatName( format );
538
539 if( iFocus >=0 )
540 if( *Ctrls[iFocus] )
541 (*Ctrls[iFocus])->SetFocus();
542
544
545 Updated();
546}
int format
Definition: ExportPCM.cpp:56
static NumericFormatSymbol LookupFormat(Type type, const wxString &id)
void RegenerateTooltips() override
virtual void AS_SetSelectionFormat(const NumericFormatSymbol &format)=0
virtual void ReCreateButtons()
Definition: ToolBar.cpp:525
void Updated()
Definition: ToolBar.cpp:670

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Populate()

void SelectionBar::Populate ( )
overridevirtual

Implements ToolBar.

Definition at line 186 of file SelectionBar.cpp.

187{
188 SetBackgroundColour( theTheme.Colour( clrMedium ) );
189
191
192 // Outer sizer has space top and left.
193 // Inner sizers have space on right only.
194 // This choice makes for a nice border and internal spacing and places clear responsibility
195 // on each sizer as to what spacings it creates.
196 wxFlexGridSizer *mainSizer = safenew wxFlexGridSizer(SIZER_COLS, 1, 1);
197 Add(mainSizer, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 5);
198
199 // Top row (mostly labels)
200 wxColour clrText = theTheme.Colour( clrTrackPanelText );
201 wxColour clrText2 = *wxBLUE;
202 auStaticText *rateLabel = AddTitle( XO("Project Rate (Hz)"), mainSizer );
203 AddVLine( mainSizer );
204 auStaticText *snapLabel = AddTitle( XO("Snap-To"), mainSizer );
205 AddVLine( mainSizer );
206#ifdef TIME_IN_SELECT_TOOLBAR
207 AddTitle( XO("Audio Position"), mainSizer );
208 AddVLine( mainSizer );
209#endif
210
211 {
212 const wxString choices[4] = {
213 _("Start and End of Selection"),
214 _("Start and Length of Selection"),
215 _("Length and End of Selection"),
216 _("Length and Center of Selection"),
217 };
218 mChoice = safenew wxChoice
219 (this, ChoiceID, wxDefaultPosition, wxDefaultSize, 4, choices,
220 0, wxDefaultValidator, _("Show"));
221 mChoice->SetSelection(0);
222#if wxUSE_ACCESSIBILITY
223 // so that name can be set on a standard control
224 mChoice->SetAccessible(safenew WindowAccessible(mChoice));
225#endif
226 mainSizer->Add(mChoice, 0, wxEXPAND | wxALIGN_TOP | wxRIGHT, 6);
227 }
228
229 // Bottom row, (mostly time controls)
230 mRateBox = safenew wxComboBox(this, RateID,
231 wxT(""),
232 wxDefaultPosition, wxDefaultSize);
233#if wxUSE_ACCESSIBILITY
234 // so that name can be set on a standard control
235 mRateBox->SetAccessible(safenew WindowAccessible(mRateBox));
236#endif
237 mRateBox->SetName(_("Project Rate (Hz)"));
238 //mRateBox->SetForegroundColour( clrText2 );
239 wxTextValidator vld(wxFILTER_INCLUDE_CHAR_LIST);
240 vld.SetIncludes(wxArrayString(10, numbers));
241 mRateBox->SetValidator(vld);
242 mRateBox->SetValue(wxString::Format(wxT("%d"), (int)mRate));
243 UpdateRates(); // Must be done _after_ setting value on mRateBox!
244
245 // We need to capture the SetFocus and KillFocus events to set up
246 // for keyboard capture. On Windows and GTK it's easy since the
247 // combobox is presented as one control to hook into.
249
250#if defined(__WXMAC__)
251 // The Mac uses a standard wxTextCtrl for the edit portion and that's
252 // the control that gets the focus events. So we have to find the
253 // textctrl.
254 wxWindowList kids = mRateBox->GetChildren();
255 for (unsigned int i = 0; i < kids.size(); i++) {
256 wxClassInfo *ci = kids[i]->GetClassInfo();
257 if (ci->IsKindOf(CLASSINFO(wxTextCtrl))) {
258 mRateText = kids[i];
259 break;
260 }
261 }
262#endif
263
264 mRateText->Bind(wxEVT_SET_FOCUS,
266 this);
267 mRateText->Bind(wxEVT_KILL_FOCUS,
269 this);
270
271 mainSizer->Add(mRateBox, 0, wxEXPAND | wxALIGN_TOP | wxRIGHT, 5);
272
273 AddVLine( mainSizer );
274
275 mSnapTo = safenew wxChoice(this, SnapToID,
276 wxDefaultPosition, wxDefaultSize,
277 transform_container< wxArrayStringEx >(
279 std::mem_fn( &TranslatableString::Translation ) ) );
280
281#if wxUSE_ACCESSIBILITY
282 // so that name can be set on a standard control
283 mSnapTo->SetAccessible(safenew WindowAccessible(mSnapTo));
284#endif
285 mSnapTo->SetName(_("Snap To"));
286 //mSnapTo->SetForegroundColour( clrText2 );
287 mSnapTo->SetSelection(mListener ? mListener->AS_GetSnapTo() : SNAP_OFF);
288
289 mSnapTo->Bind(wxEVT_SET_FOCUS,
291 this);
292 mSnapTo->Bind(wxEVT_KILL_FOCUS,
294 this);
295
296 mainSizer->Add(mSnapTo, 0, wxEXPAND | wxALIGN_TOP | wxRIGHT, 5);
297
298 AddVLine( mainSizer );
299
300#ifdef TIME_IN_SELECT_TOOLBAR
301 mAudioTime = AddTime( XO("Audio Position"), AudioTimeID, mainSizer );
302 // This vertical line is NOT just for decoration!
303 // It works around a wxWidgets-on-Windows RadioButton bug, where tabbing
304 // into the radiobutton group jumps to selecting the first item in the
305 // group even if some other item had been selected.
306 // It is an important bug to work around for screen reader users, who use TAB
307 // a lot in navigation.
308 // More about the bug here:
309 // https://forums.wxwidgets.org/viewtopic.php?t=41120
310 AddVLine( mainSizer );
311#endif
312
313 {
314 auto hSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
315
316 mStartTime = AddTime( XO("Start"), StartTimeID, hSizer.get() );
317 mLengthTime = AddTime( XO("Length"), LengthTimeID, hSizer.get() );
318 mCenterTime = AddTime( XO("Center"), CenterTimeID, hSizer.get() );
319 mEndTime = AddTime( XO("End"), EndTimeID, hSizer.get() );
320 mainSizer->Add(hSizer.release(), 0, wxALIGN_TOP | wxRIGHT, 0);
321 }
322
323#if defined(__WXGTK3__)
324 // Nothing special
325#elif defined(__WXGTK__)
326 // Ensure the font fits inside (hopefully)
327 wxFont font = mChoice->GetFont();
328 font.Scale((double) toolbarSingle / mChoice->GetSize().GetHeight());
329
330 rateLabel->SetFont(font);
331 snapLabel->SetFont(font);
332 mChoice->SetFont(font);
333 mRateBox->SetFont(font);
334 mRateText->SetFont(font);
335 mSnapTo->SetFont(font);
336#endif
337
338 // Make sure they are fully expanded to the longest item
339 mChoice->SetMinSize(wxSize(mChoice->GetBestSize().x, toolbarSingle));
340 mRateBox->SetMinSize(wxSize(mRateBox->GetBestSize().x, toolbarSingle));
341 mSnapTo->SetMinSize(wxSize(mSnapTo->GetBestSize().x, toolbarSingle));
342
343 mChoice->MoveBeforeInTabOrder( mStartTime );
344 // This shows/hides controls.
345 // Do this before layout so that we are sized right.
347 mainSizer->Layout();
349 Layout();
350}
#define _(s)
Definition: Internat.h:75
@ SNAP_OFF
@ RateID
@ SnapToID
@ AudioTimeID
@ ChoiceID
static const wxChar * numbers[]
#define SIZER_COLS
Definition: SelectionBar.h:31
auStaticText * AddTitle(const TranslatableString &Title, wxSizer *pSizer)
NumericTextCtrl * AddTime(const TranslatableString &Name, int id, wxSizer *pSizer)
void OnFocus(wxFocusEvent &event)
void AddVLine(wxSizer *pSizer)
void UpdateRates()
virtual int AS_GetSnapTo()=0
static const TranslatableStrings & GetSnapLabels()
Definition: Snap.cpp:318
void Add(wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL)
Definition: ToolBar.cpp:695
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...

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(), wxT(), and XO.

Here is the call graph for this function:

◆ RegenerateTooltips()

void SelectionBar::RegenerateTooltips ( )
overridevirtual

Implements ToolBar.

Definition at line 391 of file SelectionBar.cpp.

392{
393#if wxUSE_TOOLTIPS
394 auto formatName =
398 mSnapTo->SetToolTip(
399 wxString::Format(
400 _("Snap Clicks/Selections to %s"), formatName.Translation() ));
401#endif
402}

References _, SelectionBarListener::AS_GetSelectionFormat(), mListener, and mSnapTo.

Referenced by OnUpdate(), Populate(), and UpdatePrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Repaint()

void SelectionBar::Repaint ( wxDC *  WXUNUSEDdc)
inlineoverride

Definition at line 58 of file SelectionBar.h.

58{};

◆ SelectionModeUpdated()

void SelectionBar::SelectionModeUpdated ( )
private

Definition at line 614 of file SelectionBar.cpp.

615{
616 // We just changed the mode. Remember it.
617 gPrefs->Write(wxT("/SelectionToolbarMode"), mSelectionMode);
618 gPrefs->Flush();
619
620 wxSize sz = GetMinSize();
621 sz.SetWidth( 10 );
622 SetMinSize( sz );
623 Fit();
624 Layout();
625 Updated();
626}
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143

References FileConfig::Flush(), gPrefs, mSelectionMode, ToolBar::Updated(), and wxT().

Referenced by OnChoice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDrivers()

void SelectionBar::SetDrivers ( int  driver1,
int  driver2 
)
private

Definition at line 550 of file SelectionBar.cpp.

551{
552 mDrive1 = driver1;
553 mDrive2 = driver2;
554
556 static TranslatableString Text[4] = {
557 /* i18n-hint noun */
558 XO("Start"),
559 XO("Center"),
560 XO("Length"),
561 /* i18n-hint noun */
562 XO("End")
563 };
564
565 for(int i=0;i<4;i++){
566 int id = i + StartTimeID;
567 int fixed = (( id == mDrive2 )?mDrive1:mDrive2)-StartTimeID;
568
569 const auto &Temp = Text[i];
570 auto Title = ( (id!=mDrive1) && (id!=mDrive2 ) )
571 /* i18n-hint: %s is replaced e.g by one of 'Length', 'Center',
572 'Start', or 'End' (translated), to indicate that it will be
573 calculated from other parameters. */
574 ? XO("%s - driven").Format( Temp )
575 : Temp ;
576 auto VoiceOverText =
577 /* i18n-hint: each string is replaced by one of 'Length', 'Center',
578 'Start', or 'End' (translated) */
579 XO("Selection %s. %s won't change.").Format( Temp, Text[fixed] );
580 if( *Ctrls[i] ){
581 (*Ctrls[i])->SetName( Temp );
582 }
583 }
584}
Holds a msgid for the translation catalog; may also bind format arguments.

References fast_float::fixed, mCenterTime, mDrive1, mDrive2, mEndTime, mLengthTime, mStartTime, wxPanelWrapper::SetName(), StartTimeID, and XO.

Referenced by ModifySelection(), and SetSelectionMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetListener()

void SelectionBar::SetListener ( SelectionBarListener l)

Definition at line 383 of file SelectionBar.cpp.

384{
385 mListener = l;
389};
void SetSelectionFormat(const NumericFormatSymbol &format)
void SetRate(double rate)
void SetSnapTo(int)
virtual double AS_GetRate()=0

References SelectionBarListener::AS_GetRate(), SelectionBarListener::AS_GetSelectionFormat(), SelectionBarListener::AS_GetSnapTo(), mListener, SetRate(), SetSelectionFormat(), and SetSnapTo().

Referenced by ProjectManager::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetRate()

void SelectionBar::SetRate ( double  rate)

Definition at line 721 of file SelectionBar.cpp.

722{
723 if (rate != mRate) {
724 // if the rate is actually being changed
725 mRate = rate; // update the stored rate
726 mRateBox->SetValue(wxString::Format(wxT("%d"), (int)rate));
727
728 // update the TimeTextCtrls if they exist
730 int i;
731 for(i=0;i<5;i++)
732 if( *Ctrls[i] )
733 (*Ctrls[i])->SetSampleRate( rate );
734 }
735}

References mAudioTime, mCenterTime, mEndTime, mLengthTime, mRate, mRateBox, mStartTime, and wxT().

Referenced by ProjectFileManager::AddImportedTracks(), ProjectSelectionManager::AS_SetRate(), ProjectFileManager::OpenProjectFile(), and SetListener().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSelectionFormat()

void SelectionBar::SetSelectionFormat ( const NumericFormatSymbol format)

Definition at line 708 of file SelectionBar.cpp.

709{
710 bool changed =
712
713 // Test first whether changed, to avoid infinite recursion from OnUpdate
714 if ( changed ) {
715 wxCommandEvent e;
716 e.SetString(format.Internal());
717 OnUpdate(e);
718 }
719}
FormatStrings GetBuiltinFormat(const int index)
bool SetFormatString(const FormatStrings &formatString)
void OnUpdate(wxCommandEvent &evt)

References format, NumericConverter::GetBuiltinFormat(), mStartTime, OnUpdate(), and NumericTextCtrl::SetFormatString().

Referenced by ProjectSelectionManager::AS_SetSelectionFormat(), and SetListener().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSelectionMode()

void SelectionBar::SetSelectionMode ( int  mode)
private

Definition at line 631 of file SelectionBar.cpp.

632{
633 // Only modes 0 to 3 are now supported,
634 // so fix up a mode that could have come from the config.
635 const int maxMode = 3;
636
637 if( mode > maxMode )
638 mode = 0;
639 if( mode < 0 )
640 mode = 0;
641 mSelectionMode = mode;
642 mChoice->SetSelection( mode );
643
644 // First decide which two controls drive the others...
645 // For example the last option is with all controls shown, and in that mode we
646 // initially have start and end driving.
649 int Drive1[] = { EndTimeID, LengthTimeID, EndTimeID, CenterTimeID,
651
652 SetDrivers( Drive1[mode], Drive2[mode] );
653 // Then show/hide the relevant controls.
654 ShowHideControls( mode );
655}
void ShowHideControls(int mode)

References CenterTimeID, EndTimeID, LengthTimeID, mChoice, mSelectionMode, SetDrivers(), ShowHideControls(), and StartTimeID.

Referenced by OnChoice(), and Populate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSnapTo()

void SelectionBar::SetSnapTo ( int  snap)

Definition at line 703 of file SelectionBar.cpp.

704{
705 mSnapTo->SetSelection(snap);
706}

References mSnapTo.

Referenced by ProjectSelectionManager::AS_SetSnapTo(), and SetListener().

Here is the caller graph for this function:

◆ SetTimes()

void SelectionBar::SetTimes ( double  start,
double  end,
double  audio 
)

Definition at line 687 of file SelectionBar.cpp.

688{
689 if ( start != mStart || end != mEnd || audio != mAudio
691 ) {
692 mStart = start;
693 mEnd = end;
694 mLength = end-start;
695 mCenter = (end+start)/2.0;
696 mAudio = audio;
698
700 }
701}
int mLastSelectionMode
Definition: SelectionBar.h:104
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159

References PackedArray::end(), mAudio, mCenter, mEnd, mLastSelectionMode, mLength, mSelectionMode, mStart, and ValuesToControls().

Referenced by OnIdle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowHideControls()

void SelectionBar::ShowHideControls ( int  mode)
private

Definition at line 658 of file SelectionBar.cpp.

659{
660 // The bits in these say which controls are visible.
661 int masks[8]= {
662 9, 5, 12, 6, // 2 items shown
663 13, 7, 11,// 3 items shown
664 15};
665 int mask = masks[mode];
666
668 for(int i=0;i<4;i++){
669 if( *Ctrls[i]){
670 (*Ctrls[i])->Show( (mask & (1<<i))!=0 );
671 (*Ctrls[i])->Refresh();
672 }
673 }
674}

References mCenterTime, mEndTime, mLengthTime, and mStartTime.

Referenced by SetSelectionMode().

Here is the caller graph for this function:

◆ UpdatePrefs()

void SelectionBar::UpdatePrefs ( )
overridevirtual

Implements PrefsListener.

Definition at line 352 of file SelectionBar.cpp.

353{
354 // The project rate is no longer driven from here.
355 // When preferences change, the Project learns about it too.
356 // If necessary we can drive the SelectionBar mRate via the Project
357 // calling our SetRate().
358 // As of 13-Sep-2018, changes to the sample rate pref will only affect
359 // creation of new projects, not the sample rate in existing ones.
360
361 // This will only change the selection mode during a "Reset Configuration"
362 // action since the read value will be the same during a normal preferences
363 // update.
364 mSelectionMode = gPrefs->ReadLong(wxT("/SelectionToolbarMode"), 0);
365
366 // This will only change the time format during a "Reset Configuration"
367 // action since the read value will be the same during a normal preferences
368 // update.
369 wxCommandEvent e;
372 gPrefs->Read(wxT("/SelectionFormat"), wxT(""))).Internal());
373 OnUpdate(e);
374
375 // Set label to pull in language change
376 SetLabel(XO("Selection"));
377
379 // Give base class a chance
381}
@ Internal
Indicates internal failure from Audacity.
void SetLabel(const wxString &label) override
Definition: ToolBar.cpp:407
void UpdatePrefs() override
Definition: ToolBar.cpp:614

References gPrefs, Internal, NumericConverter::LookupFormat(), mSelectionMode, OnUpdate(), RegenerateTooltips(), ToolBar::SetLabel(), NumericConverter::TIME, ToolBar::UpdatePrefs(), wxT(), and XO.

Referenced by Create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateRates()

void SelectionBar::UpdateRates ( )
private

Definition at line 760 of file SelectionBar.cpp.

761{
762 wxString oldValue = mRateBox->GetValue();
763 mRateBox->Clear();
764 for (int i = 0; i < AudioIOBase::NumStandardRates; i++) {
765 mRateBox->Append(
766 wxString::Format(wxT("%d"), AudioIOBase::StandardRates[i]));
767 }
768 mRateBox->SetValue(oldValue);
769}
static const int StandardRates[]
Array of common audio sample rates.
Definition: AudioIOBase.h:190
static const int NumStandardRates
How many standard sample rates there are.
Definition: AudioIOBase.h:192

References mRateBox, AudioIOBase::NumStandardRates, AudioIOBase::StandardRates, and wxT().

Referenced by Populate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ValuesToControls()

void SelectionBar::ValuesToControls ( )
private

Definition at line 676 of file SelectionBar.cpp.

677{
679 double Values[5] = {mStart, mEnd, mLength, mCenter, mAudio };
680 int i;
681 for(i=0;i<5;i++)
682 if( *Ctrls[i] )
683 (*Ctrls[i])->SetValue( Values[i] );
684}

References mAudio, mAudioTime, mCenter, mCenterTime, mEnd, mEndTime, mLength, mLengthTime, mStart, and mStartTime.

Referenced by ModifySelection(), OnUpdate(), and SetTimes().

Here is the caller graph for this function:

Member Data Documentation

◆ mAudio

double SelectionBar::mAudio
private

Definition at line 96 of file SelectionBar.h.

Referenced by SetTimes(), and ValuesToControls().

◆ mAudioTime

NumericTextCtrl* SelectionBar::mAudioTime
private

Definition at line 110 of file SelectionBar.h.

Referenced by OnRate(), OnUpdate(), Populate(), SetRate(), and ValuesToControls().

◆ mCenter

double SelectionBar::mCenter
private

Definition at line 96 of file SelectionBar.h.

Referenced by ModifySelection(), SetTimes(), and ValuesToControls().

◆ mCenterTime

NumericTextCtrl* SelectionBar::mCenterTime
private

◆ mChoice

wxChoice* SelectionBar::mChoice
private

Definition at line 111 of file SelectionBar.h.

Referenced by OnChoice(), OnUpdate(), Populate(), and SetSelectionMode().

◆ mDrive1

int SelectionBar::mDrive1
private

Definition at line 100 of file SelectionBar.h.

Referenced by ModifySelection(), and SetDrivers().

◆ mDrive2

int SelectionBar::mDrive2
private

Definition at line 101 of file SelectionBar.h.

Referenced by ModifySelection(), and SetDrivers().

◆ mEnd

double SelectionBar::mEnd
private

Definition at line 96 of file SelectionBar.h.

Referenced by ModifySelection(), SetTimes(), and ValuesToControls().

◆ mEndTime

NumericTextCtrl* SelectionBar::mEndTime
private

◆ mLastSelectionMode

int SelectionBar::mLastSelectionMode { 0 }
private

Definition at line 104 of file SelectionBar.h.

Referenced by SetTimes().

◆ mLastValidText

wxString SelectionBar::mLastValidText
private

Definition at line 117 of file SelectionBar.h.

Referenced by OnRate().

◆ mLength

double SelectionBar::mLength
private

Definition at line 96 of file SelectionBar.h.

Referenced by ModifySelection(), SetTimes(), and ValuesToControls().

◆ mLengthTime

NumericTextCtrl* SelectionBar::mLengthTime
private

◆ mListener

SelectionBarListener* SelectionBar::mListener
private

◆ mProxy

wxStaticText* SelectionBar::mProxy
private

Definition at line 112 of file SelectionBar.h.

◆ mRate

double SelectionBar::mRate
private

Definition at line 95 of file SelectionBar.h.

Referenced by AddTime(), OnRate(), Populate(), and SetRate().

◆ mRateBox

wxComboBox* SelectionBar::mRateBox
private

Definition at line 113 of file SelectionBar.h.

Referenced by OnRate(), OnUpdate(), Populate(), SetRate(), and UpdateRates().

◆ mRateText

wxWindow* SelectionBar::mRateText
private

Definition at line 115 of file SelectionBar.h.

Referenced by OnCaptureKey(), OnUpdate(), and Populate().

◆ mSelectionMode

int SelectionBar::mSelectionMode { 0 }
private

◆ mSnapTo

wxChoice* SelectionBar::mSnapTo
private

Definition at line 114 of file SelectionBar.h.

Referenced by OnSnapTo(), OnUpdate(), Populate(), RegenerateTooltips(), and SetSnapTo().

◆ mStart

double SelectionBar::mStart
private

Definition at line 96 of file SelectionBar.h.

Referenced by ModifySelection(), SetTimes(), and ValuesToControls().

◆ mStartTime

NumericTextCtrl* SelectionBar::mStartTime
private

The documentation for this class was generated from the following files: