1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __com_sun_star_awt_XDialogProvider2_idl__
30 #define __com_sun_star_awt_XDialogProvider2_idl__
32 #include
<com
/sun
/star
/awt
/XDialogProvider.idl
>
33 #include
<com
/sun
/star
/beans
/NamedValue.idl
>
36 //=============================================================================
38 module com
{ module sun
{ module star
{ module awt
{
40 //=============================================================================
42 /** provides dialogs implementing the
43 <type scope="com::sun::star::awt">XDialog</type> interface.
45 interface XDialogProvider2
: ::com
::sun
::star
::awt
::XDialogProvider
{
47 //-------------------------------------------------------------------------
49 /** creates a dialog for the given URL accepting an Interface used
50 to handle dialog events.
56 is the interface that will be called to handle the Events that
57 are generated by the dialog (and all controls placed on it) and
58 bound to the handler using a vnd.sun.star.UNO URL specifying a
59 handler method to be called. Usually this will be done directly
62 xHandler can handle events in two different ways:
64 1. By supporting the <type scope="com::sun::star::awt">XDialogEventHandler</type> interface.
65 This is a generic interface to accept event notifications.
67 2. By providing interfaces that directly implement the handler
68 methods to be called. The XDialogProvider2 implementation then
69 will try to access these events using the
70 <type scope="com::sun::star::beans">Introspection</type>Introspection
71 service. To make this possible the handler implementation also has to
72 support <type scope="com::sun::star::lang">XTypeProvider</type>.
74 If XDialogEventHandler is supported XDialogEventHandler.callHandlerMethod()
75 is always called first to handle the event. Only if the event cannot be
76 handled by XDialogEventHandler (callHandlerMethod() then has to return
77 false) or if XDialogEventHandler is not supported at all the Introspection
78 based access will be used.
80 The Introspection based access tries to call a method named according to the
81 HandlerMethodName specified by a vnd.sun.star.UNO:<HandlerMethodName> URL.
84 void HandlerMethodName( [in] com::sun::star::awt::XDialog xDialog, [in] any aEvent )
86 will be searched. The signature is similar to XDialogEventHandler.
87 callHandlerMethod except for MethodName itself that isn't needed
88 here. For more information about these parameters, see
89 <type scope="com::sun::star::awt">XDialogEventHandler</type>.
91 If this method is found, it will be called, otherwise a method
93 void HandlerMethodName( void )
95 will be searched and called.
98 a dialog implementing the <type scope="com::sun::star::awt">XDialog</type> interface.
100 @throws com::sun::star::lang::IllegalArgumentException
101 if no dialog for the given URL is found or if the URL is invalid
104 @see <type scope="com::sun::star::awt">XDialogEventHandler</type>
107 com
::sun
::star
::awt
::XDialog createDialogWithHandler
108 ( [in] string URL
, [in] com
::sun
::star
::uno
::XInterface xHandler
)
109 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
111 /** creates a dialog for the given URL, accepting additional creation parameters
113 <p>The arguments accepted so far are
114 <ul><li><em>ParentWindow</em> - must be a component supporting the <type>XWindowPeer</type> interface,
115 or a component supporting the <type>XControl</type> interface, so an <code>XWindowPeer</code> can be
116 obtained from it. The given window will be used as parent window for the to-be-created dialog.</li>
117 <li><em>EventHandler</em> - specifies a component handling events in the dialog. See
118 <member>createDialogWithHandler</member> for a detailed specification of dialog event handling.</li>
123 XDialog createDialogWithArguments
125 [in] sequence
< ::com
::sun
::star
::beans
::NamedValue
> Arguments
)
126 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
129 //=============================================================================
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */