JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::MessageListener Class Referenceabstract

MessageListener subclasses can post and receive Message objects. More...

#include <juce_MessageListener.h>

Inheritance diagram for juce::MessageListener:
Collaboration diagram for juce::MessageListener:

Public Member Functions

 MessageListener () noexcept
 
virtual ~MessageListener ()
 Destructor. More...
 
virtual void handleMessage (const Message &message)=0
 This is the callback method that receives incoming messages. More...
 
void postMessage (Message *message) const
 Sends a message to the message queue, for asynchronous delivery to this listener later on. More...
 

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

virtual 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

Friends And Related Function Documentation

◆ 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 file: