JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Public Member Functions | List of all members
MessageListener Class Referenceabstract
juce_events » messages

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

`#include <juce_MessageListener.h>`

Inheritance diagram for MessageListener:

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

## 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