Audacity  2.2.0
CommandFunctors.h File Reference
#include <wx/string.h>
#include <wx/event.h>
#include "../MemoryX.h"

Go to the source code of this file.

Classes

class  CommandFunctor
 CommandFunctor is a very small class that works with CommandManager. It holds the callback for one command. More...
 
class  VoidFunctor< OBJ >
 
class  KeyFunctor< OBJ >
 
class  PopupFunctor< OBJ >
 
class  ListFunctor< OBJ >
 
class  PluginFunctor< OBJ >
 

Macros

#define FNT(OBJ, This, X)   (MakeFunctor<OBJ>(This, X ))
 
#define FNTS(OBJ, This, X, S)   (MakeFunctor<OBJ>(This, (S), X ))
 
#define FN(X)   FNT(AudacityProject, this, & AudacityProject :: X)
 
#define FNS(X, S)   FNTS(AudacityProject, this, & AudacityProject :: X, S)
 

Typedefs

typedef wxString PluginID
 
using CommandFunctorPointer = std::shared_ptr< CommandFunctor >
 
template<typename OBJ >
using audCommandFunction ) = void(OBJ::*)(
 
template<typename OBJ >
using audCommandKeyFunction = void(OBJ::*)(const wxEvent *)
 
template<typename OBJ >
using audCommandPopupFunction = void(OBJ::*)(wxCommandEvent &)
 
template<typename OBJ >
using audCommandListFunction = void(OBJ::*)(int)
 
template<typename OBJ >
using audCommandPluginFunction = bool(OBJ::*)(const PluginID &, int)
 

Functions

template<typename OBJ >
CommandFunctorPointer MakeFunctor (OBJ *This, audCommandFunction< OBJ > pfn)
 
template<typename OBJ >
CommandFunctorPointer MakeFunctor (OBJ *This, audCommandKeyFunction< OBJ > pfn)
 
template<typename OBJ >
CommandFunctorPointer MakeFunctor (OBJ *This, audCommandPopupFunction< OBJ > pfn)
 
template<typename OBJ >
CommandFunctorPointer MakeFunctor (OBJ *This, audCommandListFunction< OBJ > pfn)
 
template<typename OBJ >
CommandFunctorPointer MakeFunctor (OBJ *This, const PluginID &id, audCommandPluginFunction< OBJ > pfn)
 

Macro Definition Documentation

#define FN (   X)    FNT(AudacityProject, this, & AudacityProject :: X)
#define FNS (   X,
 
)    FNTS(AudacityProject, this, & AudacityProject :: X, S)
#define FNT (   OBJ,
  This,
 
)    (MakeFunctor<OBJ>(This, X ))

Referenced by Scrubber::AddMenuItems().

#define FNTS (   OBJ,
  This,
  X,
 
)    (MakeFunctor<OBJ>(This, (S), X ))

Typedef Documentation

template<typename OBJ >
using audCommandFunction = void (OBJ::*)(
template<typename OBJ >
using audCommandKeyFunction = void (OBJ::*)(const wxEvent *)
template<typename OBJ >
using audCommandListFunction = void (OBJ::*)(int)
template<typename OBJ >
using audCommandPluginFunction = bool (OBJ::*)(const PluginID &, int)
template<typename OBJ >
using audCommandPopupFunction = void (OBJ::*)(wxCommandEvent&)
using CommandFunctorPointer = std::shared_ptr <CommandFunctor>
typedef wxString PluginID

Function Documentation

template<typename OBJ >
CommandFunctorPointer MakeFunctor ( OBJ *  This,
audCommandFunction< OBJ >  pfn 
)
inline

References safenew.

template<typename OBJ >
CommandFunctorPointer MakeFunctor ( OBJ *  This,
audCommandKeyFunction< OBJ >  pfn 
)
inline

References safenew.

template<typename OBJ >
CommandFunctorPointer MakeFunctor ( OBJ *  This,
audCommandPopupFunction< OBJ >  pfn 
)
inline

References safenew.

template<typename OBJ >
CommandFunctorPointer MakeFunctor ( OBJ *  This,
audCommandListFunction< OBJ >  pfn 
)
inline

References safenew.

template<typename OBJ >
CommandFunctorPointer MakeFunctor ( OBJ *  This,
const PluginID id,
audCommandPluginFunction< OBJ >  pfn 
)
inline

References safenew.