1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_awt_XDialogProvider2_idl__ 25#define __com_sun_star_awt_XDialogProvider2_idl__ 26 27#ifndef __com_sun_star_awt_XDialogProvider_idl__ 28#include <com/sun/star/awt/XDialogProvider.idl> 29#endif 30#ifndef __com_sun_star_beans_NamedValue_idl__ 31#include <com/sun/star/beans/NamedValue.idl> 32#endif 33 34 35//============================================================================= 36 37module com { module sun { module star { module awt { 38 39//============================================================================= 40 41/** provides dialogs implementing the 42 <type scope="com::sun::star::awt">XDialog</type> interface. 43 */ 44published interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider { 45 46 //------------------------------------------------------------------------- 47 48 /** creates a dialog for the given URL accepting an Interface used 49 to handle dialog events. 50 51 @param URL 52 is the URL. 53 54 @param xHandler 55 is the interface that will be called to handle the Events that 56 are generated by the dialog (and all controls placed on it) and 57 bound to the handler using a vnd.sun.star.UNO URL specifying a 58 handler method to be called. Usually this will be done directly 59 by the user. 60 61 xHandler can handle events in two different ways: 62 63 1. By supporting the <type scope="com::sun::star::awt">XDialogEventHandler</type> interface. 64 This is a generic interface to accept event notifications. 65 66 2. By providing interfaces that directly implement the handler 67 methods to be called. The XDialogProvider2 implementation then 68 will try to access these events using the 69 <type scope="com::sun::star::beans">Introspection</type>Introspection 70 service. To make this possible the handler implementation also has to 71 support <type scope="com::sun::star::lang">XTypeProvider</type>. 72 73 If XDialogEventHandler is supported XDialogEventHandler.callHandlerMethod() 74 is always called first to handle the event. Only if the event cannot be 75 handled by XDialogEventHandler (callHandlerMethod() then has to return 76 false) or if XDialogEventHandler is not supported at all the Introspection 77 based access will be used. 78 79 The Introspection based access tries to call a method named according to the 80 HandlerMethodName specified by a vnd.sun.star.UNO:<HandlerMethodName> URL. 81 First a method 82 83 void HandlerMethodName( [in] com::sun::star::awt::XDialog xDialog, [in] any aEvent ) 84 85 will be searched. The signature is similar to XDialogEventHandler. 86 callHandlerMethod except for MethodName itself that isn't needed 87 here. For more information about these parameters, see 88 <type scope="com::sun::star::awt">XDialogEventHandler</type>. 89 90 If this method is found, it will be called, otherwise a method 91 92 void HandlerMethodName( void ) 93 94 will be searched and called. 95 96 @returns 97 a dialog implementing the <type scope="com::sun::star::awt">XDialog</type> interface. 98 99 @throws com::sun::star::lang::IllegalArgumentException 100 if no dialog for the given URL is found or if the URL is invalid 101 or xHandler is null. 102 103 @see <type scope="com::sun::star::awt">XDialogEventHandler</type> 104 105 */ 106 XDialog createDialogWithHandler 107 ( [in] string URL, [in] com::sun::star::uno::XInterface xHandler ) 108 raises ( com::sun::star::lang::IllegalArgumentException ); 109 110 /** creates a dialog for the given URL, accepting additional creation parameters 111 112 <p>The arguments accepted so far are 113 <ul><li><em>ParentWindow</em> - must be a component supporting the <type>XWindowPeer</type> interface, 114 or a component supporting the <type>XControl</type> interfac, so an <code>XWindowPeer</code> can be 115 obtained from it. The given window will be used as parent window for the to-be-created dialog.</li> 116 <li><em>EventHandler</em> - specifies a component handling events in the dialog. See 117 <member>createDialogWithHandler</member> for a detailed specification of dialog event handling.</li> 118 </ul> 119 </p> 120 */ 121 122 XDialog createDialogWithArguments 123 ( [in] string URL, 124 [in] sequence< ::com::sun::star::beans::NamedValue > Arguments ) 125 raises ( com::sun::star::lang::IllegalArgumentException ); 126}; 127 128//============================================================================= 129 130}; }; }; }; 131 132#endif 133