interface XDispatch in module com::sun::star::frame::

(Global Index)

Syntax

interface XDispatch : com::sun::star::uno::XInterface ;

Description

serves state information of objects which can be connected to controllers (e.g., toolbox controllers).

Each state change is to be broadcast to all registered status listeners. The first notification should be performed synchronously from XDispatch::addStatusListener ; if not, controllers 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 broadcast whenever this state changes or the controller should re-get the value for the URL to which it is connected. Additionally, a context-switch-event is to be broadcast whenever the object may be out of scope, to force the state listener to requery the XDispatch .

See also

StatusEvent

See also

Frame

See also

View

Method Summary

dispatch dispatches (executes) an URL asynchronously.

addStatusListener registers a listener of a controller for a specific URL to this object to receive status events.

removeStatusListener unregisters a listener of a controller.

Known Services Which Export this Interface

com::sun::star::form::control::InteractionGridControl

Method Details



dispatch

Syntax

oneway void dispatch (
com::sun::star::util::URL aURL,
sequence< com::sun::star::beans::PropertyValue > aArgs );

Description

dispatches (executes) an URL asynchronously.

It is only allowed to dispatch URLs for which this XDispatch was explicitely queried. Additional arguments "'#..." or "?...") are allowed.

Example

 // some code for a click-handler of a hyperlink in a view
 XFrame xTargetFrame = m_xFrame-&gt;findFrame(
 m_aHyperlink-&gt;getTargetFrameName(), FRAME_SEARCH_STANDARD );
 URL aURL;
 aURL.Original = m_aHyperlink-&gt;getURL();
 XDispatch m_xFrame-&gt;queryDispatch( aURL, sequence&lt;PropertyValue&gt;() );
 xDispatch-&gt;dispatch( aURL );

addStatusListener

Syntax

oneway void addStatusListener (
com::sun::star::frame::XStatusListener xControl,
com::sun::star::util::URL aURL );

Description

registers a listener of a controller for a specific URL to this object to receive status events.

It is only allowed to register for URLs for which this XDispatch was explicitely queried. Additional arguments ("#..." or "?...") will be ignored.

See also

XDispatch::removeStatusListener

removeStatusListener

Syntax

oneway void removeStatusListener (
com::sun::star::frame::XStatusListener xControl,
com::sun::star::util::URL aURL );

Description

unregisters a listener of a controller.

See also

Dispatch::addStatusListener
Top of Page