LibreOffice: XContextChangeEventMultiplexer Interface Reference

LibreOffice LibreOffice 6.1 SDK API Reference

Public Member Functions | List of all members
XContextChangeEventMultiplexer Interface Reference

Provide a central access point for a group of events. More...

`import"XContextChangeEventMultiplexer.idl";`

Inheritance diagram for XContextChangeEventMultiplexer:

## Public Member Functions
void | addContextChangeEventListener ([in] com::sun::star::ui::XContextChangeEventListener xListener, [in] com::sun::star::uno::XInterface xEventFocus) raises (com::sun::star::lang::IllegalArgumentException)
| Add an event listener that is called only when events are broadcast for the specified event focus. More...
void | removeContextChangeEventListener ([in] com::sun::star::ui::XContextChangeEventListener xListener, [in] com::sun::star::uno::XInterface xEventFocus) raises (com::sun::star::lang::IllegalArgumentException)
| Remove an event listener for the specified event focus. More...
void | removeAllContextChangeEventListeners ([in] com::sun::star::ui::XContextChangeEventListener xListener) raises (com::sun::star::lang::IllegalArgumentException)
| Remove an event listener for all event foci. More...
void | broadcastContextChangeEvent ([in] com::sun::star::ui::ContextChangeEventObject aEvent, [in] com::sun::star::uno::XInterface xEventFocus)
| Call all event listeners that where added for the specified event focus. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

Provide a central access point for a group of events.

Listeners can be added with a simple restriction on the event source. They are only called for events that originate at the specified source.

Event providers can broadcast an event to all interested listeners.

The XEventMultiplexer interface is typically implemented as a singleton

## Member Function Documentation

## ◆ addContextChangeEventListener()

void addContextChangeEventListener | ( | [in] com::sun::star::ui::XContextChangeEventListener | xListener,
|  | [in] com::sun::star::uno::XInterface | xEventFocus
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

Add an event listener that is called only when events are broadcast for the specified event focus.

Parameters

  xListener | An empty reference results in an InvalidArgumentException.

One listener may be added more than once for different event foci. Adding a listener a second time for the same event focus results in an InvalidArgumentException.

Parameters

  xEventFocus | An empty reference is a valid value. In this case the registered listener will be called for every event broadcast, regardless of its event focus.

The event focus may or may not be the source of the event.

A typical example for an event focus is the XController of a view. Using an XController restricts events passed to a listener to events that belong to one view.

Exceptions

  com::sun::star::lang::IllegalArgumentException |

## ◆ broadcastContextChangeEvent()

void broadcastContextChangeEvent | ( | [in] com::sun::star::ui::ContextChangeEventObject | aEvent,
|  | [in] com::sun::star::uno::XInterface | xEventFocus
| ) |  |

Call all event listeners that where added for the specified event focus.

## ◆ removeAllContextChangeEventListeners()

void removeAllContextChangeEventListeners | ( | [in] com::sun::star::ui::XContextChangeEventListener | xListener | ) |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

Remove an event listener for all event foci.

Parameters

  xListener | An empty reference results in an InvalidArgumentException.

It is not an error when the listener is not registered for any event focus.

Exceptions

  com::sun::star::lang::IllegalArgumentException |

## ◆ removeContextChangeEventListener()

void removeContextChangeEventListener | ( | [in] com::sun::star::ui::XContextChangeEventListener | xListener,
|  | [in] com::sun::star::uno::XInterface | xEventFocus
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

Remove an event listener for the specified event focus.

When the same listener was added for other event foci then these associations remain unmodified.

Parameters

  xListener | An empty reference results in an InvalidArgumentException.

When the listener is not registered for the given event focus then an InvalidArgumentException is thrown.

Parameters

  xEventFocus | The listener is only removed for this event focus. An empty reference is a valid value.

Exceptions

  com::sun::star::lang::IllegalArgumentException |

The documentation for this interface was generated from the following file:

- com/sun/star/ui/XContextChangeEventMultiplexer.idl