![]() |
Audacity 3.2.0
|
Public Member Functions | |
WaveColorMenuTable () | |
DECLARE_POPUP_MENU (WaveColorMenuTable) | |
void | InitUserData (void *pUserData) override |
Called before the menu items are appended. More... | |
int | IdOfWaveColor (int WaveColor) |
Converts a WaveColor enumeration to a wxWidgets menu item Id. More... | |
void | OnWaveColorChange (wxCommandEvent &event) |
![]() | |
PopupMenuTable (const Identifier &id, const TranslatableString &caption={}) | |
const Identifier & | Id () const |
const TranslatableString & | Caption () const |
const Registry::GroupItemBase * | GetRegistry () const |
const std::shared_ptr< Registry::GroupItemBase > & | 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 WaveColorMenuTable & | Instance () |
![]() | |
static std::unique_ptr< PopupMenu > | BuildMenu (PopupMenuTable *pTable, void *pUserData=NULL) |
static void | ExtendMenu (PopupMenu &menu, PopupMenuTable &otherTable) |
template<typename Table > | |
static Registry::BaseItemPtr | Computed (const std::function< Registry::BaseItemPtr(Table &) > &factory) |
Public Attributes | |
PlayableTrackControls::InitMenuData * | mpData {} |
int | OnInstrument1ID |
int | OnInstrument2ID |
int | OnInstrument3ID |
int | OnInstrument4ID |
Additional Inherited Members | |
![]() | |
using | Entry = PopupMenuTableEntry |
![]() | |
virtual void | Populate ()=0 |
void | Append (Registry::BaseItemPtr 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< Registry::GroupItemBase > | mTop |
std::vector< Registry::GroupItemBase * > | mStack |
Identifier | mId |
TranslatableString | mCaption |
std::unique_ptr< Registry::GroupItemBase > | mRegistry |
Definition at line 1094 of file WaveformView.cpp.
|
inline |
Definition at line 1096 of file WaveformView.cpp.
WaveColorMenuTable::DECLARE_POPUP_MENU | ( | WaveColorMenuTable | ) |
int WaveColorMenuTable::IdOfWaveColor | ( | int | WaveColor | ) |
Converts a WaveColor enumeration to a wxWidgets menu item Id.
Definition at line 1164 of file WaveformView.cpp.
|
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 1117 of file WaveformView.cpp.
References mpData.
|
static |
Definition at line 1111 of file WaveformView.cpp.
void WaveColorMenuTable::OnWaveColorChange | ( | wxCommandEvent & | event | ) |
Handles the selection from the WaveColor submenu of the track menu.
Definition at line 1169 of file WaveformView.cpp.
References TrackList::Channels(), RefreshCode::FixScrollbars, ProjectHistory::Get(), anonymous_namespace{WaveformView.cpp}::GetWaveColorStr(), mpData, OnInstrument1ID, OnInstrument4ID, CommonTrackControls::InitMenuData::project, CommonTrackControls::InitMenuData::pTrack, ProjectHistory::PushState(), RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, and XO().
PlayableTrackControls::InitMenuData* WaveColorMenuTable::mpData {} |
Definition at line 1103 of file WaveformView.cpp.
Referenced by InitUserData(), and OnWaveColorChange().
int WaveColorMenuTable::OnInstrument1ID |
Definition at line 1108 of file WaveformView.cpp.
Referenced by OnWaveColorChange().
int WaveColorMenuTable::OnInstrument2ID |
Definition at line 1108 of file WaveformView.cpp.
int WaveColorMenuTable::OnInstrument3ID |
Definition at line 1108 of file WaveformView.cpp.
int WaveColorMenuTable::OnInstrument4ID |
Definition at line 1108 of file WaveformView.cpp.
Referenced by OnWaveColorChange().