Audacity 3.2.0
Functions | Variables
anonymous_namespace{SelectionBar.cpp} Namespace Reference

Functions

SelectionBar::SelectionMode ReadSelectionMode ()
 
void UpdateSelectionMode (SelectionBar::SelectionMode selectionMode)
 

Variables

const TranslatableString StartTimeText = XO("Start")
 
const TranslatableString EndTimeText = XO("End")
 
const TranslatableString LengthTimeText = XO("Length")
 
const TranslatableString CenterTimeText = XO("Center")
 
std::pair< const TranslatableString &, const TranslatableString & > ModeNames []
 
std::unordered_map< TranslatableString, wxWindowID > WindowIDs
 
const NumericConverterType TimeConverterType [][2]
 
AttachedToolBarMenuItem sAttachment
 

Function Documentation

◆ ReadSelectionMode()

SelectionBar::SelectionMode anonymous_namespace{SelectionBar.cpp}::ReadSelectionMode ( )

Definition at line 70 of file SelectionBar.cpp.

71{
72 return static_cast<SelectionBar::SelectionMode>(
73 std::clamp(SelectionToolbarMode.Read(), 0, 3));
74}
IntSetting SelectionToolbarMode
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:207

References Setting< T >::Read(), and SelectionToolbarMode.

Referenced by SelectionBar::SelectionBar(), and SelectionBar::UpdatePrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateSelectionMode()

void anonymous_namespace{SelectionBar.cpp}::UpdateSelectionMode ( SelectionBar::SelectionMode  selectionMode)

Definition at line 76 of file SelectionBar.cpp.

77{
78 SelectionToolbarMode.Write(static_cast<int>(selectionMode));
79 gPrefs->Flush();
80}
audacity::BasicSettings * gPrefs
Definition: Prefs.cpp:68
bool Write(const T &value)
Write value to config and return true if successful.
Definition: Prefs.h:259
virtual bool Flush() noexcept=0

References audacity::BasicSettings::Flush(), gPrefs, SelectionToolbarMode, and Setting< T >::Write().

Referenced by SelectionBar::SelectionModeUpdated().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ CenterTimeText

const TranslatableString anonymous_namespace{SelectionBar.cpp}::CenterTimeText = XO("Center")

Definition at line 89 of file SelectionBar.cpp.

◆ EndTimeText

const TranslatableString anonymous_namespace{SelectionBar.cpp}::EndTimeText = XO("End")

Definition at line 85 of file SelectionBar.cpp.

◆ LengthTimeText

const TranslatableString anonymous_namespace{SelectionBar.cpp}::LengthTimeText = XO("Length")

Definition at line 87 of file SelectionBar.cpp.

◆ ModeNames

std::pair<const TranslatableString&, const TranslatableString&> anonymous_namespace{SelectionBar.cpp}::ModeNames[]
Initial value:

Definition at line 91 of file SelectionBar.cpp.

Referenced by SelectionBar::SetSelectionMode().

◆ sAttachment

AttachedToolBarMenuItem anonymous_namespace{SelectionBar.cpp}::sAttachment
Initial value:
{
SelectionBar::ID(), wxT("ShowSelectionTB"), XXO("&Selection Toolbar")
}
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")
static Identifier ID()

Definition at line 658 of file SelectionBar.cpp.

◆ StartTimeText

const TranslatableString anonymous_namespace{SelectionBar.cpp}::StartTimeText = XO("Start")

Definition at line 83 of file SelectionBar.cpp.

◆ TimeConverterType

const NumericConverterType anonymous_namespace{SelectionBar.cpp}::TimeConverterType[][2]
Initial value:

Definition at line 105 of file SelectionBar.cpp.

Referenced by SelectionBar::UpdateTimeControlsFormat().

◆ WindowIDs

std::unordered_map<TranslatableString, wxWindowID> anonymous_namespace{SelectionBar.cpp}::WindowIDs
Initial value:
{
{ StartTimeText, 2705 },
{ LengthTimeText, 2706 },
{ CenterTimeText, 2707 },
{ EndTimeText, 2708 }
}

Definition at line 98 of file SelectionBar.cpp.

Referenced by SelectionBar::SetSelectionMode().