Loading...
Searching...
No Matches
ActionBroadcaster Class Reference

Manages a list of ActionListeners, and can send them messages. More...

#include <juce_ActionBroadcaster.h>

Public Member Functions

 ActionBroadcaster ()
 Creates an ActionBroadcaster.
 
virtual ~ActionBroadcaster ()
 Destructor.
 
void addActionListener (ActionListener *listener)
 Adds a listener to the list.
 
void removeActionListener (ActionListener *listener)
 Removes a listener from the list.
 
void removeAllActionListeners ()
 Removes all listeners from the list.
 
void sendActionMessage (const String &message) const
 Broadcasts a message to all the registered listeners.
 

Detailed Description

Manages a list of ActionListeners, and can send them messages.

To quickly add methods to your class that can add/remove action listeners and broadcast to them, you can derive from this.

See also
ActionListener, ChangeListener

Constructor & Destructor Documentation

◆ ActionBroadcaster()

ActionBroadcaster::ActionBroadcaster ( )

Creates an ActionBroadcaster.

◆ ~ActionBroadcaster()

virtual ActionBroadcaster::~ActionBroadcaster ( )
virtual

Destructor.

Member Function Documentation

◆ addActionListener()

void ActionBroadcaster::addActionListener ( ActionListener * listener)

Adds a listener to the list.

Trying to add a listener that's already on the list will have no effect.

◆ removeActionListener()

void ActionBroadcaster::removeActionListener ( ActionListener * listener)

Removes a listener from the list.

If the listener isn't on the list, this won't have any effect.

◆ removeAllActionListeners()

void ActionBroadcaster::removeAllActionListeners ( )

Removes all listeners from the list.

◆ sendActionMessage()

void ActionBroadcaster::sendActionMessage ( const String & message) const

Broadcasts a message to all the registered listeners.

See also
ActionListener::actionListenerCallback

The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram