Audacity  2.2.0
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:
ToolBar wxTabTraversalWrapper< Base >

Public Member Functions

 SelectionBar ()
 
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 SetField (const wxChar *msg, int fieldNum)
 
void SetSnapTo (int)
 
void SetSelectionFormat (const wxString &format)
 
void SetRate (double rate)
 
void SetListener (SelectionBarListener *l)
 
void RegenerateTooltips () override
 
void OnButton (wxCommandEvent &event)
 
- Public Member Functions inherited from ToolBar
 ToolBar (int type, const wxString &label, const wxString &section, bool resizable=false)
 
virtual ~ToolBar ()
 
bool AcceptsFocus () const override
 
virtual void ReCreateButtons ()
 
int GetType ()
 
wxString GetTitle ()
 
wxString GetLabel ()
 
wxString GetSection ()
 
ToolDockGetDock ()
 
void SetLabel (const wxString &label)
 
void SetDock (ToolDock *dock)
 
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 ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< Base >
template<typename... Args>
 wxTabTraversalWrapper (Args &&...args)
 
 ~wxTabTraversalWrapper ()
 

Private Member Functions

wxRadioButton * AddRadioButton (const wxString &Name, int id, wxSizer *pSizer, long style)
 
auStaticTextAddTitle (const wxString &Title, wxSizer *pSizer)
 
