Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 5fb1c39f9f9130a3cc01e8b1ffa5c0f8 > files > 3374

libreoffice-devel-3.5.4-4.x86_64.rpm

<html>
<head>
<title>Interface XDispatch</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../idl.css">
</head>
<body>
<div id="adc-idlref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="3">
<tr>
<td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td>
<td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td>
<td class="navimain"><a href="XDispatch-xref.html" class="navimain">Use</a></td>
<td class="navimainnone">Devguide</td>
<td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td>
</tr>
</table>
<table class="navisub" border="0" cellpadding="0">
<tr>
<td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td>
<td class="navisub">Attributes' Summary</td>
<td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td>
<td class="navisub">Attributes' Details</td>
</tr>
</table>
<hr>
<table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;">
<tr>
<td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">frame</a> :: </p>
</td>
</tr>
<tr>
<td class="title">interface XDispatch</td>
</tr>
<tr>
<td/></tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>serves state information of objects which can be connected to
 controls (e.g. toolbox controls).

 </dd>
<dd><p>
 Each state change is to be broadcasted to all registered
 status listeners. The first notification should be performed
 synchronously from <a href="XDispatch.html#addStatusListener()">addStatusListener()</a>;
 if not, controls may flicker. State listener must be aware of this
 synchronous notification.
 </p>

 <p>
 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 <a href="XDispatch.html">XDispatch</a>.
 </p>

 </dd>
<dt><b>See also</b></dt>
<dd><a href="Frame.html">Frame</a>, <a href="FeatureStateEvent.html">FeatureStateEvent</a></dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Methods' Summary</td>
</tr>
<tr>
<td class="imsum_left"><a href="#dispatch">dispatch</a></td>
<td class="imsum_right">dispatches (executes) an URL asynchronously.

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#addStatusListener">addStatusListener</a></td>
<td class="imsum_right">registers a listener of a control for a specific URL
 at this object to receive status events.

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left"><a href="#removeStatusListener">removeStatusListener</a></td>
<td class="imsum_right">unregisters a listener from a control.

 &nbsp;</td>
</tr>
</table>
<a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle">Methods' Details</td>
</tr>
<tr>
<td class="imdetail"><a name="dispatch" class="membertitle">dispatch</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">[oneway] void</td>
</tr>
<tr>
<td valign="top"><b>dispatch</b>(</td>
<td valign="top">[in] ::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/URL.html">URL</a></td>
<td valign="bottom">&nbsp;URL,</td>
</tr>
<tr>
<td/><td valign="top">[in] sequence&lt; ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a> &gt;</td>
<td valign="bottom">&nbsp;Arguments );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>dispatches (executes) an URL asynchronously.

 </dd>
<dd><p>
 It is only allowed to dispatch URLs for which this <a href="XDispatch.html">XDispatch</a>
 was explicitly queried. Additional arguments ("'#..." or "?...") are allowed.
 </p>

 </dd>
<dt><b>Parameter URL</b></dt>
<dd>fully parsed URL describing the feature which should be dispatched (=executed)

 </dd>
<dt><b>Parameter Arguments</b></dt>
<dd>optional arguments for this request.
 They depend on the real implementation of the dispatch object.

 </dd>
<dt><b>Example</b></dt>
<dd><pre>
 <i><font COLOR="#949494">// some code for a click-handler (Java)</font></i>
 void <strong>myOnClick</strong>(<em>String</em> sURL,<em>String</em> sTargetFrame,<em>com.sun.star.beans.PropertyValue[]</em> lArguments)
 {
 &nbsp;&nbsp;com.sun.star.util.URL[] aURL = new com.sun.star.util.URL[1];
 &nbsp;&nbsp;aURL[0] = new com.sun.star.util.URL();
 &nbsp;&nbsp;aURL[0].Complete = sURL;

 &nbsp;&nbsp;com.sun.star.util.XURLTransformer xParser = (com.sun.star.util.XURLTransformer)UnoRuntime.queryInterface(
 &nbsp;&nbsp;&nbsp;&nbsp;com.sun.star.util.XURLTransformer.class,
 &nbsp;&nbsp;&nbsp;&nbsp;mxServiceManager.createInstance("com.sun.star.util.URLTransformer"));

 &nbsp;&nbsp;xParser.parseStrict(aURL);

 &nbsp;&nbsp;com.sun.star.frame.XDispatch xDispatcher = mxFrame.queryDispatch(aURL[0], sTargetFrame, com.sun.star.frame.FrameSearchFlag.GLOBAL);

 &nbsp;&nbsp;if(xDispatcher!=null)
 &nbsp;&nbsp;&nbsp;&nbsp;xDispatcher.dispatch(aURL[0], lArguments);
 }
 </pre>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="addStatusListener" class="membertitle">addStatusListener</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">[oneway] void</td>
