Holds a list of ChangeListeners, and sends messages to them when instructed.
More...
#include <juce_ChangeBroadcaster.h>
Holds a list of ChangeListeners, and sends messages to them when instructed.
- See also
- ChangeListener
@tags{Events}
◆ ChangeBroadcaster()
juce::ChangeBroadcaster::ChangeBroadcaster |
( |
| ) |
|
|
noexcept |
◆ ~ChangeBroadcaster()
virtual juce::ChangeBroadcaster::~ChangeBroadcaster |
( |
| ) |
|
|
virtual |
◆ addChangeListener()
void juce::ChangeBroadcaster::addChangeListener |
( |
ChangeListener * |
listener | ) |
|
Registers a listener to receive change callbacks from this broadcaster.
Trying to add a listener that's already on the list will have no effect.
◆ callListeners()
void juce::ChangeBroadcaster::callListeners |
( |
| ) |
|
|
private |
◆ dispatchPendingMessages()
void juce::ChangeBroadcaster::dispatchPendingMessages |
( |
| ) |
|
If a change message has been sent but not yet dispatched, this will call sendSynchronousChangeMessage() to make the callback immediately.
For thread-safety reasons, you must only call this method on the main message thread.
◆ removeAllChangeListeners()
void juce::ChangeBroadcaster::removeAllChangeListeners |
( |
| ) |
|
Removes all listeners from the list.
◆ removeChangeListener()
void juce::ChangeBroadcaster::removeChangeListener |
( |
ChangeListener * |
listener | ) |
|
Unregisters a listener from the list.
If the listener isn't on the list, this won't have any effect.
◆ sendChangeMessage()
void juce::ChangeBroadcaster::sendChangeMessage |
( |
| ) |
|
◆ sendSynchronousChangeMessage()
void juce::ChangeBroadcaster::sendSynchronousChangeMessage |
( |
| ) |
|
◆ ChangeBroadcasterCallback
◆ anyListeners
std::atomic<bool> juce::ChangeBroadcaster::anyListeners { false } |
|
private |
◆ broadcastCallback
◆ changeListeners
The documentation for this class was generated from the following file: