Audacity 3.2.0
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 ()
 
- Public Member Functions inherited from Observer::Publisher< TrackFocusChangeMessage >
 Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={})
 Constructor supporting type-erased custom allocation/deletion. More...
 
 Publisher (Publisher &&)=default
 
Publisheroperator= (Publisher &&)=default
 
Subscription Subscribe (Callback callback)
 Connect a callback to the Publisher; later-connected are called earlier. More...
 
Subscription Subscribe (Object &obj, Return(Object::*callback)(Args...))
 Overload of Subscribe takes an object and pointer-to-member-function. More...
 

Static Public Member Functions

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

Private Attributes

friend TrackPanelAx
 
AudacityProjectmProject
 
std::unique_ptr< TrackPanelAxmAx
 

Additional Inherited Members

- Public Types inherited from Observer::Publisher< TrackFocusChangeMessage >
using message_type = TrackFocusChangeMessage
 
using CallbackReturn = std::conditional_t< true, void, bool >
 
using Callback = std::function< CallbackReturn(const TrackFocusChangeMessage &) >
 Type of functions that can be connected to the Publisher. More...
 
- Static Public Attributes inherited from Observer::Publisher< TrackFocusChangeMessage >
static constexpr bool notifies_all
 
- Protected Member Functions inherited from Observer::Publisher< TrackFocusChangeMessage >
CallbackReturn Publish (const TrackFocusChangeMessage &message)
 Send a message to connected callbacks. More...
 

Detailed Description

Definition at line 156 of file TrackPanelAx.h.

Constructor & Destructor Documentation

◆ TrackFocus() [1/2]

TrackFocus::TrackFocus ( AudacityProject project)
explicit

Definition at line 741 of file TrackPanelAx.cpp.

742 : mProject{ project }
743{
744}
AudacityProject & mProject
Definition: TrackPanelAx.h:195

◆ ~TrackFocus()

TrackFocus::~TrackFocus ( )
override

Definition at line 746 of file TrackPanelAx.cpp.

747{
748}

◆ TrackFocus() [2/2]

TrackFocus::TrackFocus ( const TrackFocus )

Member Function Documentation

◆ Get() [1/3]

Track * TrackFocus::Get ( )

Definition at line 750 of file TrackPanelAx.cpp.

751{
752 if (mAx)
753 return mAx->GetFocus().get();
754 return nullptr;
755}
std::unique_ptr< TrackPanelAx > mAx
Definition: TrackPanelAx.h:200

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{PluginMenus.cpp}::DoManageRealtimeEffectsSidePanel(), 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(), anonymous_namespace{PluginMenus.cpp}::HasTrackFocusFlag(), LabelTrackView::IsValidIndex(), SelectHandle::MoveSnappingFreqSelection(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::OnEditClipName(), NavigationActions::Handler::OnFirstTrack(), NavigationActions::Handler::OnLastTrack(), TrackPanel::OnMouseEvent(), anonymous_namespace{LabelMenus.cpp}::OnNewLabelTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewStereoTrack(), anonymous_namespace{TimeTrackMenuItems.cpp}::OnNewTimeTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::OnNewWaveTrack(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), anonymous_namespace{EditMenus.cpp}::OnRedo(), WaveTrackMenuTable::OnSwapChannels(), NavigationActions::Handler::OnToggle(), anonymous_namespace{TrackMenus.cpp}::OnTrackClose(), anonymous_namespace{TrackMenus.cpp}::OnTrackGain(), anonymous_namespace{TrackMenus.cpp}::OnTrackGainDec(), anonymous_namespace{TrackMenus.cpp}::OnTrackGainInc(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveBottom(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveDown(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveTop(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveUp(), anonymous_namespace{TrackMenus.cpp}::OnTrackMute(), anonymous_namespace{TrackMenus.cpp}::OnTrackPan(), anonymous_namespace{TrackMenus.cpp}::OnTrackPanLeft(), anonymous_namespace{TrackMenus.cpp}::OnTrackPanRight(), anonymous_namespace{TrackMenus.cpp}::OnTrackSolo(), anonymous_namespace{EditMenus.cpp}::OnUndo(), TrackPanel::OnUndoReset(), ProjectFileManager::OpenProjectFile(), TrackPanel::ProcessUIHandleResult(), RealtimeEffectPanel::RealtimeEffectPanel(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::SelectedClipOfFocusedTrack(), WaveTrackView::SelectNextClip(), GetInfoCommand::SendTracks(), TrackPanelAx::SetFocus(), TrackPanel::SetFocusedCell(), MuteButtonHandle::Tip(), SoloButtonHandle::Tip(), EffectsButtonHandle::Tip(), MenuButtonHandle::Tip(), CloseButtonHandle::Tip(), TrackPanel::TrackPanel(), and ProjectWindow::ZoomAfterImport().

◆ Get() [2/3]

TrackFocus & TrackFocus::Get ( AudacityProject project)
static

Definition at line 731 of file TrackPanelAx.cpp.

732{
733 return project.AttachedObjects::Get< TrackFocus >( key );
734}
static const AudacityProject::AttachedObjects::RegisteredFactory key

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 736 of file TrackPanelAx.cpp.

737{
738 return Get( const_cast< AudacityProject & >( project ) );
739}
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
Track * Get()

References Get().

Here is the call graph for this function:

◆ IsFocused()

bool TrackFocus::IsFocused ( const Track pTrack)

Definition at line 765 of file TrackPanelAx.cpp.

766{
767 if (mAx)
768 return mAx->IsFocused( pTrack );
769 return false;
770}

References mAx.

◆ MessageForScreenReader()

void TrackFocus::MessageForScreenReader ( const TranslatableString message)

Definition at line 786 of file TrackPanelAx.cpp.

787{
788 if (mAx)
789 mAx->MessageForScreenReader( message );
790}

References mAx.

◆ operator=()

TrackFocus & TrackFocus::operator= ( const TrackFocus )

◆ Set()

void TrackFocus::Set ( Track pTrack)

Definition at line 757 of file TrackPanelAx.cpp.

758{
759 if (mAx) {
760 pTrack = *TrackList::Get( mProject ).FindLeader( pTrack );
761 mAx->SetFocus( Track::SharedPointer( pTrack ) );
762 }
763}
std::shared_ptr< Subclass > SharedPointer()
Definition: Track.h:298
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:487
TrackIter< Track > FindLeader(Track *pTrack)
Definition: Track.cpp:645

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 772 of file TrackPanelAx.cpp.

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

References mAx.

◆ UpdateAccessibility()

void TrackFocus::UpdateAccessibility ( )

Definition at line 792 of file TrackPanelAx.cpp.

793{
794 if (mAx)
795 mAx->Updated();
796}

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

◆ TrackPanelAx

friend TrackFocus::TrackPanelAx
private

Definition at line 193 of file TrackPanelAx.h.


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