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

## Detailed Description

MessageListener subclasses can post and receive Message objects.

See also
  Message, MessageManager, ActionListener, ChangeListener

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

- juce_events/messages/juce_MessageListener.h

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

## Constructors and Destructors

## MessageListener()

juce::MessageListener::MessageListener | ( |  | ) |

noexcept

Referenced by WeakReference< MessageListener >, and ~MessageListener().

## ~MessageListener()

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

virtual

Destructor.

References MessageListener().

## Member Functions

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

References handleMessage().

Referenced by handleMessage().

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

  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

References postMessage().

Referenced by postMessage().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited