Audacity  3.0.3
Classes | Macros
PopupMenuTable.h File Reference
#include <functional>
#include <vector>
#include <wx/menu.h>
#include <memory>
#include "Internat.h"
#include "../commands/CommandManager.h"
Include dependency graph for PopupMenuTable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PopupMenuTableEntry
 
struct  PopupSubMenu
 
struct  PopupMenuSection
 
class  PopupMenuHandler
 
struct  PopupMenuVisitor
 
class  PopupMenu
 
class  PopupMenuTable
 
struct  PopupMenuTable::AttachedItem
 
class  ComputedPopupMenuTable< Derived, Base >
 

Macros

#define DECLARE_POPUP_MENU(HandlerClass)    void Populate() override;
 
#define BEGIN_POPUP_MENU(HandlerClass)
 
#define POPUP_MENU_FN(memFn)   ( (wxCommandEventFunction) (&My::memFn) )
 
#define POPUP_MENU_SUB_MENU(stringId, classname, pUserData)
 
#define END_POPUP_MENU()   }
 

Macro Definition Documentation

◆ BEGIN_POPUP_MENU

#define BEGIN_POPUP_MENU (   HandlerClass)
Value:
void HandlerClass::Populate() { \
using My = HandlerClass; \
mTop = std::make_shared< PopupSubMenu >( \
Id(), Caption(), *this ); \
mStack.clear(); \
mStack.push_back( mTop.get() );

Definition at line 316 of file PopupMenuTable.h.

◆ DECLARE_POPUP_MENU

#define DECLARE_POPUP_MENU (   HandlerClass)     void Populate() override;

Definition at line 312 of file PopupMenuTable.h.

◆ END_POPUP_MENU

#define END_POPUP_MENU ( )    }

Definition at line 331 of file PopupMenuTable.h.

◆ POPUP_MENU_FN

#define POPUP_MENU_FN (   memFn)    ( (wxCommandEventFunction) (&My::memFn) )

Definition at line 324 of file PopupMenuTable.h.

◆ POPUP_MENU_SUB_MENU

#define POPUP_MENU_SUB_MENU (   stringId,
  classname,
  pUserData 
)
Value:
mStack.back()->items.push_back( \
Registry::Shared( classname::Instance().Get( pUserData ) ) );

Definition at line 326 of file PopupMenuTable.h.

Registry::Shared
std::unique_ptr< SharedItem > Shared(const BaseItemSharedPtr &ptr)
Definition: Registry.h:93
BasicUI::Get
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:26