1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_awt_XContainerWindowProvider_idl__
29#define __com_sun_star_awt_XContainerWindowProvider_idl__
30
31#ifndef __com_sun_star_awt_XWindow_idl__
32#include <com/sun/star/awt/XWindow.idl>
33#endif
34#ifndef __com_sun_star_awt_XWindowPeer_idl__
35#include <com/sun/star/awt/XWindowPeer.idl>
36#endif
37#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
38#include <com/sun/star/lang/IllegalArgumentException.idl>
39#endif
40
41//=============================================================================
42
43module com { module sun { module star { module awt {
44
45//=============================================================================
46
47/** provides container windows implementing the
48    <type scope="com::sun::star::awt">XWindow</type> interface.
49 */
50published interface XContainerWindowProvider : ::com::sun::star::uno::XInterface {
51
52    //-------------------------------------------------------------------------
53
54    /** creates a window for the given URL
55
56        @param URL
57            is the URL.
58
59        @param WindowType
60            Type of Window to be created,
61            for future use, not supported yet
62
63        @param xParent
64            a valid XWindowPeer reference which is used as a parent.
65            This parameter must not be null.
66
67        @param xHandler
68            is the interface that will be called to handle the Events that
69            are generated by the window (and all controls placed on it) and
70            bound to the handler using a vnd.sun.star.UNO URL specifying a
71            handler method to be called. Usually this will be done directly
72            by the user.
73
74            xHandler can handle events in two different ways:
75
76            1. By supporting the <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>
77            interface. This is a generic interface to accept event notifications.
78
79            2. By providing interfaces that directly implement the handler
80            methods to be called. The XContainerWindowProvider implementation then
81            will try to access these events using the
82            <type scope="com::sun::star::beans">Introspection</type>Introspection
83            service. To make this possible the handler implementation also has to
84            support <type scope="com::sun::star::lang">XTypeProvider</type>.
85
86            If XContainerWindowEventHandler is supported XContainerWindowEventHandler.callHandlerMethod()
87            is always called first to handle the event. Only if the event cannot be
88            handled by XContainerWindowEventHandler (callHandlerMethod() then has to return
89            false) or if XContainerWindowEventHandler is not supported at all the Introspection
90            based access will be used.
91
92            The Introspection based access tries to call a method named according to the
93            HandlerMethodName specified by a vnd.sun.star.UNO:<HandlerMethodName> URL.
94            First a method
95
96            void HandlerMethodName( [in] com::sun::star::awt::XWindow xWindow, [in] any aEvent )
97
98            will be searched. The signature is similar to XContainerWindowEventHandler.
99            callHandlerMethod except for MethodName itself that isn't needed
100            here. For more information about these parameters, see
101            <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>.
102
103            If this method is found, it will be called, otherwise a method
104
105            void HandlerMethodName( void )
106
107            will be searched and called.
108
109        @returns
110            a window implementing the <type scope="com::sun::star::awt">XWindow</type> interface.
111
112        @throws com::sun::star::lang::IllegalArgumentException
113            if no window for the given URL is found or if the URL is invalid
114            or xParent is null.
115
116        @see <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>
117
118     */
119    com::sun::star::awt::XWindow createContainerWindow
120        ( [in] string URL, [in] string WindowType,
121          [in] com::sun::star::awt::XWindowPeer xParent,
122          [in] com::sun::star::uno::XInterface xHandler )
123            raises ( com::sun::star::lang::IllegalArgumentException );
124};
125
126//=============================================================================
127
128}; }; }; };
129
130#endif
131