Audacity 3.2.0
Classes | Macros | Typedefs
PopupMenuTable.h File Reference
#include <functional>
#include <vector>
#include <wx/menu.h>
#include <memory>
#include "Internat.h"
#include "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  PopupMenuTableTraits
 
struct  PopupMenuTableEntry
 
struct  PopupSubMenu
 
struct  PopupMenuSection
 
class  PopupMenuHandler
 
class  PopupMenu
 
class  PopupMenuTable
 
struct  PopupMenuTable::AttachedItem< Ptr >
 

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()   }
 

Typedefs

using PopupMenuGroupItem = Registry::GroupItem< PopupMenuTableTraits >
 

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 297 of file PopupMenuTable.h.

◆ DECLARE_POPUP_MENU

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

Definition at line 293 of file PopupMenuTable.h.

◆ END_POPUP_MENU

#define END_POPUP_MENU ( )    }

Definition at line 312 of file PopupMenuTable.h.

◆ POPUP_MENU_FN

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

Definition at line 305 of file PopupMenuTable.h.

◆ POPUP_MENU_SUB_MENU

#define POPUP_MENU_SUB_MENU (   stringId,
  classname,
  pUserData 
)
Value:
mStack.back()->push_back( \
Registry::Indirect(classname::Instance().Get(pUserData)));
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:202
std::unique_ptr< detail::IndirectItem< Item > > Indirect(const std::shared_ptr< Item > &ptr)
A convenience function.
Definition: Registry.h:175

Definition at line 307 of file PopupMenuTable.h.

Typedef Documentation

◆ PopupMenuGroupItem

Definition at line 41 of file PopupMenuTable.h.