LMMS
Loading...
Searching...
No Matches
juce::MessageListener Class Referenceabstract

#include <juce_MessageListener.h>

Inheritance diagram for juce::MessageListener:
juce::AudioPluginFormat

Public Member Functions

 MessageListener () noexcept
virtual ~MessageListener ()
virtual void handleMessage (const Message &message)=0
void postMessage (Message *message) const

Private Attributes

WeakReference< MessageListener >::Master masterReference

Friends

class WeakReference< MessageListener >

Detailed Description

MessageListener subclasses can post and receive Message objects.

See also
Message, MessageManager, ActionListener, ChangeListener

@tags{Events}

Constructor & Destructor Documentation

◆ MessageListener()

juce::MessageListener::MessageListener ( )
noexcept

◆ ~MessageListener()

juce::MessageListener::~MessageListener ( )
virtual

Destructor.

Member Function Documentation

◆ handleMessage()

virtual void juce::MessageListener::handleMessage ( const Message & message)
pure virtual

This is the callback method that receives incoming messages.

This is called by the MessageManager from its dispatch loop.

See also
postMessage

Implemented in juce::AudioPluginFormat.

◆ postMessage()

void juce::MessageListener::postMessage ( Message * message) const

Sends a message to the message queue, for asynchronous delivery to this listener later on.

This method can be called safely by any thread.

Parameters
messagethe message object to send - this will be deleted automatically by the message queue, so make sure it's allocated on the heap, not the stack!
See also
handleMessage

◆ WeakReference< MessageListener >

friend class WeakReference< MessageListener >
friend

Member Data Documentation

◆ masterReference

WeakReference<MessageListener>::Master juce::MessageListener::masterReference
private

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