LibreOffice
LibreOffice 24.2 SDK API Reference
|
Provide a central access point for a group of events. More...
import"XContextChangeEventMultiplexer.idl";
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 were 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... | |
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
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.
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.
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.
void broadcastContextChangeEvent | ( | [in] com::sun::star::ui::ContextChangeEventObject | aEvent, |
[in] com::sun::star::uno::XInterface | xEventFocus | ||
) |
Call all event listeners that were added for the specified event focus.
void removeAllContextChangeEventListeners | ( | [in] com::sun::star::ui::XContextChangeEventListener | xListener | ) | |
raises | ( | com::sun::star::lang::IllegalArgumentException | |||
) |
Remove an event listener for all event foci.
xListener | An empty reference results in an InvalidArgumentException. |
It is not an error when the listener is not registered for any event focus.
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.
xListener | An empty reference results in an InvalidArgumentException. |
When the listener is not registered for the given event focus then an InvalidArgumentException is thrown.
xEventFocus | The listener is only removed for this event focus. An empty reference is a valid value. |