1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_sdb_ui_XTableUIProvider_idl__
25*b1cdbd2cSJim Jagielski#define __com_sun_star_sdb_ui_XTableUIProvider_idl__
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski#include <com/sun/star/graphic/XGraphic.idl>
28*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/IllegalArgumentException.idl>
29*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/WrappedTargetException.idl>
30*b1cdbd2cSJim Jagielski
31*b1cdbd2cSJim Jagielski//=============================================================================
32*b1cdbd2cSJim Jagielski
33*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module sdb { module application {
34*b1cdbd2cSJim Jagielski
35*b1cdbd2cSJim Jagielskiinterface XDatabaseDocumentUI;
36*b1cdbd2cSJim Jagielski
37*b1cdbd2cSJim Jagielski//=============================================================================
38*b1cdbd2cSJim Jagielski
39*b1cdbd2cSJim Jagielski/** is used by the database application to obtain non-default user
40*b1cdbd2cSJim Jagielski    interface information and/or components for database tables.
41*b1cdbd2cSJim Jagielski
42*b1cdbd2cSJim Jagielski    @see com::sun::star::sdb::Connection
43*b1cdbd2cSJim Jagielski
44*b1cdbd2cSJim Jagielski    @since OpenOffice 2.2
45*b1cdbd2cSJim Jagielski */
46*b1cdbd2cSJim Jagielskiinterface XTableUIProvider
47*b1cdbd2cSJim Jagielski{
48*b1cdbd2cSJim Jagielski    /** provides the icon which should be used to represent the table in the
49*b1cdbd2cSJim Jagielski        database application window.
50*b1cdbd2cSJim Jagielski
51*b1cdbd2cSJim Jagielski        <p>The icon will usually be requested once per table, and cached. It
52*b1cdbd2cSJim Jagielski        might be requested again if the application settings change, for instance,
53*b1cdbd2cSJim Jagielski        if another desktop theme has been activated.</p>
54*b1cdbd2cSJim Jagielski
55*b1cdbd2cSJim Jagielski        @param TableName
56*b1cdbd2cSJim Jagielski            denotes the fully qualified name of the database table.
57*b1cdbd2cSJim Jagielski
58*b1cdbd2cSJim Jagielski        @param ColorMode
59*b1cdbd2cSJim Jagielski            denotes the color mode of the graphic to retrieve, being one of the
60*b1cdbd2cSJim Jagielski            <type scope="com::sun::star::graphic">GraphicColorMode</type> constants.
61*b1cdbd2cSJim Jagielski        @return
62*b1cdbd2cSJim Jagielski            the icon which should be used to represent the table in the
63*b1cdbd2cSJim Jagielski            database application window, or <NULL/> if the default icon
64*b1cdbd2cSJim Jagielski            should be used.
65*b1cdbd2cSJim Jagielski    */
66*b1cdbd2cSJim Jagielski    com::sun::star::graphic::XGraphic getTableIcon(
67*b1cdbd2cSJim Jagielski        [in] string TableName, [in] long ColorMode );
68*b1cdbd2cSJim Jagielski
69*b1cdbd2cSJim Jagielski    /** returns a component which can be used to edit the definition of an
70*b1cdbd2cSJim Jagielski        existing table.
71*b1cdbd2cSJim Jagielski
72*b1cdbd2cSJim Jagielski        @param DocumentUI
73*b1cdbd2cSJim Jagielski            provides access to the UI in which the database document is
74*b1cdbd2cSJim Jagielski            currently displayed.<br/>
75*b1cdbd2cSJim Jagielski            In particular, this paramter provides access to the application's main
76*b1cdbd2cSJim Jagielski            window, which is needed in case the table editor should be a dialog.
77*b1cdbd2cSJim Jagielski
78*b1cdbd2cSJim Jagielski        @param TableName
79*b1cdbd2cSJim Jagielski            denotes the fully qualified name of an existing table.
80*b1cdbd2cSJim Jagielski
81*b1cdbd2cSJim Jagielski        @return
82*b1cdbd2cSJim Jagielski            a component which can be used to edit the definition of an
83*b1cdbd2cSJim Jagielski            existing table, or <NULL/> if the default component should
84*b1cdbd2cSJim Jagielski            be used.<br/>
85*b1cdbd2cSJim Jagielski            Two component types are supported so far
86*b1cdbd2cSJim Jagielski            <ul><li>modal dialogs<br/>
87*b1cdbd2cSJim Jagielski                    If the returned component supports the
88*b1cdbd2cSJim Jagielski                    <type scope="com::sun::star::ui::dialogs">XExecutableDialog</type>
89*b1cdbd2cSJim Jagielski                    interface, the dialog will be executed modally.</li>
90*b1cdbd2cSJim Jagielski                <li>modeless frames<br/>
91*b1cdbd2cSJim Jagielski                    If the returned component supports the
92*b1cdbd2cSJim Jagielski                    <type scope="com::sun::star::frame">XController</type>
93*b1cdbd2cSJim Jagielski                    interface, it is assumed that it represents a controller,
94*b1cdbd2cSJim Jagielski                    loaded into a new frame, which is a modeless and, in its lifetime,
95*b1cdbd2cSJim Jagielski                    depends on the application main window.</li>
96*b1cdbd2cSJim Jagielski            </ul>
97*b1cdbd2cSJim Jagielski            If the returned component does not support any of the above-mentioned
98*b1cdbd2cSJim Jagielski            interfaces, it's discarded.
99*b1cdbd2cSJim Jagielski
100*b1cdbd2cSJim Jagielski        @throws ::com::sun::star::lang::IllegalArgumentException
101*b1cdbd2cSJim Jagielski            if the given <arg>TableName</arg> does not denote an existing table
102*b1cdbd2cSJim Jagielski
103*b1cdbd2cSJim Jagielski        @throws ::com::sun::star::lang::WrappedTargetException
104*b1cdbd2cSJim Jagielski            if an error occures while creating the table editor component.
105*b1cdbd2cSJim Jagielski    */
106*b1cdbd2cSJim Jagielski    com::sun::star::uno::XInterface getTableEditor(
107*b1cdbd2cSJim Jagielski        [in] XDatabaseDocumentUI DocumentUI,
108*b1cdbd2cSJim Jagielski        [in] string TableName )
109*b1cdbd2cSJim Jagielski        raises (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException);
110*b1cdbd2cSJim Jagielski};
111*b1cdbd2cSJim Jagielski
112*b1cdbd2cSJim Jagielski//=============================================================================
113*b1cdbd2cSJim Jagielski
114*b1cdbd2cSJim Jagielski}; }; }; }; };
115*b1cdbd2cSJim Jagielski
116*b1cdbd2cSJim Jagielski//=============================================================================
117*b1cdbd2cSJim Jagielski
118*b1cdbd2cSJim Jagielski#endif
119*b1cdbd2cSJim Jagielski
120