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) |
Public Member Functions inherited from PopupMenuTable | |
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 () |
Public Member Functions inherited from PopupMenuHandler | |
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 Public Member Functions inherited from PopupMenuTable | |
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 {} |
int | OnInstrument1ID |
int | OnInstrument2ID |
int | OnInstrument3ID |
int | OnInstrument4ID |
Additional Inherited Members | |
Public Types inherited from PopupMenuTable | |
using | Entry = PopupMenuTableEntry |
Protected Member Functions inherited from PopupMenuTable | |
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 Protected Member Functions inherited from PopupMenuTable | |
static TranslatableString | MakeLabel (const TranslatableString &label, bool useExtra, const TranslatableString &extra) |
Protected Attributes inherited from PopupMenuTable | |
std::shared_ptr< PopupSubMenu > | mTop |
std::vector< PopupMenuGroupItem * > | mStack |
Identifier | mId |
TranslatableString | mCaption |
std::unique_ptr< PopupMenuGroupItem > | mRegistry |
Definition at line 1071 of file WaveformView.cpp.
|
inline |
Definition at line 1073 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 1142 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 1094 of file WaveformView.cpp.
References mpData.
|
static |
Definition at line 1088 of file WaveformView.cpp.
void WaveColorMenuTable::OnWaveColorChange | ( | wxCommandEvent & | event | ) |
Handles the selection from the WaveColor submenu of the track menu.
Definition at line 1147 of file WaveformView.cpp.
References RefreshCode::FixScrollbars, ProjectHistory::Get(), WaveformAppearance::Get(), anonymous_namespace{WaveformView.cpp}::GetWaveColorStr(), mpData, OnInstrument1ID, OnInstrument4ID, project, CommonTrackControls::InitMenuData::project, ProjectHistory::PushState(), RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, WaveformAppearance::SetColorIndex(), CommonTrackControls::InitMenuData::track, and XO().
PlayableTrackControls::InitMenuData* WaveColorMenuTable::mpData {} |
Definition at line 1080 of file WaveformView.cpp.
Referenced by InitUserData(), and OnWaveColorChange().
int WaveColorMenuTable::OnInstrument1ID |
Definition at line 1085 of file WaveformView.cpp.
Referenced by OnWaveColorChange().
int WaveColorMenuTable::OnInstrument2ID |
Definition at line 1085 of file WaveformView.cpp.
int WaveColorMenuTable::OnInstrument3ID |
Definition at line 1085 of file WaveformView.cpp.
int WaveColorMenuTable::OnInstrument4ID |
Definition at line 1085 of file WaveformView.cpp.
Referenced by OnWaveColorChange().