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:
[legend]
Collaboration diagram for AppCommandEvent:
[legend]

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)
38{
39}
OldStyleCommandPointer mCommand

◆ ~AppCommandEvent()

AppCommandEvent::~AppCommandEvent ( )

Definition at line 41 of file AppCommandEvent.cpp.

42{
43}

Member Function Documentation

◆ Clone()

wxEvent * AppCommandEvent::Clone ( ) const
override

Definition at line 46 of file AppCommandEvent.cpp.

47{
48 return safenew AppCommandEvent(*this);
49}
#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.

59{
60 return mCommand;
61}

References mCommand.

◆ SetCommand()

void AppCommandEvent::SetCommand ( const OldStyleCommandPointer cmd)

Store a pointer to a command object.

Definition at line 52 of file AppCommandEvent.cpp.

53{
54 wxASSERT(!mCommand);
55 mCommand = cmd;
56}

References mCommand.

Referenced by ExecCommand().

Here is the caller graph for this function:

Member Data Documentation

◆ mCommand

OldStyleCommandPointer AppCommandEvent::mCommand
private

Definition at line 32 of file AppCommandEvent.h.

Referenced by GetCommand(), and SetCommand().


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