merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / awt / XDialogProvider2.idl
blobfff0b6abdca554c757d5e7468ce98257e3966853
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDialogProvider2.idl,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_awt_XDialogProvider2_idl__
32 #define __com_sun_star_awt_XDialogProvider2_idl__
34 #ifndef __com_sun_star_awt_XDialogProvider_idl__
35 #include <com/sun/star/awt/XDialogProvider.idl>
36 #endif
39 //=============================================================================
41 module com { module sun { module star { module awt {
43 //=============================================================================
45 /** provides dialogs implementing the
46 <type scope="com::sun::star::awt">XDialog</type> interface.
48 interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider {
50 //-------------------------------------------------------------------------
52 /** creates a dialog for the given URL accepting an Interface used
53 to handle dialog events.
55 @param URL
56 is the URL.
58 @param xHandler
59 is the interface that will be called to handle the Events that
60 are generated by the dialog (and all controls placed on it) and
61 bound to the handler using a vnd.sun.star.UNO URL specifying a
62 handler method to be called. Usually this will be done directly
63 by the user.
65 xHandler can handle events in two different ways:
67 1. By supporting the <type scope="com::sun::star::awt">XDialogEventHandler</type> interface.
68 This is a generic interface to accept event notifications.
70 2. By providing interfaces that directly implement the handler
71 methods to be called. The XDialogProvider2 implementation then
72 will try to access these events using the
73 <type scope="com::sun::star::beans">Introspection</type>Introspection
74 service. To make this possible the handler implementation also has to
75 support <type scope="com::sun::star::lang">XTypeProvider</type>.
77 If XDialogEventHandler is supported XDialogEventHandler.callHandlerMethod()
78 is always called first to handle the event. Only if the event cannot be
79 handled by XDialogEventHandler (callHandlerMethod() then has to return
80 false) or if XDialogEventHandler is not supported at all the Introspection
81 based access will be used.
83 The Introspection based access tries to call a method named according to the
84 HandlerMethodName specified by a vnd.sun.star.UNO:<HandlerMethodName> URL.
85 First a method
87 void HandlerMethodName( [in] com::sun::star::awt::XDialog xDialog, [in] any aEvent )
89 will be searched. The signature is similar to XDialogEventHandler.
90 callHandlerMethod except for MethodName itself that isn't needed
91 here. For more information about these parameters, see
92 <type scope="com::sun::star::awt">XDialogEventHandler</type>.
94 If this method is found, it will be called, otherwise a method
96 void HandlerMethodName( void )
98 will be searched and called.
100 @returns
101 a dialog implementing the <type scope="com::sun::star::awt">XDialog</type> interface.
103 @throws com::sun::star::lang::IllegalArgumentException
104 if no dialog for the given URL is found or if the URL is invalid
105 or xHandler is null.
107 @see <type scope="com::sun::star::awt">XDialogEventHandler</type>
110 com::sun::star::awt::XDialog createDialogWithHandler
111 ( [in] string URL, [in] com::sun::star::uno::XInterface xHandler )
112 raises ( com::sun::star::lang::IllegalArgumentException );
115 //=============================================================================
117 }; }; }; };
119 #endif