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_XDialogEventHandler_idl__
25#define __com_sun_star_awt_XDialogEventHandler_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30#ifndef __com_sun_star_awt_XDialog_idl__
31#include <com/sun/star/awt/XDialog.idl>
32#endif
33#ifndef __com_sun_star_lang_WrappedTargetException_idl__
34#include <com/sun/star/lang/WrappedTargetException.idl>
35#endif
36
37
38//=============================================================================
39
40module com { module sun { module star { module awt {
41
42//=============================================================================
43
44/** Handles events fired by dialogs represented by a
45    <type scope="com::sun::star::awt">XDialog</type> interface.
46 */
47published interface XDialogEventHandler : ::com::sun::star::uno::XInterface {
48
49    //-------------------------------------------------------------------------
50
51    /** Handles an event generated by a dialog.
52
53        The implementation must be aware that the EventObject argument contains types
54        which it is not prepared to handle. Similarly this applies for the MethodName
55        argument. In this case the method should simply return false.
56
57        @param xDialog
58            the dialog instance that generated the event. This is the same dialog instance
59            that was returned by the <type scope="com::sun::star::awt">XDialogProvider2</type>
60            createDialogWithHandler method when passing the XDialogEventHandler instance
61            receiving the event as handler parameter.
62
63        @param EventObject
64            an object describing the event which occurred in the dialog or anything else that
65            provides additional information for the event.
66            If the event was caused by the dialog or any of the controls which it contains
67            then the any should contain an object derived from
68            <type scope="com::sun::star::lang">EventObject</type>. Typically this would be one
69            of the several com::sun::star::awt::*Event types.
70
71        @param MethodName
72            the name of the function which is to be called.
73
74        @returns
75            true if the event was handled, otherwise false.
76
77        @throws com::sun::star::lang::WrappedTargetException
78            if the implementation of the method, which is determined by the argument MethodName,
79            throws an exception. This exception is then wrapped into a
80            <type scope="com::sun::star::lang">WrappedTargetException</type>.
81
82     */
83    boolean callHandlerMethod(
84        [in] com::sun::star::awt::XDialog xDialog,
85        [in] any EventObject,
86        [in] string MethodName)
87        raises(com::sun::star::lang::WrappedTargetException);
88
89
90    /** returns a sequence of supported method names
91
92        @returns
93            all method names that will be accepted in calls to callHandlerMethod.
94     */
95    sequence<string> getSupportedMethodNames();
96};
97
98//=============================================================================
99
100}; }; }; };
101
102#endif
103