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

A ToolBar that has the main Transport buttons. More...

#include <ControlToolBar.h>

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

Public Types

enum  PlayAppearance {
  PlayAppearance::Straight, PlayAppearance::Looped, PlayAppearance::CutPreview, PlayAppearance::Scrub,
  PlayAppearance::Seek
}
 
- Public Types inherited from ToolBar
using Holder = wxWindowPtr< ToolBar >
 

Public Member Functions

 ControlToolBar (AudacityProject &project)
 
virtual ~ControlToolBar ()
 
void Create (wxWindow *parent) override
 
void UpdatePrefs () override
 
void OnKeyEvent (wxKeyEvent &event)
 
void OnRewind (wxCommandEvent &evt)
 
void OnPlay (wxCommandEvent &evt)
 
void OnStop (wxCommandEvent &evt)
 
void OnRecord (wxCommandEvent &evt)
 
void OnFF (wxCommandEvent &evt)
 
void OnPause (wxCommandEvent &evt)
 
void OnLoop (wxCommandEvent &evt)
 
void OnIdle (wxIdleEvent &event)
 
void SetPlay (bool down, PlayAppearance appearance=PlayAppearance::Straight)
 
void SetStop ()
 
void PlayDefault ()
 
void Populate () override
 
void Repaint (wxDC *dc) override
 
void EnableDisableButtons () override
 
void ReCreateButtons () override
 
void RegenerateTooltips () override
 
void StartScrollingIfPreferred ()
 
void StartScrolling ()
 
void StopScrolling ()
 
- 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
 
virtual void SetToDefaultSize ()
 
void UpdatePrefs () override
 
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 ControlToolBarFind (AudacityProject &project)
 
static ControlToolBarGet (AudacityProject &project)
 
static const ControlToolBarGet (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 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 Types

enum  {
  ID_PAUSE_BUTTON = 11000, ID_PLAY_BUTTON, ID_STOP_BUTTON, ID_FF_BUTTON,
  ID_REW_BUTTON, ID_RECORD_BUTTON, ID_LOOP_BUTTON, BUTTON_COUNT
}
 

Private Member Functions

void UpdateStatusBar ()
 
void ArrangeButtons ()
 
TranslatableString StateForStatusBar ()
 

Static Private Member Functions

static AButtonMakeButton (ControlToolBar *pBar, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, bool processdownevents, const TranslatableString &label)
 
static void MakeAlternateImages (AButton &button, int idx, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled)
 

Private Attributes

AButtonmRewind
 
AButtonmPlay
 
AButtonmRecord
 
AButtonmPause
 
AButtonmStop
 
AButtonmFF
 
AButtonmLoop
 
wxString mStrLocale
 
wxBoxSizer * mSizer
 

Additional Inherited Members

- 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...
 
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 ()
 
- Static Protected Member Functions inherited from ToolBar
static void MakeMacRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
static void MakeRecoloredImage (teBmps eBmpOut, teBmps eBmpIn)
 
- 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

A ToolBar that has the main Transport buttons.

In the GUI, this is referred to as "Transport Toolbar", as it corresponds to commands in the Transport menu. "Control Toolbar" is historic. This class, which is a child of Toolbar, creates the window containing the Transport (rewind/play/stop/record/ff) buttons. The window can be embedded within a normal project window, or within a ToolBarFrame.

All of the controls in this window were custom-written for Audacity - they are not native controls on any platform - however, it is intended that the images could be easily replaced to allow "skinning" or just customization to match the look and feel of each platform.

Definition at line 32 of file ControlToolBar.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ID_PAUSE_BUTTON 
ID_PLAY_BUTTON 
ID_STOP_BUTTON 
ID_FF_BUTTON 
ID_REW_BUTTON 
ID_RECORD_BUTTON 
ID_LOOP_BUTTON 
BUTTON_COUNT 

Definition at line 103 of file ControlToolBar.h.

104  {
105  ID_PAUSE_BUTTON = 11000,
108  ID_FF_BUTTON,
112  BUTTON_COUNT,
113  };

◆ PlayAppearance

Enumerator
Straight 
Looped 
CutPreview 
Scrub 
Seek 

Definition at line 60 of file ControlToolBar.h.

60  {
61  Straight, Looped, CutPreview, Scrub, Seek
62  };

Constructor & Destructor Documentation

◆ ControlToolBar()

ControlToolBar::ControlToolBar ( AudacityProject project)

Definition at line 115 of file ControlToolBar.cpp.

116 : ToolBar(project, TransportBarID, XO("Transport"), wxT("Control"))
117 {
118  mStrLocale = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
119 
120  mSizer = NULL;
121 }

References gPrefs.

◆ ~ControlToolBar()

ControlToolBar::~ControlToolBar ( )
virtual

Definition at line 123 of file ControlToolBar.cpp.

124 {
125 }

Member Function Documentation

◆ ArrangeButtons()

void ControlToolBar::ArrangeButtons ( )
private

Definition at line 359 of file ControlToolBar.cpp.

360 {
361  int flags = wxALIGN_CENTER | wxRIGHT;
362 
363  // (Re)allocate the button sizer
364  if( mSizer )
365  {
366  Detach( mSizer );
367  std::unique_ptr < wxSizer > {mSizer}; // DELETE it
368  }
369 
370  Add((mSizer = safenew wxBoxSizer(wxHORIZONTAL)), 1, wxEXPAND);
371 
372  // Start with a little extra space
373  mSizer->Add( 5, 55 );
374 
375  // Establish correct tab key sequence with mLoop last
376  mPause->MoveBeforeInTabOrder( mLoop );
377  mPlay->MoveBeforeInTabOrder( mLoop );
378  mStop->MoveBeforeInTabOrder( mLoop );
379  mRewind->MoveBeforeInTabOrder( mLoop );
380  mFF->MoveBeforeInTabOrder( mLoop );
381  mRecord->MoveBeforeInTabOrder( mLoop );
382 
383  mSizer->Add( mPause, 0, flags, 2 );
384  mSizer->Add( mPlay, 0, flags, 2 );
385  mSizer->Add( mStop, 0, flags, 2 );
386  mSizer->Add( mRewind, 0, flags, 2 );
387  mSizer->Add( mFF, 0, flags, 10 );
388  mSizer->Add( mRecord, 0, flags, 10 );
389  mSizer->Add( mLoop, 0, flags, 5 );
390 
391  // Layout the sizer
392  mSizer->Layout();
393 
394  // Layout the toolbar
395  Layout();
396 
397  // (Re)Establish the minimum size
398  SetMinSize( GetSizer()->GetMinSize() );
399 }

References ToolBar::Add(), ToolBar::Detach(), ToolBar::GetSizer(), mFF, mLoop, mPause, mPlay, mRecord, mRewind, mSizer, mStop, and safenew.

Referenced by Populate().

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

◆ Create()

void ControlToolBar::Create ( wxWindow *  parent)
overridevirtual

Reimplemented from ToolBar.

Definition at line 147 of file ControlToolBar.cpp.

148 {
149  ToolBar::Create(parent);
150  UpdatePrefs();
151 }

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

Here is the call graph for this function:

◆ EnableDisableButtons()

void ControlToolBar::EnableDisableButtons ( )
overridevirtual

Implements ToolBar.

Definition at line 467 of file ControlToolBar.cpp.

468 {
470  auto &projectAudioManager = ProjectAudioManager::Get( mProject );
471  bool canStop = projectAudioManager.CanStopAudioStream();
472 
473  bool paused = mPause->IsDown();
474  bool playing = mPlay->IsDown();
475  bool recording = mRecord->IsDown();
476  auto gAudioIO = AudioIO::Get();
477  bool busy = gAudioIO->IsBusy();
478 
479  // Only interested in audio type tracks
480  bool tracks = p && TrackList::Get( *p ).Any<AudioTrack>(); // PRL: PlayableTrack ?
481 
482  mPlay->SetEnabled( canStop && tracks && !recording );
484  canStop &&
485  !(busy && !recording && !paused) &&
486  !(playing && !paused)
487  );
488  mStop->SetEnabled(canStop && (playing || recording));
489  mRewind->SetEnabled(paused || (!playing && !recording));
490  mFF->SetEnabled(tracks && (paused || (!playing && !recording)));
491 
492  mPause->SetEnabled(canStop);
493 
494  mLoop->SetEnabled( !recording );
495 }

