OpenShot Audio Library | OpenShotAudio: juce::ChangeBroadcaster Class Reference

OpenShot Audio Library | OpenShotAudio 0.6.0

Loading...
Searching...
No Matches
juce::ChangeBroadcaster Class Reference

`#include <juce_ChangeBroadcaster.h>`

Inheritance diagram for juce::ChangeBroadcaster:

## Public Member Functions
| ChangeBroadcaster () noexcept
virtual | ~ChangeBroadcaster ()
void | addChangeListener (ChangeListener *listener)
void | removeChangeListener (ChangeListener *listener)
void | removeAllChangeListeners ()
void | sendChangeMessage ()
void | sendSynchronousChangeMessage ()
void | dispatchPendingMessages ()

## Detailed Description

Holds a list of ChangeListeners, and sends messages to them when instructed.

See also
  ChangeListener

Definition at line 34 of file juce_ChangeBroadcaster.h.

## Constructor & Destructor Documentation

## ◆ ChangeBroadcaster()

juce::ChangeBroadcaster::ChangeBroadcaster | ( |  | ) |
| noexcept

Creates an ChangeBroadcaster.

Definition at line 26 of file juce_ChangeBroadcaster.cpp.

## ◆ ~ChangeBroadcaster()

juce::ChangeBroadcaster::~ChangeBroadcaster | ( |  | ) |
| virtual

Destructor.

Definition at line 31 of file juce_ChangeBroadcaster.cpp.

## Member Function Documentation

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

Definition at line 35 of file juce_ChangeBroadcaster.cpp.

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

Definition at line 80 of file juce_ChangeBroadcaster.cpp.

## ◆ removeAllChangeListeners()

void juce::ChangeBroadcaster::removeAllChangeListeners | ( |  | ) |

Removes all listeners from the list.

Definition at line 55 of file juce_ChangeBroadcaster.cpp.

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

Definition at line 45 of file juce_ChangeBroadcaster.cpp.

## ◆ sendChangeMessage()

void juce::ChangeBroadcaster::sendChangeMessage | ( |  | ) |

Causes an asynchronous change message to be sent to all the registered listeners.

The message will be delivered asynchronously by the main message thread, so this method will return immediately. To call the listeners synchronously use sendSynchronousChangeMessage().

Definition at line 65 of file juce_ChangeBroadcaster.cpp.

Referenced by juce::UndoManager::clearUndoHistory(), juce::AudioTransportSource::getNextAudioBlock(), juce::UndoManager::perform(), juce::PropertiesFile::propertyChanged(), juce::UndoManager::redo(), juce::AudioDeviceManager::setAudioDeviceSetup(), juce::AudioDeviceManager::setCurrentAudioDeviceType(), juce::AudioDeviceManager::setMidiInputDeviceEnabled(), juce::AudioTransportSource::start(), juce::AudioTransportSource::stop(), and juce::UndoManager::undo().

## ◆ sendSynchronousChangeMessage()

void juce::ChangeBroadcaster::sendSynchronousChangeMessage | ( |  | ) |

Sends a synchronous change message to all the registered listeners.

This will immediately call all the listeners that are registered. For thread-safety reasons, you must only call this method on the main message thread.

See also
  dispatchPendingMessages

Definition at line 71 of file juce_ChangeBroadcaster.cpp.

Referenced by juce::AudioDeviceManager::setDefaultMidiOutputDevice().

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

- juce_ChangeBroadcaster.h
- juce_ChangeBroadcaster.cpp