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 158 of file TrackPanelAx.h.

Constructor & Destructor Documentation

◆ TrackFocus() [1/2]

TrackFocus::TrackFocus ( AudacityProject project)
explicit

Definition at line 744 of file TrackPanelAx.cpp.

745 : mProject{ project }
746{
747}
AudacityProject & mProject
Definition: TrackPanelAx.h:197

◆ ~TrackFocus()

TrackFocus::~TrackFocus ( )
override

Definition at line 749 of file TrackPanelAx.cpp.

750{
751}

◆ TrackFocus() [2/2]

TrackFocus::TrackFocus ( const TrackFocus )

Member Function Documentation

◆ Get() [1/3]

Track * TrackFocus::Get ( )

Definition at line 753 of file TrackPanelAx.cpp.

754{
755 if (mAx)
756 return mAx->GetFocus().get();
757 return nullptr;
758}
std::unique_ptr< TrackPanelAx > mAx
Definition: TrackPanelAx.h:202

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(), NavigationActions::Handler::OnFirstTrack(), NavigationActions::Handler::OnLastTrack(), TrackPanel::OnMouseEvent(), LabelEditActions::Handler::OnNewLabelTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::Handler::OnNewStereoTrack(), anonymous_namespace{TimeTrackMenuItems.cpp}::Handler::OnNewTimeTrack(), anonymous_namespace{WaveTrackMenuItems.cpp}::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(), 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 734 of file TrackPanelAx.cpp.

735{
736 return project.AttachedObjects::Get< TrackFocus >( key );
737}
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 739 of file TrackPanelAx.cpp.

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

References Get().

Here is the call graph for this function:

◆ IsFocused()

bool TrackFocus::IsFocused ( const Track pTrack)

Definition at line 768 of file TrackPanelAx.cpp.

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

References mAx.

◆ MessageForScreenReader()

void TrackFocus::MessageForScreenReader ( const TranslatableString message)

Definition at line 789 of file TrackPanelAx.cpp.

790{
791 if (mAx)
792 mAx->MessageForScreenReader( message );
793}

References mAx.

◆ operator=()

TrackFocus & TrackFocus::operator= ( const TrackFocus )

◆ Set()

void TrackFocus::Set ( Track pTrack)

Definition at line 760 of file TrackPanelAx.cpp.

761{
762 if (mAx) {
763 pTrack = *TrackList::Get( mProject ).FindLeader( pTrack );
764 mAx->SetFocus( Track::SharedPointer( pTrack ) );
765 }
766}
std::shared_ptr< Subclass > SharedPointer()
Definition: Track.h:297
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:486
TrackIter< Track > FindLeader(Track *pTrack)
Definition: Track.cpp:644

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

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

References mAx.

◆ UpdateAccessibility()

void TrackFocus::UpdateAccessibility ( )

Definition at line 795 of file TrackPanelAx.cpp.

796{
797 if (mAx)
798 mAx->Updated();
799}

References mAx.

Member Data Documentation

◆ mAx

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

◆ mProject

AudacityProject& TrackFocus::mProject
private

Definition at line 197 of file TrackPanelAx.h.

Referenced by Set().

◆ TrackPanelAx

friend TrackFocus::TrackPanelAx
private

Definition at line 195 of file TrackPanelAx.h.


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