xref: /AOO41X/main/offapi/com/sun/star/sdb/application/XTableUIProvider.idl (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir
28*cdf0e10cSrcweir#ifndef __com_sun_star_sdb_ui_XTableUIProvider_idl__
29*cdf0e10cSrcweir#define __com_sun_star_sdb_ui_XTableUIProvider_idl__
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir#include <com/sun/star/graphic/XGraphic.idl>
32*cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
33*cdf0e10cSrcweir#include <com/sun/star/lang/WrappedTargetException.idl>
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir//=============================================================================
36*cdf0e10cSrcweir
37*cdf0e10cSrcweirmodule com { module sun { module star { module sdb { module application {
38*cdf0e10cSrcweir
39*cdf0e10cSrcweirinterface XDatabaseDocumentUI;
40*cdf0e10cSrcweir
41*cdf0e10cSrcweir//=============================================================================
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir/** is used by the database application to obtain non-default user
44*cdf0e10cSrcweir    interface information and/or components for database tables.
45*cdf0e10cSrcweir
46*cdf0e10cSrcweir    @see com::sun::star::sdb::Connection
47*cdf0e10cSrcweir
48*cdf0e10cSrcweir    @since OOo 2.2
49*cdf0e10cSrcweir */
50*cdf0e10cSrcweirinterface XTableUIProvider
51*cdf0e10cSrcweir{
52*cdf0e10cSrcweir    /** provides the icon which should be used to represent the table in the
53*cdf0e10cSrcweir        database application window.
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir        <p>The icon will usually be requested once per table, and cached. It
56*cdf0e10cSrcweir        might be requested again if the application settings change, for instance,
57*cdf0e10cSrcweir        if another desktop theme has been activated.</p>
58*cdf0e10cSrcweir
59*cdf0e10cSrcweir        @param TableName
60*cdf0e10cSrcweir            denotes the fully qualified name of the database table.
61*cdf0e10cSrcweir
62*cdf0e10cSrcweir        @param ColorMode
63*cdf0e10cSrcweir            denotes the color mode of the graphic to retrieve, being one of the
64*cdf0e10cSrcweir            <type scope="com::sun::star::graphic">GraphicColorMode</type> constants.
65*cdf0e10cSrcweir        @return
66*cdf0e10cSrcweir            the icon which should be used to represent the table in the
67*cdf0e10cSrcweir            database application window, or <NULL/> if the default icon
68*cdf0e10cSrcweir            should be used.
69*cdf0e10cSrcweir    */
70*cdf0e10cSrcweir    com::sun::star::graphic::XGraphic getTableIcon(
71*cdf0e10cSrcweir        [in] string TableName, [in] long ColorMode );
72*cdf0e10cSrcweir
73*cdf0e10cSrcweir    /** returns a component which can be used to edit the definition of an
74*cdf0e10cSrcweir        existing table.
75*cdf0e10cSrcweir
76*cdf0e10cSrcweir        @param DocumentUI
77*cdf0e10cSrcweir            provides access to the UI in which the database document is
78*cdf0e10cSrcweir            currently displayed.<br/>
79*cdf0e10cSrcweir            In particular, this paramter provides access to the application's main
80*cdf0e10cSrcweir            window, which is needed in case the table editor should be a dialog.
81*cdf0e10cSrcweir
82*cdf0e10cSrcweir        @param TableName
83*cdf0e10cSrcweir            denotes the fully qualified name of an existing table.
84*cdf0e10cSrcweir
85*cdf0e10cSrcweir        @return
86*cdf0e10cSrcweir            a component which can be used to edit the definition of an
87*cdf0e10cSrcweir            existing table, or <NULL/> if the default component should
88*cdf0e10cSrcweir            be used.<br/>
89*cdf0e10cSrcweir            Two component types are supported so far
90*cdf0e10cSrcweir            <ul><li>modal dialogs<br/>
91*cdf0e10cSrcweir                    If the returned component supports the
92*cdf0e10cSrcweir                    <type scope="com::sun::star::ui::dialogs">XExecutableDialog</type>
93*cdf0e10cSrcweir                    interface, the dialog will be executed modally.</li>
94*cdf0e10cSrcweir                <li>modeless frames<br/>
95*cdf0e10cSrcweir                    If the returned component supports the
96*cdf0e10cSrcweir                    <type scope="com::sun::star::frame">XController</type>
97*cdf0e10cSrcweir                    interface, it is assumed that it represents a controller,
98*cdf0e10cSrcweir                    loaded into a new frame, which is a modeless and, in its lifetime,
99*cdf0e10cSrcweir                    depends on the application main window.</li>
100*cdf0e10cSrcweir            </ul>
101*cdf0e10cSrcweir            If the returned component does not support any of the above-mentioned
102*cdf0e10cSrcweir            interfaces, it's discarded.
103*cdf0e10cSrcweir
104*cdf0e10cSrcweir        @throws ::com::sun::star::lang::IllegalArgumentException
105*cdf0e10cSrcweir            if the given <arg>TableName</arg> does not denote an existing table
106*cdf0e10cSrcweir
107*cdf0e10cSrcweir        @throws ::com::sun::star::lang::WrappedTargetException
108*cdf0e10cSrcweir            if an error occures while creating the table editor component.
109*cdf0e10cSrcweir    */
110*cdf0e10cSrcweir    com::sun::star::uno::XInterface getTableEditor(
111*cdf0e10cSrcweir        [in] XDatabaseDocumentUI DocumentUI,
112*cdf0e10cSrcweir        [in] string TableName )
113*cdf0e10cSrcweir        raises (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException);
114*cdf0e10cSrcweir};
115*cdf0e10cSrcweir
116*cdf0e10cSrcweir//=============================================================================
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir}; }; }; }; };
119*cdf0e10cSrcweir
120*cdf0e10cSrcweir//=============================================================================
121*cdf0e10cSrcweir
122*cdf0e10cSrcweir#endif
123*cdf0e10cSrcweir
124