59 return( focusedTrack );
69 std::shared_ptr<Track> track,
bool focusPanel)
77 const bool focusChanged = (
PeekFocus() != track);
81 if (focusChanged || focusPanel)
83 wFocus = weak_from_this(), focusPanel
85 if (
auto pFocus = wFocus.lock())
86 pFocus->Publish({ focusPanel });
104 if( t == target.get() )
120 return t->SharedPointer();
128 return std::make_shared<TrackFocus>(parent);
Toolkit-neutral facade for basic user interface services.
declares abstract base class Track, TrackList, and iterators over TrackList
static const AudacityProject::AttachedObjects::RegisteredFactory key
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
std::shared_ptr< Track > PeekFocus() const
void SetCallbacks(std::unique_ptr< TrackFocusCallbacks > pCallbacks)
void UpdateAccessibility()
Called to signal changes to a track.
void MessageForScreenReader(const TranslatableString &message)
TrackFocus(AudacityProject &project)
int TrackNum(const std::shared_ptr< Track > &track) const
std::weak_ptr< Track > mFocusedTrack
std::unique_ptr< TrackFocusCallbacks > mpCallbacks
std::shared_ptr< Track > FindTrack(int num) const
AudacityProject & mProject
std::shared_ptr< Track > GetFocus()
void Set(Track *pTrack, bool focusPanel=false)
Set the track focus to a given track or to null.
const TrackList & GetTracks() const
std::shared_ptr< Track > SetFocus(std::shared_ptr< Track > track={}, bool focusPanel=false)
Abstract base class for an object holding data associated with points on a time axis.
std::shared_ptr< Subclass > SharedPointer()
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
static TrackList & Get(AudacityProject &project)
Holds a msgid for the translation catalog; may also bind format arguments.
void CallAfter(Action action)
Schedule an action to be done later, and in the main thread.
const char * begin(const char *str) noexcept
virtual ~TrackFocusCallbacks()