References TrackList::Any(), AudioIO::Get(), TrackList::Get(), ProjectAudioManager::Get(), AButton::IsDown(), mFF, mLoop, mPause, mPlay, ToolBar::mProject, mRecord, mRewind, mStop, and AButton::SetEnabled().

Referenced by OnIdle(), ReCreateButtons(), SetPlay(), and SetStop().

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

◆ Find()

ControlToolBar * ControlToolBar::Find ( AudacityProject project)
static

Definition at line 128 of file ControlToolBar.cpp.

129 {
130  auto &toolManager = ToolManager::Get( project );
131  return static_cast<ControlToolBar*>(
132  toolManager.GetToolBar(TransportBarID) );
133 }

References ToolManager::Get(), and TransportBarID.

Here is the call graph for this function:

◆ Get() [1/2]

ControlToolBar & ControlToolBar::Get ( AudacityProject project)
static

Definition at line 135 of file ControlToolBar.cpp.

136 {
137  auto &toolManager = ToolManager::Get( project );
138  return *static_cast<ControlToolBar*>(
139  toolManager.GetToolBar(TransportBarID) );
140 }

References ToolManager::Get(), and TransportBarID.

Referenced by TransportUtilities::DoStopPlaying(), Get(), anonymous_namespace{TransportMenus.cpp}::MakeReadyToPlay(), SelectActions::Handler::OnSkipEnd(), and SelectActions::Handler::OnSkipStart().

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

◆ Get() [2/2]

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

Definition at line 142 of file ControlToolBar.cpp.

143 {
144  return Get( const_cast<AudacityProject&>( project )) ;
145 }

References Get().

Here is the call graph for this function:

◆ MakeAlternateImages()

void ControlToolBar::MakeAlternateImages ( AButton button,
int  idx,
teBmps  eEnabledUp,
teBmps  eEnabledDown,
teBmps  eDisabled 
)
staticprivate

Definition at line 181 of file ControlToolBar.cpp.

185 {
186  ToolBar::MakeAlternateImages(button, idx,
187  bmpRecoloredUpLarge, bmpRecoloredDownLarge, bmpRecoloredUpHiliteLarge, bmpRecoloredHiliteLarge,
188  eEnabledUp, eEnabledDown, eDisabled,
189  theTheme.ImageSize( bmpRecoloredUpLarge ));
190 }

References ThemeBase::ImageSize(), ToolBar::MakeAlternateImages(), and theTheme.

Referenced by Populate().

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

◆ MakeButton()

AButton * ControlToolBar::MakeButton ( ControlToolBar pBar,
teBmps  eEnabledUp,
teBmps  eEnabledDown,
teBmps  eDisabled,
int  id,
bool  processdownevents,
const TranslatableString label 
)
staticprivate

Definition at line 155 of file ControlToolBar.cpp.

160 {
161  AButton *r = ToolBar::MakeButton(pBar,
162  bmpRecoloredUpLarge, bmpRecoloredDownLarge, bmpRecoloredUpHiliteLarge, bmpRecoloredHiliteLarge,
163  eEnabledUp, eEnabledDown, eDisabled,
164  wxWindowID(id),
165  wxDefaultPosition, processdownevents,
166  theTheme.ImageSize( bmpRecoloredUpLarge ));
167  r->SetLabel(label);
168  enum { deflation =
169 #ifdef __WXMAC__
170  6
171 #else
172  12
173 #endif
174  };
175  r->SetFocusRect( r->GetClientRect().Deflate( deflation, deflation ) );
176 
177  return r;
178 }

References ThemeBase::ImageSize(), label, ToolBar::MakeButton(), AButton::SetFocusRect(), AButton::SetLabel(), and theTheme.

Referenced by Populate().

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

◆ OnFF()

void ControlToolBar::OnFF ( wxCommandEvent &  evt)

Definition at line 689 of file ControlToolBar.cpp.

690 {
691  mFF->PushDown();
692  mFF->PopUp();
693 
695 
696  {
699  }
700 }

