Audacity  3.0.3
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
TrackFocus Class Referencefinal

#include <TrackPanelAx.h>

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

Public Member Functions

 TrackFocus (AudacityProject &project)
 
 ~TrackFocus () override
 
 TrackFocus (const TrackFocus &) PROHIBITED
 
TrackFocusoperator= (const TrackFocus &) PROHIBITED
 
TrackGet ()
 
void Set (Track *pTrack)
 
bool IsFocused (const Track *pTrack)
 
void SetAccessible (wxWindow &owner, std::unique_ptr< TrackPanelAx > pAccessible)
 
void MessageForScreenReader (const TranslatableString &message)
 
void UpdateAccessibility ()
 
- Public Member Functions inherited from ClientData::Base
virtual ~Base ()
 

Static Public Member Functions

static TrackFocusGet (AudacityProject &project)
 
static const TrackFocusGet (const AudacityProject &project)
 

Private Attributes

AudacityProjectmProject
 
std::unique_ptr< TrackPanelAxmAx
 

Detailed Description

Definition at line 159 of file TrackPanelAx.h.

Constructor & Destructor Documentation

◆ TrackFocus() [1/2]

TrackFocus::TrackFocus ( AudacityProject project)
explicit

Definition at line 746 of file TrackPanelAx.cpp.

747  : mProject{ project }
748 {
749 }

◆ ~TrackFocus()

TrackFocus::~TrackFocus ( )
override

Definition at line 751 of file TrackPanelAx.cpp.

752 {
753 }

◆ TrackFocus() [2/2]

TrackFocus::TrackFocus ( const TrackFocus )

Member Function Documentation

◆ Get() [1/3]

Track * TrackFocus::Get ( )

Definition at line 755 of file TrackPanelAx.cpp.

756 {
757  if (mAx)
758  return mAx->GetFocus().get();
759  return nullptr;
760 }

References mAx.

