1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XContainerWindowProvider.idl,v $
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_XContainerWindowProvider_idl__
32 #define __com_sun_star_awt_XContainerWindowProvider_idl__
34 #ifndef __com_sun_star_awt_XWindow_idl__
35 #include
<com
/sun
/star
/awt
/XWindow.idl
>
37 #ifndef __com_sun_star_awt_XWindowPeer_idl__
38 #include
<com
/sun
/star
/awt
/XWindowPeer.idl
>
40 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
41 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
44 //=============================================================================
46 module com
{ module sun
{ module star
{ module awt
{
48 //=============================================================================
50 /** provides container windows implementing the
51 <type scope="com::sun::star::awt">XWindow</type> interface.
53 interface XContainerWindowProvider
: ::com
::sun
::star
::uno
::XInterface
{
55 //-------------------------------------------------------------------------
57 /** creates a window for the given URL
63 Type of Window to be created,
64 for future use, not supported yet
67 a valid XWindowPeer reference which is used as a parent.
68 This parameter must not be null.
71 is the interface that will be called to handle the Events that
72 are generated by the window (and all controls placed on it) and
73 bound to the handler using a vnd.sun.star.UNO URL specifying a
74 handler method to be called. Usually this will be done directly
77 xHandler can handle events in two different ways:
79 1. By supporting the <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>
80 interface. This is a generic interface to accept event notifications.
82 2. By providing interfaces that directly implement the handler
83 methods to be called. The XContainerWindowProvider implementation then
84 will try to access these events using the
85 <type scope="com::sun::star::beans">Introspection</type>Introspection
86 service. To make this possible the handler implementation also has to
87 support <type scope="com::sun::star::lang">XTypeProvider</type>.
89 If XContainerWindowEventHandler is supported XContainerWindowEventHandler.callHandlerMethod()
90 is always called first to handle the event. Only if the event cannot be
91 handled by XContainerWindowEventHandler (callHandlerMethod() then has to return
92 false) or if XContainerWindowEventHandler is not supported at all the Introspection
93 based access will be used.
95 The Introspection based access tries to call a method named according to the
96 HandlerMethodName specified by a vnd.sun.star.UNO:<HandlerMethodName> URL.
99 void HandlerMethodName( [in] com::sun::star::awt::XWindow xWindow, [in] any aEvent )
101 will be searched. The signature is similar to XContainerWindowEventHandler.
102 callHandlerMethod except for MethodName itself that isn't needed
103 here. For more information about these parameters, see
104 <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>.
106 If this method is found, it will be called, otherwise a method
108 void HandlerMethodName( void )
110 will be searched and called.
113 a window implementing the <type scope="com::sun::star::awt">XWindow</type> interface.
115 @throws com::sun::star::lang::IllegalArgumentException
116 if no window for the given URL is found or if the URL is invalid
119 @see <type scope="com::sun::star::awt">XContainerWindowEventHandler</type>
122 com
::sun
::star
::awt
::XWindow createContainerWindow
123 ( [in] string URL
, [in] string WindowType
,
124 [in] com
::sun
::star
::awt
::XWindowPeer xParent
,
125 [in] com
::sun
::star
::uno
::XInterface xHandler
)
126 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
129 //=============================================================================