References ProjectAudioManager::Get(), ProjectWindow::Get(), mFF, ToolBar::mProject, AButton::PopUp(), AButton::PushDown(), ProjectWindow::SkipEnd(), ProjectAudioManager::StopIfPaused(), and AButton::WasShiftDown().

Here is the call graph for this function:

◆ OnIdle()

void ControlToolBar::OnIdle ( wxIdleEvent &  event)

Definition at line 610 of file ControlToolBar.cpp.

611 {
612  event.Skip();
613 
614  if (!wxTheApp->IsActive())
615  return;
616 
617  auto &projectAudioManager = ProjectAudioManager::Get( mProject );
618  if ( projectAudioManager.Paused() )
619  mPause->PushDown();
620  else
621  mPause->PopUp();
622 
623  bool recording = projectAudioManager.Recording();
624  if (!recording) {
625  mRecord->PopUp();
626  mRecord->SetAlternateIdx( wxGetKeyState(WXK_SHIFT) ? 1 : 0 );
627  }
628  else {
629  mRecord->PushDown();
630  mRecord->SetAlternateIdx( projectAudioManager.Appending() ? 0 : 1 );
631  }
632 
633  bool playing = projectAudioManager.Playing();
634  if ( !(playing || Scrubber::Get(mProject).HasMark()) ) {
635  mPlay->PopUp();
637  wxGetKeyState(WXK_CONTROL)
638  ? 2
639  : wxGetKeyState(WXK_SHIFT)
640  ? 1
641  : 0
642  );
643  }
644  else {
645  mPlay->PushDown();
646  // Choose among alternative appearances of the play button, although
647  // options 0 and 1 became non-distinct in 3.1.0
649  projectAudioManager.Cutting()
650  ? 2
651  // : projectAudioManager.Looping()
652  // ? 1
653  : 0
654  );
655  }
656 
657  if ( recording || playing )
659  else
660  StopScrolling();
661 
662  if ( projectAudioManager.Stopping() )
663  mStop->PushDown();
664  else
665  // push-downs of the stop button are only momentary and always pop up now
666  mStop->PopUp();
667 
668  if (ViewInfo::Get(mProject).playRegion.Active())
669  mLoop->PushDown();
670  else
671  mLoop->PopUp();
672 
673  UpdateStatusBar();
675 }

References EnableDisableButtons(), ViewInfo::Get(), ProjectAudioManager::Get(), Scrubber::Get(), mLoop, mPause, mPlay, ToolBar::mProject, mRecord, mStop, AButton::PopUp(), AButton::PushDown(), AButton::SetAlternateIdx(), StartScrollingIfPreferred(), StopScrolling(), and UpdateStatusBar().

Here is the call graph for this function:

◆ OnKeyEvent()

void ControlToolBar::OnKeyEvent ( wxKeyEvent &  event)

Definition at line 518 of file ControlToolBar.cpp.

519 {
520  // PRL: is this handler really ever reached? Is the ControlToolBar ever
521  // focused? Isn't there a global event filter that interprets the spacebar
522  // key (or other key chosen in preferences) and dispatches to DoPlayStop,
523  // according to CommandManager's table, before we come to this redundant
524  // function?
525 
526  if (event.ControlDown() || event.AltDown()) {
527  event.Skip();
528  return;
529  }
530 
531  auto gAudioIO = AudioIOBase::Get();
532  auto &projectAudioManager = ProjectAudioManager::Get( mProject );
533 
534  // Does not appear to be needed on Linux. Perhaps on some other platform?
535  // If so, "!CanStopAudioStream()" should probably apply.
536  if (event.GetKeyCode() == WXK_SPACE) {
537  if ( projectAudioManager.Playing() || projectAudioManager.Recording() ) {
538  SetStop();
539  projectAudioManager.Stop();
540  }
541  else if (!gAudioIO->IsBusy()) {
542  projectAudioManager.PlayCurrentRegion();
543  }
544  return;
545  }
546  event.Skip();
547 }

References AudioIOBase::Get(), ProjectAudioManager::Get(), ToolBar::mProject, and SetStop().

Here is the call graph for this function:

◆ OnLoop()

void ControlToolBar::OnLoop ( wxCommandEvent &  evt)

Definition at line 600 of file ControlToolBar.cpp.

601 {
602  // Toggle the state of the play region lock
603  auto &region = ViewInfo::Get(mProject).playRegion;
604  if (region.Active())
606  else
608 }

References SelectUtilities::ActivatePlayRegion(), ViewInfo::Get(), SelectUtilities::InactivatePlayRegion(), ToolBar::mProject, and ViewInfo::playRegion.

Here is the call graph for this function:

◆ OnPause()

void ControlToolBar::OnPause ( wxCommandEvent &  evt)

Definition at line 595 of file ControlToolBar.cpp.

596 {
598 }

References ProjectAudioManager::Get(), ToolBar::mProject, and ProjectAudioManager::OnPause().

Here is the call graph for this function:

◆ OnPlay()

void ControlToolBar::OnPlay ( wxCommandEvent &  evt)

Definition at line 549 of file ControlToolBar.cpp.

550 {
551  auto p = &mProject;
552  auto &projectAudioManager = ProjectAudioManager::Get( mProject );
553  bool canStop = projectAudioManager.CanStopAudioStream();
554 
555  if ( !canStop )
556  return;
557 
558  projectAudioManager.Stop();
559 
560  PlayDefault();
561 }

References ProjectAudioManager::Get(), ToolBar::mProject, and PlayDefault().

Here is the call graph for this function:

◆ OnRecord()

void ControlToolBar::OnRecord ( wxCommandEvent &  evt)
Exception safety guarantee:
Strong – For state of current project's tracks

Definition at line 584 of file ControlToolBar.cpp.

585 {
586  // TODO: It would be neater if Menu items and Toolbar buttons used the same code for
587  // enabling/disabling, and all fell into the same action routines.
588  // Here instead we reduplicate some logic (from CommandHandler) because it isn't
589  // normally used for buttons.
590 
591  bool altAppearance = mRecord->WasShiftDown();
592  ProjectAudioManager::Get( mProject ).OnRecord( altAppearance );
593 }

References ProjectAudioManager::Get(), ToolBar::mProject, mRecord, ProjectAudioManager::OnRecord(), and AButton::WasShiftDown().

Here is the call graph for this function:

◆ OnRewind()

void ControlToolBar::OnRewind ( wxCommandEvent &  evt)

Definition at line 677 of file ControlToolBar.cpp.

678 {
679  mRewind->PushDown();
680  mRewind->PopUp();
681 
683  {
686  }
687 }

References ProjectAudioManager::Get(), ProjectWindow::Get(), ToolBar::mProject, mRewind, AButton::PopUp(), AButton::PushDown(), ProjectWindow::Rewind(), ProjectAudioManager::StopIfPaused(), and AButton::WasShiftDown().

Here is the call graph for this function:

◆ OnStop()

void ControlToolBar::OnStop ( wxCommandEvent &  evt)

Definition at line 563 of file ControlToolBar.cpp.

564 {
565  auto &projectAudioManager = ProjectAudioManager::Get( mProject );
566  bool canStop = projectAudioManager.CanStopAudioStream();
567 
568  if ( canStop ) {
569  projectAudioManager.Stop();
570  }
571 }

References ProjectAudioManager::Get(), and ToolBar::mProject.

Here is the call graph for this function:

◆ PlayDefault()

void ControlToolBar::PlayDefault ( )

Definition at line 573 of file ControlToolBar.cpp.

574 {
575  // Let control-down have precedence over shift state
576  const bool cutPreview = mPlay->WasControlDown();
577  const bool newDefault = !cutPreview &&
578  !mPlay->WasShiftDown();
580  .PlayCurrentRegion(newDefault, cutPreview);
581 }

References ProjectAudioManager::Get(), mPlay, ToolBar::mProject, ProjectAudioManager::PlayCurrentRegion(), AButton::WasControlDown(), and AButton::WasShiftDown().

Referenced by OnPlay().

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

◆ Populate()

void ControlToolBar::Populate ( )
overridevirtual

Implements ToolBar.

Definition at line 192 of file ControlToolBar.cpp.

193 {
194  SetBackgroundColour( theTheme.Colour( clrMedium ) );
196 
197  mPause = MakeButton(this, bmpPause, bmpPause, bmpPauseDisabled,
198  ID_PAUSE_BUTTON, true, XO("Pause"));
199 
200  mPlay = MakeButton(this, bmpPlay, bmpPlay, bmpPlayDisabled,
201  ID_PLAY_BUTTON, true, XO("Play"));
202  // 3.1.0 abandoned distinct images for Shift
203  MakeAlternateImages(*mPlay, 1, bmpPlay, bmpPlay, bmpPlayDisabled);
205  bmpCutPreview, bmpCutPreview, bmpCutPreviewDisabled);
207  bmpScrub, bmpScrub, bmpScrubDisabled);
209  bmpSeek, bmpSeek, bmpSeekDisabled);
211 
212  mStop = MakeButton(this, bmpStop, bmpStop, bmpStopDisabled ,
213  ID_STOP_BUTTON, false, XO("Stop"));
214 
215  mRewind = MakeButton(this, bmpRewind, bmpRewind, bmpRewindDisabled,
216  ID_REW_BUTTON, false, XO("Skip to Start"));
217 
218  mFF = MakeButton(this, bmpFFwd, bmpFFwd, bmpFFwdDisabled,
219  ID_FF_BUTTON, false, XO("Skip to End"));
220 
221  mRecord = MakeButton(this, bmpRecord, bmpRecord, bmpRecordDisabled,
222  ID_RECORD_BUTTON, false, XO("Record"));
223 
224  bool bPreferNewTrack;
225  gPrefs->Read("/GUI/PreferNewTrackRecord",&bPreferNewTrack, false);
226  if( !bPreferNewTrack )
227  MakeAlternateImages(*mRecord, 1, bmpRecordBelow, bmpRecordBelow,
228  bmpRecordBelowDisabled);
229  else
230  MakeAlternateImages(*mRecord, 1, bmpRecordBeside, bmpRecordBeside,
231  bmpRecordBesideDisabled);
232 
234 
235  mLoop = MakeButton(this, bmpLoop, bmpLoop, bmpLoopDisabled,
237  true, // this makes it a toggle, like the pause button
239 
240 #if wxUSE_TOOLTIPS
242  wxToolTip::Enable(true);
243  wxToolTip::SetDelay(1000);
244 #endif
245 
246  // Set default order and mode
247  ArrangeButtons();
248 }

References ArrangeButtons(), ThemeBase::Colour(), AButton::FollowModifierKeys(), gPrefs, ID_FF_BUTTON, ID_LOOP_BUTTON, ID_PAUSE_BUTTON, ID_PLAY_BUTTON, ID_RECORD_BUTTON, ID_REW_BUTTON, ID_STOP_BUTTON, LoopToggleText, MakeAlternateImages(), MakeButton(), ToolBar::MakeButtonBackgroundsLarge(), mFF, mLoop, mPause, mPlay, mRecord, mRewind, mStop, RegenerateTooltips(), TranslatableString::Stripped(), theTheme, and XO.

Here is the call graph for this function:

◆ ReCreateButtons()

void ControlToolBar::ReCreateButtons ( )
overridevirtual

Reimplemented from ToolBar.

Definition at line 401 of file ControlToolBar.cpp.

402 {
403  bool playDown = false;
404  bool playShift = false;
405  bool pauseDown = false;
406  bool recordDown = false;
407  bool recordShift = false;
408  bool loopDown = false;
409 
410  // ToolBar::ReCreateButtons() will get rid of its sizer and
411  // since we've attached our sizer to it, ours will get deleted too
412  // so clean ours up first.
413  if( mSizer )
414  {
415  playDown = mPlay->IsDown();
416  playShift = mPlay->WasShiftDown();
417  pauseDown = mPause->IsDown();
418  recordDown = mRecord->IsDown();
419  recordShift = mRecord->WasShiftDown();
420  loopDown = mLoop->IsDown();
421  Detach( mSizer );
422 
423  std::unique_ptr < wxSizer > {mSizer}; // DELETE it
424  mSizer = NULL;
425  }
426 
428 
429  if (playDown)
430  {
431  ControlToolBar::PlayAppearance appearance =
434  SetPlay(playDown, appearance);
435  }
436 
437  if (pauseDown)
438  {
439  mPause->PushDown();
440  }
441 
442  if (recordDown)
443  {
444  mRecord->SetAlternateIdx(recordShift ? 1 : 0);
445  mRecord->PushDown();
446  }
447 
448  if (loopDown)
449  mLoop->PushDown();
450 
452 
454 }

References ToolBar::Detach(), EnableDisableButtons(), AButton::IsDown(), Looped, mLoop, mPause, mPlay, mRecord, mSizer, AButton::PushDown(), ToolBar::ReCreateButtons(), RegenerateTooltips(), AButton::SetAlternateIdx(), SetPlay(), Straight, and AButton::WasShiftDown().

Referenced by UpdatePrefs().

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

◆ RegenerateTooltips()

void ControlToolBar::RegenerateTooltips ( )
overridevirtual

Implements ToolBar.

Definition at line 250 of file ControlToolBar.cpp.

251 {
252 #if wxUSE_TOOLTIPS
253  for (long iWinID = ID_PAUSE_BUTTON; iWinID < BUTTON_COUNT; iWinID++)
254  {
255  auto pCtrl = static_cast<AButton*>(this->FindWindow(iWinID));
256  CommandID name;
257  switch (iWinID)
258  {
259  case ID_PLAY_BUTTON:
260  // Without shift
261  name = wxT("DefaultPlayStop");
262  break;
263  case ID_RECORD_BUTTON:
264  // Without shift
265  //name = wxT("Record");
266  name = wxT("Record1stChoice");
267  break;
268  case ID_PAUSE_BUTTON:
269  name = wxT("Pause");
270  break;
271  case ID_STOP_BUTTON:
272  name = wxT("Stop");
273  break;
274  case ID_FF_BUTTON:
275  name = wxT("CursProjectEnd");
276  break;
277  case ID_REW_BUTTON:
278  name = wxT("CursProjectStart");
279  break;
280  case ID_LOOP_BUTTON:
281  name = wxT("TogglePlayRegion");
282  break;
283  }
284  std::vector<ComponentInterfaceSymbol> commands(
285  1u, { name, Verbatim( pCtrl->GetLabel() ) } );
286 
287  // Some have a second
288  switch (iWinID)
289  {
290  case ID_PLAY_BUTTON:
291  // With shift
292  commands.push_back( { wxT("OncePlayStop"), XO("Play Once") } );
293  break;
294  case ID_RECORD_BUTTON:
295  // With shift
296  { bool bPreferNewTrack;
297  gPrefs->Read("/GUI/PreferNewTrackRecord",&bPreferNewTrack, false);
298  // For the shortcut tooltip.
299  commands.push_back( {
300  wxT("Record2ndChoice"),
301  !bPreferNewTrack
302  ? XO("Record New Track")
303  : XO("Append Record")
304  } );
305  }
306  break;
307  case ID_PAUSE_BUTTON:
308  break;
309  case ID_STOP_BUTTON:
310  break;
311  case ID_FF_BUTTON:
312  // With shift
313  commands.push_back( {
314  wxT("SelEnd"), XO("Select to End") } );
315  break;
316  case ID_REW_BUTTON:
317  // With shift
318  commands.push_back( {
319  wxT("SelStart"), XO("Select to Start") } );
320  break;
321  }
323  mProject, *pCtrl, commands.data(), commands.size());
324  }
325 #endif
326 }

References BUTTON_COUNT, gPrefs, ID_FF_BUTTON, ID_LOOP_BUTTON, ID_PAUSE_BUTTON, ID_PLAY_BUTTON, ID_RECORD_BUTTON, ID_REW_BUTTON, ID_STOP_BUTTON, ToolBar::mProject, name, ToolBar::SetButtonToolTip(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::size(), Verbatim(), and XO.

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

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

◆ Repaint()

void ControlToolBar::Repaint ( wxDC *  dc)
overridevirtual

Implements ToolBar.

Definition at line 456 of file ControlToolBar.cpp.

457 {
458 #ifndef USE_AQUA_THEME
459  wxSize s = mSizer->GetSize();
460  wxPoint p = mSizer->GetPosition();
461 
462  wxRect bevelRect( p.x, p.y, s.GetWidth() - 1, s.GetHeight() - 1 );
463  AColor::Bevel( *dc, true, bevelRect );
464 #endif
465 }

References AColor::Bevel(), and mSizer.

Here is the call graph for this function:

◆ SetPlay()

void ControlToolBar::SetPlay ( bool  down,
PlayAppearance  appearance = PlayAppearance::Straight 
)

Definition at line 497 of file ControlToolBar.cpp.

498 {
499  if (down) {
500  mPlay->SetShift(appearance == PlayAppearance::Looped);
502  mPlay->SetAlternateIdx(static_cast<int>(appearance));
503  mPlay->PushDown();
504  }
505  else {
506  mPlay->PopUp();
508  }
510 }

References CutPreview, EnableDisableButtons(), Looped, mPlay, AButton::PopUp(), AButton::PushDown(), AButton::SetAlternateIdx(), AButton::SetControl(), and AButton::SetShift().

Referenced by ReCreateButtons().

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

◆ SetStop()

void ControlToolBar::SetStop ( )

Definition at line 512 of file ControlToolBar.cpp.

513 {
514  mStop->PushDown();
516 }

References EnableDisableButtons(), mStop, and AButton::PushDown().

Referenced by OnKeyEvent().

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

◆ StartScrolling()

void ControlToolBar::StartScrolling ( )

Definition at line 773 of file ControlToolBar.cpp.

774 {
776  const auto project = &mProject;
777  if (project) {
778  auto mode = Mode::Pinned;
779 
780 #if 0
781  // Enable these lines to pin the playhead right instead of center,
782  // when recording but not overdubbing.
783  auto gAudioIO = AudioIO::Get();
784  if (gAudioIO->GetNumCaptureChannels() > 0) {
785  // recording
786 
787  // Display a fixed recording head while scrolling the waves continuously.
788  // If you overdub, you may want to anticipate some context in existing tracks,
789  // so center the head. If not, put it rightmost to display as much wave as we can.
790  bool duplex;
791 #ifdef EXPERIMENTAL_DA
792  gPrefs->Read(wxT("/AudioIO/Duplex"), &duplex, false);
793 #else
794  gPrefs->Read(wxT("/AudioIO/Duplex"), &duplex, true);
795 #endif
796  if (duplex) {
797  // See if there is really anything being overdubbed
798  if (gAudioIO->GetNumPlaybackChannels() == 0)
799  // No.
800  duplex = false;
801  }
802 
803  if (!duplex)
804  mode = Mode::Right;
805  }
806 #endif
807 
808  ProjectWindow::Get( *project ).GetPlaybackScroller().Activate(mode);
809  }
810 }

References ProjectWindow::PlaybackScroller::Activate(), AudioIO::Get(), ProjectWindow::Get(), ProjectWindow::GetPlaybackScroller(), gPrefs, and ToolBar::mProject.

Referenced by StartScrollingIfPreferred().

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

◆ StartScrollingIfPreferred()

void ControlToolBar::StartScrollingIfPreferred ( )

Definition at line 755 of file ControlToolBar.cpp.

756 {
757  if ( Scrubber::Get( mProject ).IsTransportingPinned() )
758  StartScrolling();
759 #ifdef __WXMAC__
760  else if (Scrubber::Get( mProject ).HasMark()) {
761  // PRL: cause many "unnecessary" refreshes. For reasons I don't understand,
762  // doing this causes wheel rotation events (mapped from the double finger vertical
763  // swipe) to be delivered more uniformly to the application, so that speed control
764  // works better.
767  }
768 #endif
769  else
770  StopScrolling();
771 }

References ProjectWindow::PlaybackScroller::Activate(), ProjectWindow::Get(), Scrubber::Get(), ProjectWindow::GetPlaybackScroller(), ToolBar::mProject, ProjectWindow::PlaybackScroller::Refresh, StartScrolling(), and StopScrolling().

Referenced by OnIdle().

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

◆ StateForStatusBar()

TranslatableString ControlToolBar::StateForStatusBar ( )
private

Definition at line 726 of file ControlToolBar.cpp.

727 {
728  TranslatableString state;
729  auto &projectAudioManager = ProjectAudioManager::Get( mProject );
730 
731  auto pProject = &mProject;
732  auto scrubState = pProject
734  : TranslatableString{};
735  if (!scrubState.empty())
736  state = scrubState;
737  else if (mPlay->IsDown())
738  state = sStatePlay;
739  else if (projectAudioManager.Recording())
740  state = sStateRecord;
741  else
742  state = sStateStop;
743 
744  return ((mPause->IsDown()) ? XO("%s Paused.") : XO("%s."))
745  .Format( state );
746 }

References TranslatableString::Format(), ProjectAudioManager::Get(), Scrubber::Get(), Scrubber::GetUntranslatedStateString(), AButton::IsDown(), mPause, mPlay, ToolBar::mProject, sStatePlay, sStateRecord, sStateStop, and XO.

Referenced by UpdateStatusBar().

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

◆ StopScrolling()

void ControlToolBar::StopScrolling ( )

Definition at line 812 of file ControlToolBar.cpp.

813 {
814  const auto project = &mProject;
815  if(project)
818 }

References ProjectWindow::PlaybackScroller::Activate(), ProjectWindow::Get(), ProjectWindow::GetPlaybackScroller(), ToolBar::mProject, and ProjectWindow::PlaybackScroller::Off.

Referenced by OnIdle(), and StartScrollingIfPreferred().

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

◆ UpdatePrefs()

void ControlToolBar::UpdatePrefs ( )
overridevirtual

Implements PrefsListener.

Definition at line 328 of file ControlToolBar.cpp.

329 {
330  bool updated = false;
331  bool active;
332 
333  wxString strLocale = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
334  if (mStrLocale != strLocale)
335  {
336  mStrLocale = strLocale;
337  updated = true;
338  }
339 
340  if( updated )
341  {
342  ReCreateButtons(); // side effect: calls RegenerateTooltips()
343  Updated();
344  }
345  else
346  // The other reason to regenerate tooltips is if keyboard shortcuts for
347  // transport buttons changed, but that's too much work to check for, so just
348  // always do it. (Much cheaper than calling ReCreateButtons() in all cases.
350 
351 
352  // Set label to pull in language change
353  SetLabel(XO("Transport"));
354 
355  // Give base class a chance
357 }

References gPrefs, mStrLocale, ReCreateButtons(), RegenerateTooltips(), ToolBar::SetLabel(), ToolBar::Updated(), ToolBar::UpdatePrefs(), and XO.

Referenced by Create().

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

◆ UpdateStatusBar()

void ControlToolBar::UpdateStatusBar ( )
private

Definition at line 748 of file ControlToolBar.cpp.

749 {
752  );
753 }

References ProjectStatus::Get(), ToolBar::mProject, ProjectStatus::Set(), StateForStatusBar(), and stateStatusBarField.

Referenced by OnIdle().

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

Member Data Documentation

◆ mFF

AButton* ControlToolBar::mFF
private

Definition at line 120 of file ControlToolBar.h.

Referenced by ArrangeButtons(), EnableDisableButtons(), OnFF(), and Populate().

◆ mLoop

AButton* ControlToolBar::mLoop
private

◆ mPause

AButton* ControlToolBar::mPause
private

◆ mPlay

AButton* ControlToolBar::mPlay
private

◆ mRecord

AButton* ControlToolBar::mRecord
private

◆ mRewind

AButton* ControlToolBar::mRewind
private

Definition at line 115 of file ControlToolBar.h.

Referenced by ArrangeButtons(), EnableDisableButtons(), OnRewind(), and Populate().

◆ mSizer

wxBoxSizer* ControlToolBar::mSizer
private

Definition at line 125 of file ControlToolBar.h.

Referenced by ArrangeButtons(), ReCreateButtons(), and Repaint().

◆ mStop

AButton* ControlToolBar::mStop
private

Definition at line 119 of file ControlToolBar.h.

Referenced by ArrangeButtons(), EnableDisableButtons(), OnIdle(), Populate(), and SetStop().

◆ mStrLocale

wxString ControlToolBar::mStrLocale
private

Definition at line 123 of file ControlToolBar.h.

Referenced by UpdatePrefs().


The documentation for this class was generated from the following files:
ControlToolBar::mPlay
AButton * mPlay
Definition: ControlToolBar.h:116
ControlToolBar::StartScrolling
void StartScrolling()
Definition: ControlToolBar.cpp:773
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
ViewInfo::Get
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:235
LoopToggleText
const TranslatableString LoopToggleText
Definition: ViewInfo.cpp:227
ControlToolBar::PlayDefault
void PlayDefault()
Definition: ControlToolBar.cpp:573
label
TranslatableString label
Definition: TagsEditor.cpp:163
AButton::SetLabel
void SetLabel(const TranslatableString &label)
Definition: AButton.cpp:274
ControlToolBar::PlayAppearance::CutPreview
@ CutPreview
ProjectWindow::Rewind
void Rewind(bool shift)
Definition: ProjectWindow.cpp:1596
Scrubber::Get
static Scrubber & Get(AudacityProject &project)
Definition: Scrubbing.cpp:202
ControlToolBar::EnableDisableButtons
void EnableDisableButtons() override
Definition: ControlToolBar.cpp:467
ProjectAudioManager::Get
static ProjectAudioManager & Get(AudacityProject &project)
Definition: ProjectAudioManager.cpp:55
ProjectAudioManager::OnRecord
void OnRecord(bool altAppearance)
Definition: ProjectAudioManager.cpp:652
sStateStop
static const TranslatableString sStateStop
Definition: ControlToolBar.cpp:103
ControlToolBar::ID_FF_BUTTON
@ ID_FF_BUTTON
Definition: ControlToolBar.h:108
ToolBar::MakeAlternateImages
static void MakeAlternateImages(AButton &button, int idx, teBmps eUp, teBmps eDown, teBmps eHilite, teBmps eDownHi, teBmps eStandardUp, teBmps eStandardDown, teBmps eDisabled, wxSize size)
Definition: ToolBar.cpp:873
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:71
ProjectWindow::PlaybackScroller::Mode::Off
@ Off
ControlToolBar::mPause
AButton * mPause
Definition: ControlToolBar.h:118
ControlToolBar::PlayAppearance
PlayAppearance
Definition: ControlToolBar.h:60
sStateRecord
static const TranslatableString sStateRecord
Definition: ControlToolBar.cpp:107
AButton
A wxButton with mouse-over behaviour.
Definition: AButton.h:25
ViewInfo::playRegion
PlayRegion playRegion
Definition: ViewInfo.h:216
ProjectWindow::PlaybackScroller::Activate
void Activate(Mode mode)
Definition: ProjectWindow.h:77
ToolBar::mProject
AudacityProject & mProject
Definition: ToolBar.h:235
ControlToolBar::SetPlay
void SetPlay(bool down, PlayAppearance appearance=PlayAppearance::Straight)
Definition: ControlToolBar.cpp:497
ToolBar::SetLabel
void SetLabel(const wxString &label) override
Definition: ToolBar.cpp:398
ControlToolBar::mRecord
AButton * mRecord
Definition: ControlToolBar.h:117
AButton::PopUp
void PopUp()
Definition: AButton.cpp:605
ToolManager::Get
static ToolManager & Get(AudacityProject &project)
Definition: ToolManager.cpp:341
stateStatusBarField
@ stateStatusBarField
Definition: ProjectStatus.h:25
AButton::WasShiftDown
bool WasShiftDown()
Definition: AButton.cpp:561
ControlToolBar::RegenerateTooltips
void RegenerateTooltips() override
Definition: ControlToolBar.cpp:250
ProjectWindow::GetPlaybackScroller
PlaybackScroller & GetPlaybackScroller()
Definition: ProjectWindow.h:94
ControlToolBar::ID_PAUSE_BUTTON
@ ID_PAUSE_BUTTON
Definition: ControlToolBar.h:105
XO
#define XO(s)
Definition: Internat.h:31
ToolBar::GetSizer
wxBoxSizer * GetSizer()
Definition: ToolBar.cpp:678
ClientData::Site::size
size_t size() const
How many attachment pointers are in the Site.
Definition: ClientData.h:251
ThemeBase::ImageSize
wxSize ImageSize(int iIndex)
ProjectWindow::Get
static ProjectWindow & Get(AudacityProject &project)
Definition: ProjectWindow.cpp:525
ToolBar::ReCreateButtons
virtual void ReCreateButtons()
Definition: ToolBar.cpp:516
ControlToolBar::Get
static ControlToolBar & Get(AudacityProject &project)
Definition: ControlToolBar.cpp:135
ControlToolBar::ReCreateButtons
void ReCreateButtons() override
Definition: ControlToolBar.cpp:401
AButton::WasControlDown
bool WasControlDown()
Definition: AButton.cpp:566
TransportBarID
@ TransportBarID
Definition: ToolBar.h:72
ProjectAudioManager::PlayCurrentRegion
void PlayCurrentRegion(bool newDefault=false, bool cutpreview=false)
Definition: ProjectAudioManager.cpp:469
ControlToolBar::ArrangeButtons
void ArrangeButtons()
Definition: ControlToolBar.cpp:359
Scrubber::GetUntranslatedStateString
const TranslatableString & GetUntranslatedStateString() const
sStatePlay
static const TranslatableString sStatePlay
Methods for ControlToolBar.
Definition: ControlToolBar.cpp:99
ControlToolBar::ID_LOOP_BUTTON
@ ID_LOOP_BUTTON
Definition: ControlToolBar.h:111
ControlToolBar::MakeButton
static AButton * MakeButton(ControlToolBar *pBar, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled, int id, bool processdownevents, const TranslatableString &label)
Definition: ControlToolBar.cpp:155
AButton::FollowModifierKeys
void FollowModifierKeys()
Definition: AButton.cpp:330
ControlToolBar::mStrLocale
wxString mStrLocale
Definition: ControlToolBar.h:123
ControlToolBar::PlayAppearance::Looped
@ Looped
ProjectStatus::Set
void Set(const TranslatableString &msg, StatusBarField field=mainStatusBarField)
Definition: ProjectStatus.cpp:63
AButton::SetEnabled
void SetEnabled(bool state)
Definition: AButton.h:88
ControlToolBar::ID_PLAY_BUTTON
@ ID_PLAY_BUTTON
Definition: ControlToolBar.h:106
ControlToolBar::ID_STOP_BUTTON
@ ID_STOP_BUTTON
Definition: ControlToolBar.h:107
ToolBar::MakeButtonBackgroundsLarge
static void MakeButtonBackgroundsLarge()
Definition: ToolBar.cpp:776
AButton::SetFocusRect
void SetFocusRect(wxRect &r)
Definition: AButton.cpp:336
ToolBar::SetButtonToolTip
static void SetButtonToolTip(AudacityProject &project, AButton &button, const ComponentInterfaceSymbol commands[], size_t nCommands)
Definition: ToolBar.cpp:898
ToolBar::ToolBar
ToolBar(AudacityProject &project, int type, const TranslatableString &label, const wxString &section, bool resizable=false)
Definition: ToolBar.cpp:330
SelectUtilities::InactivatePlayRegion
void InactivatePlayRegion(AudacityProject &project)
Definition: SelectUtilities.cpp:188
ProjectWindow::PlaybackScroller::Mode
Mode
Definition: ProjectWindow.h:69
ControlToolBar::SetStop
void SetStop()
Definition: ControlToolBar.cpp:512
ToolBar::UpdatePrefs
void UpdatePrefs() override
Definition: ToolBar.cpp:605
AudioTrack
Track subclass holding data representing sound (as notes, or samples, or ...)
Definition: Track.h:855
name
const TranslatableString name
Definition: Distortion.cpp:98
ControlToolBar::UpdateStatusBar
void UpdateStatusBar()
Definition: ControlToolBar.cpp:748
AButton::SetAlternateIdx
void SetAlternateIdx(unsigned idx)
Definition: AButton.cpp:320
AButton::PushDown
void PushDown()
Definition: AButton.cpp:597
SelectUtilities::ActivatePlayRegion
void ActivatePlayRegion(AudacityProject &project)
Definition: SelectUtilities.cpp:168
AudioIOBase::Get
static AudioIOBase * Get()
Definition: AudioIOBase.cpp:89
ControlToolBar::ID_REW_BUTTON
@ ID_REW_BUTTON
Definition: ControlToolBar.h:109
ToolBar::Create
virtual void Create(wxWindow *parent)
Definition: ToolBar.cpp:475
AButton::SetControl
void SetControl(bool control)
Definition: AButton.cpp:631
AButton::SetShift
void SetShift(bool shift)
Definition: AButton.cpp:626
ControlToolBar::StopScrolling
void StopScrolling()
Definition: ControlToolBar.cpp:812
theTheme
THEME_API Theme theTheme
Definition: Theme.cpp:82
ControlToolBar::MakeAlternateImages
static void MakeAlternateImages(AButton &button, int idx, teBmps eEnabledUp, teBmps eEnabledDown, teBmps eDisabled)
Definition: ControlToolBar.cpp:181
ToolBar::Detach
void Detach(wxWindow *window)
Definition: ToolBar.cpp:752
ControlToolBar::StateForStatusBar
TranslatableString StateForStatusBar()
Definition: ControlToolBar.cpp:726
ControlToolBar::mRewind
AButton * mRewind
Definition: ControlToolBar.h:115
AColor::Bevel
static void Bevel(wxDC &dc, bool up, const wxRect &r)
Definition: AColor.cpp:188
ControlToolBar::UpdatePrefs
void UpdatePrefs() override
Definition: ControlToolBar.cpp:328
ProjectWindow::SkipEnd
void SkipEnd(bool shift)
Definition: ProjectWindow.cpp:1616
TrackList::Get
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:377
ControlToolBar
A ToolBar that has the main Transport buttons.
Definition: ControlToolBar.h:32
ControlToolBar::mSizer
wxBoxSizer * mSizer
Definition: ControlToolBar.h:125
ControlToolBar::mFF
AButton * mFF
Definition: ControlToolBar.h:120
ControlToolBar::BUTTON_COUNT
@ BUTTON_COUNT
Definition: ControlToolBar.h:112
TaggedIdentifier
Template generates different TaggedIdentifier classes that don't interconvert implicitly.
Definition: Identifier.h:113
ProjectStatus::Get
static ProjectStatus & Get(AudacityProject &project)
Definition: ProjectStatus.cpp:21
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
ControlToolBar::mStop
AButton * mStop
Definition: ControlToolBar.h:119
AButton::IsDown
bool IsDown()
Definition: AButton.h:113
Verbatim
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Definition: TranslatableString.h:321
ControlToolBar::ID_RECORD_BUTTON
@ ID_RECORD_BUTTON
Definition: ControlToolBar.h:110
ToolBar::MakeButton
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)
Definition: ToolBar.cpp:840
ControlToolBar::StartScrollingIfPreferred
void StartScrollingIfPreferred()
Definition: ControlToolBar.cpp:755
ControlToolBar::PlayAppearance::Straight
@ Straight
ProjectAudioManager::StopIfPaused
void StopIfPaused()
Definition: ProjectAudioManager.cpp:1217
ProjectWindow::PlaybackScroller::Mode::Refresh
@ Refresh
TrackList::Any
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1379
TranslatableString::Format
TranslatableString & Format(Args &&...args) &
Capture variadic format arguments (by copy) when there is no plural.
Definition: TranslatableString.h:103
ToolBar::Updated
void Updated()
Definition: ToolBar.cpp:661
TranslatableString::Stripped
TranslatableString Stripped(unsigned options=MenuCodes) const
non-mutating, constructs another TranslatableString object
Definition: TranslatableString.h:198
AudioIO::Get
static AudioIO * Get()
Definition: AudioIO.cpp:140
ThemeBase::Colour
wxColour & Colour(int iIndex)
safenew
#define safenew
Definition: MemoryX.h:10
ToolBar::Add
void Add(wxWindow *window, int proportion=0, int flag=wxALIGN_TOP, int border=0, wxObject *userData=NULL)
Definition: ToolBar.cpp:686
ControlToolBar::mLoop
AButton * mLoop
Definition: ControlToolBar.h:121
ProjectAudioManager::OnPause
void OnPause()
Definition: ProjectAudioManager.cpp:976