JUCE
Public Member Functions | List of all members
ActionBroadcaster Class Reference

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

Public Member Functions

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

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: