MessageListener Class Referenceabstract
juce_events » messages

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

Inheritance diagram for 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...

## Detailed Description

MessageListener subclasses can post and receive Message objects.

See also
  Message, MessageManager, ActionListener, ChangeListener

## Constructor & Destructor Documentation

## MessageListener()

MessageListener::MessageListener | ( |  | ) |

noexcept

## ~MessageListener()

virtual MessageListener::~MessageListener | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## handleMessage()

virtual void 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

## postMessage()

void 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

  message | the 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

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

- juce_MessageListener.h