LibreOffice
LibreOffice 24.2 SDK API Reference
|
serves state information of objects which can be connected to controls (e.g. More...
import"XDispatch.idl";
Public Member Functions | |
void | dispatch ([in] com::sun::star::util::URL URL, [in] sequence< com::sun::star::beans::PropertyValue > Arguments) |
dispatches (executes) a URL More... | |
void | addStatusListener ([in] XStatusListener Control, [in] com::sun::star::util::URL URL) |
registers a listener of a control for a specific URL at this object to receive status events. More... | |
void | removeStatusListener ([in] XStatusListener Control, [in] com::sun::star::util::URL URL) |
unregisters a listener from a control. 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... | |
serves state information of objects which can be connected to controls (e.g.
toolbox controls).
Each state change is to be broadcasted to all registered status listeners. The first notification should be performed synchronously from XDispatch::addStatusListener(); if not, controls may flicker. State listener must be aware of this synchronous notification.
The state consists of enabled/disabled and a short descriptive text of the function (e.g. "undo insert character"). It is to be broadcasted whenever this state changes or the control should re-get the value for the URL it is connected to. Additionally, a context-switch-event is to be broadcasted whenever the object may be out of scope, to force the state listener to requery the XDispatch.
void addStatusListener | ( | [in] XStatusListener | Control, |
[in] com::sun::star::util::URL | URL | ||
) |
registers a listener of a control for a specific URL at this object to receive status events.
It is only allowed to register URLs for which this XDispatch was explicitly queried. Additional arguments ("#..." or "?...") will be ignored.
Note: Notifications can't be guaranteed! This will be a part of interface XNotifyingDispatch.
Control | listener that wishes to be informed |
URL | the URL (without additional arguments) the listener wishes to be registered for. A listener can be registered for more than one URL at the same time. |
void dispatch | ( | [in] com::sun::star::util::URL | URL, |
[in] sequence< com::sun::star::beans::PropertyValue > | Arguments | ||
) |
dispatches (executes) a URL
It is only allowed to dispatch URLs for which this XDispatch was explicitly queried. Additional arguments ("'#..." or "?...") are allowed.
URL | fully parsed URL describing the feature which should be dispatched (=executed) |
Arguments | optional arguments for this request (see com::sun::star::document::MediaDescriptor) They depend on the real implementation of the dispatch object. |
Controlling synchronous or asynchronous mode happens via readonly boolean Flag SynchronMode
By default, and absent any arguments, "SynchronMode" is considered FALSE
and the execution is performed asynchronously (i.e. dispatch() returns immediately, and the action is performed in the background). But when set to TRUE
, dispatch() processes the request synchronously
some code for a click-handler (Java)
void removeStatusListener | ( | [in] XStatusListener | Control, |
[in] com::sun::star::util::URL | URL | ||
) |
unregisters a listener from a control.
Control | listener that wishes to be unregistered |
URL | URL the listener was registered for. Additional arguments ("#..." or "?...") will be ignored. |