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