NumericTextCtrlAddTime (const wxString 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 OnTitleClicked (int newDriver)
 
void OnStartTitleClicked (wxMouseEvent &event)
 
void OnCenterTitleClicked (wxMouseEvent &event)
 
void OnLengthTitleClicked (wxMouseEvent &event)
 
void OnEndTitleClicked (wxMouseEvent &event)
 
void OnModeDecClicked (wxMouseEvent &event)
 
void OnModeIncClicked (wxMouseEvent &event)
 
void OnChooserTitleClicked (wxMouseEvent &event)
 
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 OnFieldChoice (wxCommandEvent &event)
 
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
 
wxString mField [10]
 
bool mbUseNativeRadioButton
 
int mDrive1
 
int mDrive2
 
int mSelectionMode
 
NumericTextCtrlmStartTime
 
NumericTextCtrlmCenterTime
 
NumericTextCtrlmLengthTime
 
NumericTextCtrlmEndTime
 
NumericTextCtrlmAudioTime
 
wxChoice * mChoice
 
wxStaticText * mProxy
 
wxComboBox * mRateBox
 
wxChoice * mSnapTo
 
wxWindow * mRateText
 
AButtonmButtons [numSelectionBarButtons]
 

Additional Inherited Members

- Public Types inherited from ToolBar
using Holder = Destroy_ptr< ToolBar >
 
- 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 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 (AButton &button, const std::vector< wxString > &commands)
 
- Protected Member Functions inherited from ToolBar
void SetButton (bool down, AButton *button)
 
void MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
void MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
void MakeButtonBackgroundsLarge ()
 
void MakeButtonBackgroundsSmall ()
 
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 Repaint (wxDC *dc)=0
 
void OnErase (wxEraseEvent &event)
 
void OnPaint (wxPaintEvent &event)
 
void OnMouseEvents (wxMouseEvent &event)
 
- Protected Attributes inherited from ToolBar
wxString mLabel
 
wxString mSection
 
int mType
 

Detailed Description

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

Constructor & Destructor Documentation

SelectionBar::SelectionBar ( )
SelectionBar::~SelectionBar ( )
virtual

Member Function Documentation

wxRadioButton * SelectionBar::AddRadioButton ( const wxString &  Name,
int  id,
wxSizer *  pSizer,
long  style 
)
private
NumericTextCtrl * SelectionBar::AddTime ( const wxString  Name,
int  id,
wxSizer *  pSizer 
)
private
auStaticText * SelectionBar::AddTitle ( const wxString &  Title,
wxSizer *  pSizer 
)
private

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

Referenced by Populate().

void SelectionBar::AddVLine ( wxSizer *  pSizer)
private

References safenew, and toolbarSingle.

Referenced by Populate().

void SelectionBar::Create ( wxWindow *  parent)
overridevirtual

Reimplemented from ToolBar.

References ToolBar::Create().

void SelectionBar::EnableDisableButtons ( )
inlineoverridevirtual

Implements ToolBar.

void SelectionBar::ModifySelection ( int  newDriver,
bool  done = false 
)
private
void SelectionBar::OnButton ( wxCommandEvent &  event)
void SelectionBar::OnCaptureKey ( wxCommandEvent &  event)
private

References mRateText.

void SelectionBar::OnCenterTitleClicked ( wxMouseEvent &  event)
private

References CenterTimeID, and OnTitleClicked().

void SelectionBar::OnChangedTime ( wxCommandEvent &  evt)
private

References ModifySelection().

void SelectionBar::OnChoice ( wxCommandEvent &  event)
private
void SelectionBar::OnChooserTitleClicked ( wxMouseEvent &  event)
private

References OnButton().

void SelectionBar::OnEndTitleClicked ( wxMouseEvent &  event)
private

References EndTimeID, and OnTitleClicked().

void SelectionBar::OnFieldChoice ( wxCommandEvent &  event)
private
void SelectionBar::OnFocus ( wxFocusEvent &  event)
private
void SelectionBar::OnLengthTitleClicked ( wxMouseEvent &  event)
private

References LengthTimeID, and OnTitleClicked().

void SelectionBar::OnModeDecClicked ( wxMouseEvent &  event)
private
void SelectionBar::OnModeIncClicked ( wxMouseEvent &  event)
private
void SelectionBar::OnRate ( wxCommandEvent &  event)
private
void SelectionBar::OnSize ( wxSizeEvent &  evt)
private
void SelectionBar::OnSnapTo ( wxCommandEvent &  event)
private
void SelectionBar::OnStartTitleClicked ( wxMouseEvent &  event)
private

References OnTitleClicked(), and StartTimeID.

void SelectionBar::OnTitleClicked ( int  newDriver)
private
void SelectionBar::RegenerateTooltips ( )
overridevirtual
void SelectionBar::Repaint ( wxDC *  WXUNUSEDdc)
inlineoverride
void SelectionBar::SelectionModeUpdated ( )
private
void SelectionBar::SetDrivers ( int  driver1,
int  driver2 
)
private
void SelectionBar::SetField ( const wxChar *  msg,
int  fieldNum 
)

References mField.

void SelectionBar::SetRate ( double  rate)
void SelectionBar::SetSelectionMode ( int  mode)
private
void SelectionBar::SetSnapTo ( int  snap)

References mSnapTo.

Referenced by SetListener(), and AudacityProject::SetSnapTo().

void SelectionBar::SetTimes ( double  start,
double  end,
double  audio 
)
void SelectionBar::ShowHideControls ( int  mode)
private

References mCenterTime, mEndTime, mLengthTime, and mStartTime.

Referenced by SetSelectionMode().

void SelectionBar::UpdateRates ( )
private
void SelectionBar::ValuesToControls ( )
private

Member Data Documentation

double SelectionBar::mAudio
private

Referenced by SetTimes(), and ValuesToControls().

NumericTextCtrl* SelectionBar::mAudioTime
private
bool SelectionBar::mbUseNativeRadioButton
private
AButton* SelectionBar::mButtons[numSelectionBarButtons]
private

Referenced by OnButton().

double SelectionBar::mCenter
private
wxChoice* SelectionBar::mChoice
private
int SelectionBar::mDrive1
private

Referenced by ModifySelection(), and SetDrivers().

int SelectionBar::mDrive2
private
double SelectionBar::mEnd
private
wxString SelectionBar::mField[10]
private

Referenced by SetField().

double SelectionBar::mLength
private
wxStaticText* SelectionBar::mProxy
private

Referenced by AddRadioButton().

double SelectionBar::mRate
private
wxComboBox* SelectionBar::mRateBox
private
wxWindow* SelectionBar::mRateText
private

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

int SelectionBar::mSelectionMode
private
wxChoice* SelectionBar::mSnapTo
private
double SelectionBar::mStart
private

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