/*************************************************************************
 *
 *  $RCSfile: GridControl.idl,v $
 *
 *  $Revision: 1.3.26.2 $
 *
 *  last change: $Author: mi $ $Date: 2003/01/21 17:43:32 $
 *
 *  The Contents of this file are made available subject to the terms of
 *  either of the following licenses
 *
 *         - GNU Lesser General Public License Version 2.1
 *         - Sun Industry Standards Source License Version 1.1
 *
 *  Sun Microsystems Inc., October, 2000
 *
 *  GNU Lesser General Public License Version 2.1
 *  =============================================
 *  Copyright 2000 by Sun Microsystems, Inc.
 *  901 San Antonio Road, Palo Alto, CA 94303, USA
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License version 2.1, as published by the Free Software Foundation.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *  MA  02111-1307  USA
 *
 *
 *  Sun Industry Standards Source License Version 1.1
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.1 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://www.openoffice.org/license.html.
 *
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 *
 *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 *
 *  Copyright: 2000 by Sun Microsystems, Inc.
 *
 *  All Rights Reserved.
 *
 *  Contributor(s): _______________________________________
 *
 *
 ************************************************************************/
#ifndef __com_sun_star_form_component_GridControl_idl__ 
#define __com_sun_star_form_component_GridControl_idl__ 
 
#ifndef __com_sun_star_form_FormControlModel_idl__ 
#include <com/sun/star/form/FormControlModel.idl> 
#endif 
 
#ifndef __com_sun_star_form_XGridColumnFactory_idl__ 
#include <com/sun/star/form/XGridColumnFactory.idl> 
#endif 
 
#ifndef __com_sun_star_form_FormComponents_idl__ 
#include <com/sun/star/form/FormComponents.idl> 
#endif 

#ifndef __com_sun_star_container_XContainer_idl__ 
#include <com/sun/star/container/XContainer.idl> 
#endif 
 
#ifndef __com_sun_star_view_XSelectionSupplier_idl__ 
#include <com/sun/star/view/XSelectionSupplier.idl> 
#endif 
 
#ifndef __com_sun_star_container_XNameContainer_idl__ 
#include <com/sun/star/container/XNameContainer.idl> 
#endif 
 
#ifndef __com_sun_star_container_XIndexContainer_idl__ 
#include <com/sun/star/container/XIndexContainer.idl> 
#endif 
 
#ifndef __com_sun_star_container_XEnumerationAccess_idl__ 
#include <com/sun/star/container/XEnumerationAccess.idl> 
#endif 
 
#ifndef __com_sun_star_script_XEventAttacherManager_idl__ 
#include <com/sun/star/script/XEventAttacherManager.idl> 
#endif 
 
#ifndef __com_sun_star_form_XReset_idl__ 
#include <com/sun/star/form/XReset.idl> 
#endif 
 
#ifndef __com_sun_star_awt_FontDescriptor_idl__ 
#include <com/sun/star/awt/FontDescriptor.idl> 
#endif 
 
 
//============================================================================= 
 
 module com {  module sun {  module star {  module form {  module component {  
 
//============================================================================= 
 
/** specifies a model for a control which can display form data in a table-like way.

	<p>In opposite to other form controls, grid controls do not only
	display the single current value of a column they are bound to. Moreover, they do
	display not only the current row of the form, but all rows (at least potentially, limited
	by the control size, of course).</p>

	<p>The table rows in a grid control correspond to the rows in the <type>DataForm</type>
	the control belongs to, and the columns correspond to single columns of the form's row set.</p>

	<p>Columns of a grid control are modeled by own objects, too. They are very similar to usual
	<type scope="com::sun::star::form">DataAwareControlModel</type>s modeling other "single-value" controls, but they are not described
	as own services. Instead, they need to be created using the <type scope="com::sun::star::form">XGridColumnFactory</type> interface.</p>
 */
service GridControl
{ 
	service com::sun::star::form::FormControlModel;

	/** provides basic functionality of a container of <type scope="com::sun::star::form">FormComponent</type>s.
	
		<p>All the container-related methods of this service related to control models,
		this is what are the container elements for a <type>GridControl</type>.</p>

		<p>As the <type scope="com::sun::star::form">FormComponents</type> service also specifies
		the <type scope"com::sun::star::script">XEventAttacherManager</type> service, grid control models
		also provide a scripting environment for their columns.</p>
	*/
	service com::sun::star::form::FormComponents;
	
	/** allows to create column models to be inserted into the control model.

		<p>Note that the object returned by the <membere scope="com::sun::star::form">XGridColumnFactory::createColumn</member>
		method is not part of the grid control, yet. It needs to be inserted using any of the
		container interfaces.</p>

		<p>You always need to use this interface for creating columns for the grid control.
		Column models not created this way will not be accepted when inserted later on.</p>
	*/
	interface com::sun::star::form::XGridColumnFactory; 
	
	/** gives access to the currently selection.

		<p>In a grid control, single columns can be selected (at most one at a time).<br/>
		For various unfortunate reaons, this selection is an aspect of the model, not of the
		control as you would expect.</p>

		<p>This interface is deprecated, new implementations should not use it anymore, as it is to
		be superseeded by a solution which is bound to the control, not the model.</p>

		@deprecated
	*/
	interface com::sun::star::view::XSelectionSupplier; 
	
	/** resets the control.

		<p>The reset of the control is forwarded to all it's elements, means to all the column models.
		As grid columns are very much like data-aware stand-alone controls, you can find a description
		of the reset functionality in <member scope="com::sun::star::form">DataAwareControlModel::XReset</member>.
	*/
	interface com::sun::star::form::XReset; 
 
	//------------------------------------------------------------------------- 
	 
	/** returns the border style of the control.

		<pre>
		0: No border
		1: 3D border
		2: simple border
		</pre>
	 */
	[property] short Border; 
 
	//------------------------------------------------------------------------- 
	 
	/** determines whether the control is enabled or disabled.
	 */
	[property] boolean Enabled; 
 
	//------------------------------------------------------------------------- 
	 
	/** contains the font attributes of the text in the control.
	 */
	[property] com::sun::star::awt::FontDescriptor FontDescriptor; 
 
	//------------------------------------------------------------------------- 
	 
	/** specifies the height of a row of the grid.

		<p>If the value is set to <NULL/>, the height is determined automatically according
		to the current font used.</p>

		@see GridControl::FontDescriptor
	 */
	[property] long RowHeight; 
 
	//------------------------------------------------------------------------- 
	 
	/** determines whether the control can be reached by the tabulator key.
	 */
	[property] boolean Tabstop; 
 
	//------------------------------------------------------------------------- 
	 
	/** specifies the text color (RGB) of the control.
	 */
	[property] long TextColor; 
 
}; 
 
//============================================================================= 
 
}; }; }; }; };  
 
#endif 
