Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / awt / XDialogProvider2.idl
blob7365e1196816bd12cc97f686b3b57615245ef4ce
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_awt_XDialogProvider2_idl__
21 #define __com_sun_star_awt_XDialogProvider2_idl__
23 #include <com/sun/star/awt/XDialogProvider.idl>
24 #include <com/sun/star/beans/NamedValue.idl>
28 module com { module sun { module star { module awt {
31 /** provides dialogs implementing the
32 com::sun::star::awt::XDialog interface.
34 interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider {
37 /** creates a dialog for the given URL accepting an Interface used
38 to handle dialog events.
40 @param URL
41 is the URL.
43 @param xHandler
44 is the interface that will be called to handle the Events that
45 are generated by the dialog (and all controls placed on it) and
46 bound to the handler using a vnd.sun.star.UNO URL specifying a
47 handler method to be called. Usually this will be done directly
48 by the user.
50 xHandler can handle events in two different ways:
52 1. By supporting the com::sun::star::awt::XDialogEventHandler interface.
53 This is a generic interface to accept event notifications.
55 2. By providing interfaces that directly implement the handler
56 methods to be called. The XDialogProvider2 implementation then
57 will try to access these events using the
58 com::sun::star::beans::IntrospectionIntrospection
59 service. To make this possible the handler implementation also has to
60 support com::sun::star::lang::XTypeProvider.
62 If XDialogEventHandler is supported XDialogEventHandler.callHandlerMethod()
63 is always called first to handle the event. Only if the event cannot be
64 handled by XDialogEventHandler (callHandlerMethod() then has to return
65 false) or if XDialogEventHandler is not supported at all the Introspection
66 based access will be used.
68 The Introspection based access tries to call a method named according to the
69 HandlerMethodName specified by a
70 <code>vnd.sun.star.UNO:<i>HandlerMethodName</i></code> URL.
71 First a method
73 void HandlerMethodName( [in] com::sun::star::awt::XDialog xDialog, [in] any aEvent )
75 will be searched. The signature is similar to XDialogEventHandler.
76 callHandlerMethod except for MethodName itself that isn't needed
77 here. For more information about these parameters, see
78 com::sun::star::awt::XDialogEventHandler.
80 If this method is found, it will be called, otherwise a method
82 void HandlerMethodName( void )
84 will be searched and called.
86 @returns
87 a dialog implementing the com::sun::star::awt::XDialog interface.
89 @throws com::sun::star::lang::IllegalArgumentException
90 if no dialog for the given URL is found or if the URL is invalid
91 or xHandler is null.
93 @see com::sun::star::awt::XDialogEventHandler
96 com::sun::star::awt::XDialog createDialogWithHandler
97 ( [in] string URL, [in] com::sun::star::uno::XInterface xHandler )
98 raises ( com::sun::star::lang::IllegalArgumentException );
100 /** creates a dialog for the given URL, accepting additional creation parameters
102 <p>The arguments accepted so far are
103 <ul><li><em>ParentWindow</em> - must be a component supporting the XWindowPeer interface,
104 or a component supporting the XControl interface, so an <code>XWindowPeer</code> can be
105 obtained from it. The given window will be used as parent window for the to-be-created dialog.</li>
106 <li><em>EventHandler</em> - specifies a component handling events in the dialog. See
107 createDialogWithHandler() for a detailed specification of dialog event handling.</li>
108 </ul>
109 </p>
112 XDialog createDialogWithArguments
113 ( [in] string URL,
114 [in] sequence< ::com::sun::star::beans::NamedValue > Arguments )
115 raises ( com::sun::star::lang::IllegalArgumentException );
119 }; }; }; };
121 #endif
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */