Audacity  2.2.0
TranscriptionToolBar Class Referencefinal

A kind of ToolBar used to help with analysing voice recordings. More...

#include <TranscriptionToolBar.h>

Inheritance diagram for TranscriptionToolBar:
ToolBar wxTabTraversalWrapper< Base >

Public Member Functions

 TranscriptionToolBar ()
 
virtual ~TranscriptionToolBar ()
 
void Create (wxWindow *parent)
 
void OnKeyEvent (wxKeyEvent &event)
 
void OnPlaySpeed (wxCommandEvent &event)
 
void OnSpeedSlider (wxCommandEvent &event)
 
void Populate () override
 
void Repaint (wxDC *WXUNUSED(dc)) override
 
void EnableDisableButtons () override
 
void UpdatePrefs () override
 
void OnFocus (wxFocusEvent &event)
 
void OnCaptureKey (wxCommandEvent &event)
 
void PlayAtSpeed (bool looped, bool cutPreview)
 
void ShowPlaySpeedDialog ()
 
void AdjustPlaySpeed (float adj)
 
void SetEnabled (bool enabled)
 
void SetPlaying (bool down, bool looped, bool cutPreview)
 
double GetPlaySpeed () const
 
- 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 this. More...
 
virtual int GetMinToolbarWidth ()
 
virtual wxSize GetDockedSize ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< Base >
template<typename... Args>
 wxTabTraversalWrapper (Args &&...args)
 
 ~wxTabTraversalWrapper ()
 

Private Member Functions

void InitializeTranscriptionToolBar ()
 
AButtonAddButton (teBmps eFore, teBmps eDisabled, int id, const wxChar *label)
 
void MakeAlternateImages (teBmps eFore, teBmps eDisabled, int id, unsigned altIdx)
 
void GetSamples (const WaveTrack *t, sampleCount *s0, sampleCount *slen)
 
void SetButton (bool newstate, AButton *button)
 
void RegenerateTooltips () override
 

Private Attributes

AButtonmButtons [TTBNumButtons]
 
wxImage * upImage
 
wxImage * downImage
 
wxImage * hiliteImage
 
ASlidermPlaySpeedSlider
 
double mPlaySpeed
 
ASlidermSensitivitySlider
 
wxBrush mBackgroundBrush
 
wxPen mBackgroundPen
 
int mBackgroundWidth
 
int mBackgroundHeight
 
std::unique_ptr< TimeTrackmTimeTrack
 

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 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 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

A kind of ToolBar used to help with analysing voice recordings.

Constructor & Destructor Documentation

TranscriptionToolBar::TranscriptionToolBar ( )

References mPlaySpeed.

TranscriptionToolBar::~TranscriptionToolBar ( )
virtual

Member Function Documentation

AButton * TranscriptionToolBar::AddButton ( teBmps  eFore,
teBmps  eDisabled,
int  id,
const wxChar *  label 
)
private

This is a convenience function that allows for button creation in MakeButtons() with fewer arguments Very similar to code in ControlToolBar...

References ToolBar::Add(), ThemeBase::ImageSize(), ToolBar::MakeButton(), mButtons, and theTheme.

Referenced by Populate().

void TranscriptionToolBar::AdjustPlaySpeed ( float  adj)
void TranscriptionToolBar::Create ( wxWindow *  parent)
virtual
void TranscriptionToolBar::EnableDisableButtons ( )
overridevirtual
double TranscriptionToolBar::GetPlaySpeed ( ) const
inline

References mPlaySpeed.

Referenced by Scrubber::MaybeStartScrubbing().

void TranscriptionToolBar::GetSamples ( const WaveTrack t,
sampleCount *  s0,
sampleCount *  slen 
)
private
void TranscriptionToolBar::InitializeTranscriptionToolBar ( )
private
void TranscriptionToolBar::MakeAlternateImages ( teBmps  eFore,
teBmps  eDisabled,
int  id,
unsigned  altIdx 
)
private
void TranscriptionToolBar::OnCaptureKey ( wxCommandEvent &  event)

References mPlaySpeedSlider.

void TranscriptionToolBar::OnFocus ( wxFocusEvent &  event)
void TranscriptionToolBar::OnKeyEvent ( wxKeyEvent &  event)

References gAudioIO, and AudioIO::IsBusy().

void TranscriptionToolBar::OnPlaySpeed ( wxCommandEvent &  event)
void TranscriptionToolBar::OnSpeedSlider ( wxCommandEvent &  event)
void TranscriptionToolBar::RegenerateTooltips ( )
overrideprivatevirtual
void TranscriptionToolBar::Repaint ( wxDC *  WXUNUSEDdc)
inlineoverride
void TranscriptionToolBar::SetButton ( bool  newstate,
AButton button 
)
private

References AButton::PopUp(), and AButton::PushDown().

Referenced by PlayAtSpeed().

void TranscriptionToolBar::SetEnabled ( bool  enabled)
void TranscriptionToolBar::SetPlaying ( bool  down,
bool  looped,
bool  cutPreview 
)
void TranscriptionToolBar::ShowPlaySpeedDialog ( )
void TranscriptionToolBar::UpdatePrefs ( )
overridevirtual

Reimplemented from ToolBar.

References _(), RegenerateTooltips(), ToolBar::SetLabel(), and ToolBar::UpdatePrefs().

Referenced by Populate().

Member Data Documentation

wxImage* TranscriptionToolBar::downImage
private
wxImage* TranscriptionToolBar::hiliteImage
private
wxBrush TranscriptionToolBar::mBackgroundBrush
private

Referenced by Create().

int TranscriptionToolBar::mBackgroundHeight
private

Referenced by Create().

wxPen TranscriptionToolBar::mBackgroundPen
private

Referenced by Create().

int TranscriptionToolBar::mBackgroundWidth
private

Referenced by Create().

double TranscriptionToolBar::mPlaySpeed
private
ASlider* TranscriptionToolBar::mPlaySpeedSlider
private
ASlider* TranscriptionToolBar::mSensitivitySlider
private

Referenced by Populate(), and RegenerateTooltips().

std::unique_ptr<TimeTrack> TranscriptionToolBar::mTimeTrack
private

Referenced by PlayAtSpeed().

wxImage* TranscriptionToolBar::upImage
private

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