Audacity 3.2.0
|
Abstract base class for status bar fields. More...
#include <ProjectStatus.h>
Public Member Functions | |
StatusBarFieldItem (StatusBarField identifier) | |
virtual | ~StatusBarFieldItem () |
virtual int | GetDefaultWidth (const AudacityProject &project) const =0 |
virtual void | OnSize (AudacityProject &project) |
virtual void | SetText (AudacityProject &project, const TranslatableString &msg)=0 |
Sets the current text of the field. More... | |
virtual TranslatableString | GetText (const AudacityProject &project) const =0 |
Retrieves the current text of the field. More... | |
virtual bool | IsVisible (const AudacityProject &project) const =0 |
Returns true if the field is visible in the status bar of the given project. More... | |
Public Member Functions inherited from Registry::SingleItem | |
~SingleItem () override=0 | |
Public Member Functions inherited from Registry::detail::BaseItem | |
BaseItem (const Identifier &internalName) | |
virtual | ~BaseItem () |
Protected Member Functions | |
void | DispatchFieldChanged (const AudacityProject &project) |
Derived classes should call this method to notify the status bar that the field has changed. More... | |
Additional Inherited Members | |
Public Attributes inherited from Registry::detail::BaseItem | |
const Identifier | name |
OrderingHint | orderingHint |
Abstract base class for status bar fields.
Definition at line 36 of file ProjectStatus.h.
|
explicit |
Definition at line 174 of file ProjectStatus.cpp.
References BasicUI::Get().
|
virtual |
Definition at line 180 of file ProjectStatus.cpp.
|
protected |
Derived classes should call this method to notify the status bar that the field has changed.
Definition at line 188 of file ProjectStatus.cpp.
References BasicUI::Get(), Registry::detail::BaseItem::name, and project.
Referenced by ProjectStatus::ProjectStatusTextField::SetText().
|
pure virtual |
Return the default width of the field in pixels. This is used to determine the initial width of the field in the status bar. The value may be overridden using StatusWidthFunctions. Returning -1 means that the field is expandable.In this case StatusWidthFunctions have no effect.
Implemented in ProjectStatus::ProjectStatusTextField, and audacity::cloud::audiocom::sync::anonymous_namespace{CloudSyncStatusField.cpp}::CloudSyncStatusBarFieldItem.
|
pure virtual |
Retrieves the current text of the field.
Implemented in ProjectStatus::ProjectStatusTextField, and audacity::cloud::audiocom::sync::anonymous_namespace{CloudSyncStatusField.cpp}::CloudSyncStatusBarFieldItem.
|
pure virtual |
Returns true if the field is visible in the status bar of the given project.
Implemented in ProjectStatus::ProjectStatusTextField, and audacity::cloud::audiocom::sync::anonymous_namespace{CloudSyncStatusField.cpp}::CloudSyncStatusBarFieldItem.
Referenced by ProjectStatusFieldsRegistry::Count(), and ProjectStatusFieldsRegistry::GetFieldIndex().
|
virtual |
Called when the status bar associated with the project is resized. Could be used to update the position of the custom status bar field. Default implementation does nothing.
project | The project whose status bar has been resized. The reference is non constant, as the field is likely implemented as a client site. |
Reimplemented in audacity::cloud::audiocom::sync::anonymous_namespace{CloudSyncStatusField.cpp}::CloudSyncStatusBarFieldItem.
Definition at line 184 of file ProjectStatus.cpp.
|
pure virtual |
Sets the current text of the field.
Implemented in audacity::cloud::audiocom::sync::anonymous_namespace{CloudSyncStatusField.cpp}::CloudSyncStatusBarFieldItem, and ProjectStatus::ProjectStatusTextField.