![]() |
Audacity 3.2.0
|
Static Public Member Functions | |
static TrackMenuTable & | Instance () |
![]() | |
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) |
Private Member Functions | |
TrackMenuTable () | |
DECLARE_POPUP_MENU (TrackMenuTable) | |
void | OnSetName (wxCommandEvent &) |
void | OnMoveTrack (wxCommandEvent &event) |
void | InitUserData (void *pUserData) override |
Called before the menu items are appended. More... | |
void | UpdatePrefs () override |
![]() | |
PrefsListener () | |
virtual | ~PrefsListener () |
virtual void | UpdatePrefs ()=0 |
virtual void | UpdateSelectedPrefs (int id) |
Private Attributes | |
CommonTrackControls::InitMenuData * | mpData {} |
Additional Inherited Members | |
![]() | |
using | Entry = PopupMenuTableEntry |
![]() | |
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... | |
![]() | |
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 |
![]() | |
static void | Broadcast (int id=0) |
Call this static function to notify all PrefsListener objects. More... | |
Definition at line 82 of file CommonTrackControls.cpp.
|
inlineprivate |
Definition at line 86 of file CommonTrackControls.cpp.
|
private |
|
overrideprivatevirtual |
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 115 of file CommonTrackControls.cpp.
References mpData.
|
static |
Definition at line 109 of file CommonTrackControls.cpp.
Referenced by CommonTrackControls::DoContextMenu().
|
private |
Definition at line 247 of file CommonTrackControls.cpp.
References TrackUtilities::DoMoveTrack(), mpData, OnMoveBottomID, TrackUtilities::OnMoveBottomID, OnMoveDownID, TrackUtilities::OnMoveDownID, OnMoveTopID, TrackUtilities::OnMoveTopID, OnMoveUpID, TrackUtilities::OnMoveUpID, project, CommonTrackControls::InitMenuData::project, CommonTrackControls::InitMenuData::pTrack, RefreshCode::RefreshAll, and CommonTrackControls::InitMenuData::result.
|
private |
Definition at line 220 of file CommonTrackControls.cpp.
References MenuRegistry::Command, ProjectHistory::Get(), Track::GetName(), GetProjectFrame(), mpData, CommonTrackControls::InitMenuData::project, CommonTrackControls::InitMenuData::pTrack, ProjectHistory::PushState(), RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, Track::SetName(), and XO().
|
inlineoverrideprivatevirtual |
Implements PrefsListener.
Definition at line 102 of file CommonTrackControls.cpp.
References PopupMenuTable::Clear().
|
private |
Definition at line 100 of file CommonTrackControls.cpp.
Referenced by InitUserData(), OnMoveTrack(), and OnSetName().