Audacity 3.2.0
|
Registry of status bar fields. More...
#include <ProjectStatus.h>
Static Public Member Functions | |
static Registry::GroupItem< StatusBarFieldRegistryTraits > & | Registry () |
Returns the registry. More... | |
static void | Visit (const StatusBarFieldRegistryVisitor &visitor) |
Visits all fields in the registry in order. More... | |
static std::size_t | Count (const AudacityProject *project) |
Returns the number of fields in the registry. If project is no null, only visible fields are counted. More... | |
static StatusBarFieldItem * | Get (const StatusBarField &identifier) |
Returns the field with the given identifier or nullptr if field is not present. More... | |
static int | GetFieldIndex (const AudacityProject &project, const StatusBarField &identifier) |
Returns the zero based index of the field or -1 if field is not present. More... | |
static void | OnSize (AudacityProject &project) |
Handle OnSize event for all fields in the registry. More... | |
static Observer::Subscription | Subscribe (std::function< void(const AudacityProject &, const StatusBarField &)> handler) |
Registry of status bar fields.
Definition at line 82 of file ProjectStatus.h.
|
static |
Returns the number of fields in the registry. If project is no null, only visible fields are counted.
Definition at line 214 of file ProjectStatus.cpp.
References StatusBarFieldItem::IsVisible(), project, Registry(), and Visit().
Referenced by ProjectWindow::CreateProjectStatusBar(), and ProjectWindow::UpdateStatusWidths().
|
static |
Returns the field with the given identifier or nullptr if field is not present.
Definition at line 232 of file ProjectStatus.cpp.
References Registry::detail::BaseItem::name, and Visit().
Referenced by ProjectStatus::Get(), audacity::cloud::audiocom::sync::CloudSyncStatusField::MarkDirty(), and ProjectStatus::Set().
|
static |
Returns the zero based index of the field or -1 if field is not present.
Definition at line 246 of file ProjectStatus.cpp.
References StatusBarFieldItem::IsVisible(), Registry::detail::BaseItem::name, project, and Visit().
Referenced by audacity::cloud::audiocom::sync::anonymous_namespace{CloudSyncStatusField.cpp}::CloudSyncStatusBarFieldItem::OnSize(), and ProjectManager::SetStatusText().
|
static |
Handle OnSize event for all fields in the registry.
Definition at line 265 of file ProjectStatus.cpp.
References OnSize(), project, and Visit().
Referenced by ProjectWindow::CreateProjectStatusBar(), OnSize(), and ProjectWindow::UpdateStatusWidths().
|
static |
Returns the registry.
Definition at line 194 of file ProjectStatus.cpp.
References anonymous_namespace{ProjectStatus.cpp}::PathStart.
Referenced by Count(), and Visit().
|
static |
Definition at line 271 of file ProjectStatus.cpp.
References BasicUI::Get(), and audacity::cloud::audiocom::anonymous_namespace{AuthorizationHandler.cpp}::handler.
|
static |
Visits all fields in the registry in order.
Definition at line 202 of file ProjectStatus.cpp.
References anonymous_namespace{ProjectStatus.cpp}::PathStart, Registry(), and Registry::VisitWithFunctions().
Referenced by Count(), ProjectWindow::CreateProjectStatusBar(), Get(), GetFieldIndex(), OnSize(), ProjectStatus::UpdatePrefs(), and ProjectWindow::UpdateStatusWidths().