Audacity 3.2.0
|
Public Member Functions | |
ProjectStatusTextField (StatusBarField identifier, int defaultWidth) | |
~ProjectStatusTextField () override=default | |
void | SetText (AudacityProject &project, const TranslatableString &text) override |
Sets the current text of the field. More... | |
TranslatableString | GetText (const AudacityProject &project) const |
Retrieves the current text of the field. More... | |
int | GetDefaultWidth (const AudacityProject &) const override |
bool | IsVisible (const AudacityProject &) const override |
Returns true if the field is visible in the status bar of the given project. More... | |
Public Member Functions inherited from StatusBarFieldItem | |
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 () |
Private Attributes | |
const int | mDefaultWidth |
Additional Inherited Members | |
Public Attributes inherited from Registry::detail::BaseItem | |
const Identifier | name |
OrderingHint | orderingHint |
Protected Member Functions inherited from StatusBarFieldItem | |
void | DispatchFieldChanged (const AudacityProject &project) |
Derived classes should call this method to notify the status bar that the field has changed. More... | |
Definition at line 277 of file ProjectStatus.cpp.
|
inline |
Definition at line 280 of file ProjectStatus.cpp.
|
overridedefault |
|
inlineoverridevirtual |
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.
Implements StatusBarFieldItem.
Definition at line 317 of file ProjectStatus.cpp.
References mDefaultWidth.
|
inlinevirtual |
Retrieves the current text of the field.
Implements StatusBarFieldItem.
Definition at line 308 of file ProjectStatus.cpp.
References ProjectStatus::Get(), Registry::detail::BaseItem::name, and project.
|
inlineoverridevirtual |
Returns true if the field is visible in the status bar of the given project.
Implements StatusBarFieldItem.
Definition at line 322 of file ProjectStatus.cpp.
|
inlineoverridevirtual |
Sets the current text of the field.
Implements StatusBarFieldItem.
Definition at line 288 of file ProjectStatus.cpp.
References StatusBarFieldItem::DispatchFieldChanged(), ProjectStatus::Get(), Registry::detail::BaseItem::name, project, and TranslatableString::Translation().
|
private |
Definition at line 328 of file ProjectStatus.cpp.
Referenced by GetDefaultWidth().