Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
AppCommandEvent Class Referencefinal

An event 'envelope' for sending Command objects through the wxwidgets event loop. More...

#include <AppCommandEvent.h>

Inheritance diagram for AppCommandEvent:
Collaboration diagram for AppCommandEvent:

Public Member Functions

 AppCommandEvent (wxEventType commandType=wxEVT_APP_COMMAND_RECEIVED, int id=0)
 AppCommandEvent (const AppCommandEvent &event)
 ~AppCommandEvent ()
wxEvent * Clone () const override
void SetCommand (const OldStyleCommandPointer &cmd)
 Store a pointer to a command object. More...
OldStyleCommandPointer GetCommand ()

Private Attributes

OldStyleCommandPointer mCommand

Detailed Description

An event 'envelope' for sending Command objects through the wxwidgets event loop.

This allows commands to be communicated from the script thread to the main thread.

Definition at line 29 of file AppCommandEvent.h.

Constructor & Destructor Documentation

◆ AppCommandEvent() [1/2]

AppCommandEvent::AppCommandEvent ( wxEventType  commandType = wxEVT_APP_COMMAND_RECEIVED,
int  id = 0 

Definition at line 30 of file AppCommandEvent.cpp.

31: wxCommandEvent(commandType, id)
32{ }

Referenced by Clone().

Here is the caller graph for this function:

◆ AppCommandEvent() [2/2]

AppCommandEvent::AppCommandEvent ( const AppCommandEvent event)

Definition at line 35 of file AppCommandEvent.cpp.

36 : wxCommandEvent(event)
37 , mCommand(event.mCommand)
OldStyleCommandPointer mCommand

◆ ~AppCommandEvent()

AppCommandEvent::~AppCommandEvent ( )

Definition at line 41 of file AppCommandEvent.cpp.


Member Function Documentation

◆ Clone()

wxEvent * AppCommandEvent::Clone ( ) const

Definition at line 46 of file AppCommandEvent.cpp.

48 return safenew AppCommandEvent(*this);
#define safenew
Definition: MemoryX.h:10
AppCommandEvent(wxEventType commandType=wxEVT_APP_COMMAND_RECEIVED, int id=0)

References AppCommandEvent(), and safenew.

Here is the call graph for this function:

◆ GetCommand()

OldStyleCommandPointer AppCommandEvent::GetCommand ( )

Definition at line 58 of file AppCommandEvent.cpp.

60 return mCommand;

References mCommand.

◆ SetCommand()

void AppCommandEvent::SetCommand ( const OldStyleCommandPointer cmd)

Store a pointer to a command object.

Definition at line 52 of file AppCommandEvent.cpp.

54 wxASSERT(!mCommand);
55 mCommand = cmd;

References mCommand.

Referenced by ExecCommand().

Here is the caller graph for this function:

Member Data Documentation

◆ mCommand

OldStyleCommandPointer AppCommandEvent::mCommand

Definition at line 32 of file AppCommandEvent.h.

Referenced by GetCommand(), and SetCommand().

The documentation for this class was generated from the following files: