LibreOffice Module sd (master) 1
|
This convenience class makes it easy to listen to various events that originally are broadcasted via different channels. More...
#include <EventMultiplexer.hxx>
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< Implementation > | mpImpl |
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.
sd::tools::EventMultiplexer::EventMultiplexer | ( | ViewShellBase & | rBase | ) |
Create new EventMultiplexer for the given ViewShellBase object.
Definition at line 145 of file EventMultiplexer.cxx.
sd::tools::EventMultiplexer::~EventMultiplexer | ( | ) |
Definition at line 150 of file EventMultiplexer.cxx.
void sd::tools::EventMultiplexer::AddEventListener | ( | const Link< EventMultiplexerEvent &, void > & | rCallback | ) |
Add an event listener that will be informed about the specified event types.
rCallback | The 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.
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.
eEventId | The type of the event. |
pUserData | Some data sent to the listeners along with the event. |
Definition at line 176 of file EventMultiplexer.cxx.
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.
|
private |
Definition at line 167 of file EventMultiplexer.hxx.
Referenced by AddEventListener(), MultiplexEvent(), RemoveEventListener(), and ~EventMultiplexer().