12#ifndef __AUDACITY_TRACK_FOCUS__
13#define __AUDACITY_TRACK_FOCUS__
41 ,
public std::enable_shared_from_this<TrackFocus>
53 void SetCallbacks(std::unique_ptr<TrackFocusCallbacks> pCallbacks);
68 void Set(
Track *pTrack,
bool focusPanel =
false);
73 void UpdateAccessibility();
76 std::shared_ptr<Track> PeekFocus()
const;
78 int TrackNum(
const std::shared_ptr<Track> &track)
const;
83 std::shared_ptr<Track> GetFocus();
87 std::shared_ptr<Track>
FindTrack(
int num)
const;
92 std::shared_ptr<Track>
SetFocus(std::shared_ptr<Track> track = {},
93 bool focusPanel =
false);
101 int mNumFocusedTrack{ 0 };
Utility ClientData::Site to register hooks into a host class that attach client data.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
An object that sends messages to an open-ended list of subscribed callbacks.
std::weak_ptr< Track > mFocusedTrack
std::unique_ptr< TrackFocusCallbacks > mpCallbacks
TrackFocus & operator=(const TrackFocus &)=delete
int NumFocusedTrack() const
AudacityProject & mProject
TrackFocus(const TrackFocus &)=delete
Abstract base class for an object holding data associated with points on a time axis.
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Holds a msgid for the translation catalog; may also bind format arguments.
void SetFocus(const WindowPlacement &focus)
Set the window that accepts keyboard input.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
std::shared_ptr< Track > FindTrack(TrackPanelCell *pCell)
A convenient default parameter for class template Site.
A façade hiding platform-specific accessibility API.
virtual void EndChangeFocus(const std::shared_ptr< Track > &track)=0
virtual void BeginChangeFocus()=0
virtual void UpdateAccessibility()=0
virtual void MessageForScreenReader(const TranslatableString &message)=0
virtual ~TrackFocusCallbacks()
bool focusPanel
whether to focus the window that shows tracks