11#ifndef __AUDACITY_PROJECT_STATUS__
12#define __AUDACITY_PROJECT_STATUS__
16#include <unordered_map>
93 static int GetFieldIndex(
143 void UpdatePrefs()
override;
150 } sDefaultFieldsRegistrator;
Utility ClientData::Site to register hooks into a host class that attach client data.
PROJECT_API StatusBarField StateStatusBarField()
ID of the first field in the status bar. This filed is used to display playback state.
PROJECT_API StatusBarField MainStatusBarField()
ID of the second field in the status bar. This field is expandable.
PROJECT_API StatusBarField RateStatusBarField()
ID of the third field in the status bar. This field is used to display the current rate.
static void OnSize(wxSizeEvent &evt)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
An explicitly nonlocalized string, not meant for the user to see.
An object that sends messages to an open-ended list of subscribed callbacks.
A move-only handle representing a connection to a Publisher.
A listener notified of changes in preferences.
Observer::Subscription mFieldChangedSubscription
~ProjectStatus() override
std::unordered_map< StatusBarField, TranslatableString > mCurrentStatus
std::pair< std::vector< TranslatableString >, unsigned > StatusWidthResult
ProjectStatus(const ProjectStatus &)=delete
std::function< StatusWidthResult(const AudacityProject &, StatusBarField) > StatusWidthFunction
std::vector< StatusWidthFunction > StatusWidthFunctions
AudacityProject & mProject
Generates classes whose instances register items at construction.
Abstract base class for status bar fields.
virtual int GetDefaultWidth(const AudacityProject &project) const =0
virtual void SetText(AudacityProject &project, const TranslatableString &msg)=0
Sets the current text of the field.
virtual TranslatableString GetText(const AudacityProject &project) const =0
Retrieves the current text of the field.
virtual bool IsVisible(const AudacityProject &project) const =0
Returns true if the field is visible in the status bar of the given project.
Holds a msgid for the translation catalog; may also bind format arguments.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
size_t Count(const Ptr< Type, BaseDeleter > &p)
Find out how many elements were allocated with a Ptr.
void Visit(const Visitors &visitors, const GroupItem< RegistryTraits > *pTopItem, const GroupItem< RegistryTraits > *pRegistry={}, typename RegistryTraits::ComputedItemContextType &computedItemContext=RegistryTraits::ComputedItemContextType::Instance)
AuthorizationHandler handler
A convenient default parameter for class template Site.
Registry of status bar fields.
Has variadic and range constructors that check types.
Common abstract base class for items that are not groups.
Primary template for a list of arbitrary types.