![]() |
Audacity 3.2.0
|
Public Member Functions | |
FormatMenuTable () | |
DECLARE_POPUP_MENU (FormatMenuTable) | |
void | InitUserData (void *pUserData) override |
Called before the menu items are appended. More... | |
void | OnFormatChange (wxCommandEvent &event) |
![]() | |
PopupMenuTable (const Identifier &id, const TranslatableString &caption={}) | |
const Identifier & | Id () const |
const TranslatableString & | Caption () const |
const auto * | GetRegistry () const |
const auto & | Get (void *pUserData) |
void | Clear () |
![]() | |
PopupMenuHandler ()=default | |
PopupMenuHandler (const PopupMenuHandler &)=delete | |
PopupMenuHandler & | operator= (const PopupMenuHandler &)=delete |
virtual void | InitUserData (void *pUserData)=0 |
Called before the menu items are appended. More... | |
Static Public Member Functions | |
static FormatMenuTable & | Instance () |
static int | IdOfFormat (sampleFormat format) |
Converts a format enumeration to a wxWidgets menu item Id. More... | |
![]() | |
static std::unique_ptr< PopupMenu > | BuildMenu (PopupMenuTable *pTable, void *pUserData=NULL) |
static void | ExtendMenu (PopupMenu &menu, PopupMenuTable &otherTable) |
template<typename Table , typename Factory > | |
static auto | Adapt (const Factory &factory) |
Public Attributes | |
PlayableTrackControls::InitMenuData * | mpData {} |
Additional Inherited Members | |
![]() | |
using | Entry = PopupMenuTableEntry |
![]() | |
virtual void | Populate ()=0 |
template<typename Ptr > | |
void | Append (Ptr pItem) |
void | Append (const Identifier &stringId, PopupMenuTableEntry::Type type, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init) |
void | AppendItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={}) |
void | AppendRadioItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={}) |
void | AppendCheckItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={}) |
void | BeginSection (const Identifier &name) |
void | EndSection () |
![]() | |
static TranslatableString | MakeLabel (const TranslatableString &label, bool useExtra, const TranslatableString &extra) |
![]() | |
std::shared_ptr< PopupSubMenu > | mTop |
std::vector< PopupMenuGroupItem * > | mStack |
Identifier | mId |
TranslatableString | mCaption |
std::unique_ptr< PopupMenuGroupItem > | mRegistry |
Definition at line 164 of file WaveTrackControls.cpp.
|
inline |
Definition at line 166 of file WaveTrackControls.cpp.
FormatMenuTable::DECLARE_POPUP_MENU | ( | FormatMenuTable | ) |
|
static |
Converts a format enumeration to a wxWidgets menu item Id.
Definition at line 211 of file WaveTrackControls.cpp.
References floatSample, anonymous_namespace{ExportPCM.cpp}::format, int16Sample, int24Sample, On16BitID, On24BitID, and OnFloatID.
|
overridevirtual |
Called before the menu items are appended.
Store context data, if needed. May be called more than once before the menu opens. Pointer remains valid for the duration of any callback, if PopupMenuTable::BuildMenu() is called and the result's Popup() is called before any other menus are built.
Implements PopupMenuHandler.
Definition at line 188 of file WaveTrackControls.cpp.
References mpData.
|
static |
Definition at line 182 of file WaveTrackControls.cpp.
void FormatMenuTable::OnFormatChange | ( | wxCommandEvent & | event | ) |
Handles the selection from the Format submenu of the track menu.
Definition at line 230 of file WaveTrackControls.cpp.
References sampleCount::as_double(), RefreshCode::FixScrollbars, floatSample, ProjectHistory::Get(), GetSampleFormatStr(), int16Sample, int24Sample, mpData, On16BitID, On24BitID, OnFloatID, pdlgHideStopButton, project, CommonTrackControls::InitMenuData::project, CommonTrackControls::InitMenuData::pTrack, ProjectHistory::PushState(), RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, BasicUI::Success, and XO().
PlayableTrackControls::InitMenuData* FormatMenuTable::mpData {} |
Definition at line 175 of file WaveTrackControls.cpp.
Referenced by InitUserData(), and OnFormatChange().