</tr>
<tr>
<td valign="top"><b>addStatusListener</b>(</td>
<td valign="top">[in] <a href="XStatusListener.html">XStatusListener</a></td>
<td valign="bottom">&nbsp;Control,</td>
</tr>
<tr>
<td/><td valign="top">[in] ::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/URL.html">URL</a></td>
<td valign="bottom">&nbsp;URL );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>registers a listener of a control for a specific URL
 at this object to receive status events.

 </dd>
<dd><p>
 It is only allowed to register URLs for which this <a href="XDispatch.html">XDispatch</a>
 was explicitly queried. Additional arguments ("#..." or "?...") will be ignored.
 </p>
 Note: Notifications can't be guaranteed! This will be a part of interface <a href="XNotifyingDispatch.html">XNotifyingDispatch</a>.

 </dd>
<dt><b>Parameter Control</b></dt>
<dd>listener that wishes to be informed

 </dd>
<dt><b>Parameter URL</b></dt>
<dd>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.

 </dd>
<dt><b>See also</b></dt>
<dd><a href="XStatusListener.html">XStatusListener</a>, <a href="XDispatch.html">XDispatch</a>::<a href="XDispatch.html#removeStatusListener">removeStatusListener()</a></dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="removeStatusListener" class="membertitle">removeStatusListener</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center">
<tr>
<td><table class="table-in-method" border="0">
<tr>
<td valign="top" colspan="3">[oneway] void</td>
</tr>
<tr>
<td valign="top"><b>removeStatusListener</b>(</td>
<td valign="top">[in] <a href="XStatusListener.html">XStatusListener</a></td>
<td valign="bottom">&nbsp;Control,</td>
</tr>
<tr>
<td/><td valign="top">[in] ::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/URL.html">URL</a></td>
<td valign="bottom">&nbsp;URL );</td>
</tr>
</table>
<hr>
<dl>
<dt><b>Description</b></dt>
<dd>unregisters a listener from a control.

 </dd>
<dt><b>Parameter Control</b></dt>
<dd>listener that wishes to be unregistered

 </dd>
<dt><b>Parameter URL</b></dt>
<dd>URL the listener was registered for.
 Additional arguments ("#..." or "?...") will be ignored.

 </dd>
<dt><b>See also</b></dt>
<dd><a href="XStatusListener.html">XStatusListener</a>, <a href="XDispatch.html">XDispatch</a>::<a href="XDispatch.html#addStatusListener">addStatusListener()</a></dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2000, 2012 LibreOffice contributors and/or their affiliates. All rights reserved.</p><p class="copyright" align="center">LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.</p><p class="copyright" align="center">The Document Foundation acknowledges all community members, please find more info <a href="http://www.libreoffice.org/about-us/credits/" target="_blank">at our website</a>.<p>&nbsp;</p><p class="copyright" align="center"><a href="http://www.libreoffice.org/privacy" target="_blank">Privacy Policy</a> | <a href="http://www.libreoffice.org/imprint" target="_blank">Impressum (Legal Info)</a> | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (<a href="http://www.libreoffice.org/download/license/" target="_blank">LGPLv3</a>). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our <a href="http://wiki.documentfoundation.org/TradeMark_Policy" target="_blank">trademark policy</a>.</p>

</div> <!-- id="adc-idlref" -->
</body>

</html>