Referenced by SetTrackStatusCommand::ApplyInner(), SelectHandle::Click(), LabelTrackView::DialogForLabelName(), anonymous_namespace{LabelMenus.cpp}::DoAddLabel(), anonymous_namespace{ClipMenus.cpp}::DoClipLeftOrRight(), anonymous_namespace{ClipMenus.cpp}::DoCursorClipBoundary(), EffectUI::DoEffect(), LabelTrackView::DoKeyDown(), SelectUtilities::DoListSelection(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{TransportMenus.cpp}::DoMoveToLabel(), anonymous_namespace{NavigationMenus.cpp}::DoNextTrack(), anonymous_namespace{EditMenus.cpp}::DoPasteNothingSelected(), anonymous_namespace{NavigationMenus.cpp}::DoPrevTrack(), ProjectAudioManager::DoRecord(), TrackUtilities::DoRemoveTrack(), TrackUtilities::DoRemoveTracks(), anonymous_namespace{ClipMenus.cpp}::DoSelectClip(), anonymous_namespace{ClipMenus.cpp}::DoSelectClipBoundary(), TrackUtilities::DoTrackMute(), TrackUtilities::DoTrackSolo(), anonymous_namespace{TrackPanel.cpp}::LabeledChannelGroup::Draw(), Get(), TrackPanel::GetFocusedCell(), LabelTrackView::IsValidIndex(), SelectHandle::MoveSnappingFreqSelection(), NavigationActions::Handler::OnFirstTrack(), NavigationActions::Handler::OnLastTrack(), TrackPanel::OnMouseEvent(), TrackActions::Handler::OnNewLabelTrack(), TrackActions::Handler::OnNewStereoTrack(), TrackActions::Handler::OnNewTimeTrack(), TrackActions::Handler::OnNewWaveTrack(), LabelEditActions::Handler::OnPasteNewLabel(), EditActions::Handler::OnRedo(), WaveTrackMenuTable::OnSwapChannels(), NavigationActions::Handler::OnToggle(), TrackActions::Handler::OnTrackClose(), TrackActions::Handler::OnTrackGain(), TrackActions::Handler::OnTrackGainDec(), TrackActions::Handler::OnTrackGainInc(), TrackActions::Handler::OnTrackMoveBottom(), TrackActions::Handler::OnTrackMoveDown(), TrackActions::Handler::OnTrackMoveTop(), TrackActions::Handler::OnTrackMoveUp(), TrackActions::Handler::OnTrackMute(), TrackActions::Handler::OnTrackPan(), TrackActions::Handler::OnTrackPanLeft(), TrackActions::Handler::OnTrackPanRight(), TrackActions::Handler::OnTrackSolo(), EditActions::Handler::OnUndo(), TrackPanel::OnUndoReset(), ProjectFileManager::OpenProjectFile(), TrackPanel::ProcessUIHandleResult(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::SelectedClipOfFocusedTrack(), WaveTrackAffordanceControls::SelectNextClip(), GetInfoCommand::SendTracks(), TrackPanel::SetFocusedCell(), MuteButtonHandle::Tip(), SoloButtonHandle::Tip(), MenuButtonHandle::Tip(), CloseButtonHandle::Tip(), TrackPanel::TrackPanel(), and ProjectWindow::ZoomAfterImport().

◆ Get() [2/3]

TrackFocus & TrackFocus::Get ( AudacityProject project)
static

Definition at line 736 of file TrackPanelAx.cpp.

737 {
738  return project.AttachedObjects::Get< TrackFocus >( key );
739 }

References key.

Referenced by TrackPanel::OnTrackListDeletion().

Here is the caller graph for this function:

◆ Get() [3/3]

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

Definition at line 741 of file TrackPanelAx.cpp.

742 {
743  return Get( const_cast< AudacityProject & >( project ) );
744 }

References Get().

Here is the call graph for this function:

◆ IsFocused()

bool TrackFocus::IsFocused ( const Track pTrack)

Definition at line 770 of file TrackPanelAx.cpp.

771 {
772  if (mAx)
773  return mAx->IsFocused( pTrack );
774  return false;
775 }

References mAx.

◆ MessageForScreenReader()

void TrackFocus::MessageForScreenReader ( const TranslatableString message)

Definition at line 791 of file TrackPanelAx.cpp.

792 {
793  if (mAx)
794  mAx->MessageForScreenReader( message );
795 }

References mAx.

◆ operator=()

TrackFocus& TrackFocus::operator= ( const TrackFocus )

◆ Set()

void TrackFocus::Set ( Track pTrack)

Definition at line 762 of file TrackPanelAx.cpp.

763 {
764  if (mAx) {
765  pTrack = *TrackList::Get( mProject ).FindLeader( pTrack );
766  mAx->SetFocus( Track::SharedPointer( pTrack ) );
767  }
768 }

References TrackList::FindLeader(), TrackList::Get(), mAx, mProject, and Track::SharedPointer().

Here is the call graph for this function:

◆ SetAccessible()

void TrackFocus::SetAccessible ( wxWindow &  owner,
std::unique_ptr< TrackPanelAx pAccessible 
)

Definition at line 777 of file TrackPanelAx.cpp.

781 {
782 #if wxUSE_ACCESSIBILITY
783  // wxWidgets owns the accessible object
784  owner.SetAccessible(mAx = pAx.release());
785 #else
786  // wxWidgets does not own the object, but we need to retain it
787  mAx = std::move(pAx);
788 #endif
789 }

References mAx.

◆ UpdateAccessibility()

void TrackFocus::UpdateAccessibility ( )

Definition at line 797 of file TrackPanelAx.cpp.

798 {
799  if (mAx)
800  mAx->Updated();
801 }

References mAx.

Member Data Documentation

◆ mAx

std::unique_ptr<TrackPanelAx> TrackFocus::mAx
private

◆ mProject

AudacityProject& TrackFocus::mProject
private

Definition at line 195 of file TrackPanelAx.h.

Referenced by Set().


The documentation for this class was generated from the following files:
TrackFocus
Definition: TrackPanelAx.h:161
Track::SharedPointer
std::shared_ptr< Subclass > SharedPointer()
Definition: Track.h:291
TrackList::FindLeader
TrackIter< Track > FindLeader(Track *pTrack)
Definition: Track.cpp:659
TrackFocus::mProject
AudacityProject & mProject
Definition: TrackPanelAx.h:195
TrackFocus::Get
Track * Get()
Definition: TrackPanelAx.cpp:755
TrackList::Get
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:506
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
TrackFocus::mAx
std::unique_ptr< TrackPanelAx > mAx
Definition: TrackPanelAx.h:200
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: TrackPanelAx.cpp:730