LibreOffice Module sd (master) 1
Classes | Public Member Functions | Private Attributes | List of all members
sd::tools::EventMultiplexer Class Reference

This convenience class makes it easy to listen to various events that originally are broadcasted via different channels. More...

#include <EventMultiplexer.hxx>

Collaboration diagram for sd::tools::EventMultiplexer:
[legend]

Classes

class  Implementation
 

Public Member Functions

 EventMultiplexer (ViewShellBase &rBase)
 Create new EventMultiplexer for the given ViewShellBase object. More...
 
 ~EventMultiplexer ()
 
void AddEventListener (const Link< EventMultiplexerEvent &, void > &rCallback)
 Add an event listener that will be informed about the specified event types. More...
 
void RemoveEventListener (const Link< EventMultiplexerEvent &, void > &rCallback)
 Remove an event listener for the specified event types. More...
 
void MultiplexEvent (EventMultiplexerEventId eEventId, void const *pUserData)
 This method is used for out-of-line events. More...
 

Private Attributes

rtl::Reference< ImplementationmpImpl
 

Detailed Description

This convenience class makes it easy to listen to various events that originally are broadcasted via different channels.

There is usually one EventMultiplexer instance per ViewShellBase(). Call the laters GetEventMultiplexer() method to get access to that instance.

Definition at line 135 of file EventMultiplexer.hxx.

Constructor & Destructor Documentation

◆ EventMultiplexer()

sd::tools::EventMultiplexer::EventMultiplexer ( ViewShellBase rBase)

Create new EventMultiplexer for the given ViewShellBase object.

Definition at line 145 of file EventMultiplexer.cxx.

◆ ~EventMultiplexer()

sd::tools::EventMultiplexer::~EventMultiplexer ( )

Definition at line 150 of file EventMultiplexer.cxx.

References Exception, and mpImpl.

Member Function Documentation

◆ AddEventListener()

void sd::tools::EventMultiplexer::AddEventListener ( const Link< EventMultiplexerEvent &, void > &  rCallback)

Add an event listener that will be informed about the specified event types.

Parameters
rCallbackThe callback to call as soon as one of the event specified by aEventTypeSet is received by the EventMultiplexer.

Definition at line 164 of file EventMultiplexer.cxx.

References mpImpl.

◆ MultiplexEvent()

void sd::tools::EventMultiplexer::MultiplexEvent ( EventMultiplexerEventId  eEventId,
void const *  pUserData 
)

This method is used for out-of-line events.

An event of the specified type will be sent to all listeners that are registered for that type.

Parameters
eEventIdThe type of the event.
pUserDataSome data sent to the listeners along with the event.

Definition at line 176 of file EventMultiplexer.cxx.

References aEvent, and mpImpl.

◆ RemoveEventListener()

void sd::tools::EventMultiplexer::RemoveEventListener ( const Link< EventMultiplexerEvent &, void > &  rCallback)

Remove an event listener for the specified event types.

Definition at line 170 of file EventMultiplexer.cxx.

References mpImpl.

Member Data Documentation

◆ mpImpl

rtl::Reference<Implementation> sd::tools::EventMultiplexer::mpImpl
private

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