1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_form_component_GridControl_idl__ 28#define __com_sun_star_form_component_GridControl_idl__ 29 30#ifndef __com_sun_star_util_Color_idl__ 31#include <com/sun/star/util/Color.idl> 32#endif 33 34#ifndef __com_sun_star_form_FormControlModel_idl__ 35#include <com/sun/star/form/FormControlModel.idl> 36#endif 37 38#ifndef __com_sun_star_form_XGridColumnFactory_idl__ 39#include <com/sun/star/form/XGridColumnFactory.idl> 40#endif 41 42#ifndef __com_sun_star_form_FormComponents_idl__ 43#include <com/sun/star/form/FormComponents.idl> 44#endif 45 46#ifndef __com_sun_star_container_XContainer_idl__ 47#include <com/sun/star/container/XContainer.idl> 48#endif 49 50#ifndef __com_sun_star_view_XSelectionSupplier_idl__ 51#include <com/sun/star/view/XSelectionSupplier.idl> 52#endif 53 54#ifndef __com_sun_star_container_XNameContainer_idl__ 55#include <com/sun/star/container/XNameContainer.idl> 56#endif 57 58#ifndef __com_sun_star_container_XIndexContainer_idl__ 59#include <com/sun/star/container/XIndexContainer.idl> 60#endif 61 62#ifndef __com_sun_star_container_XEnumerationAccess_idl__ 63#include <com/sun/star/container/XEnumerationAccess.idl> 64#endif 65 66#ifndef __com_sun_star_script_XEventAttacherManager_idl__ 67#include <com/sun/star/script/XEventAttacherManager.idl> 68#endif 69 70#ifndef __com_sun_star_form_XReset_idl__ 71#include <com/sun/star/form/XReset.idl> 72#endif 73 74#ifndef __com_sun_star_awt_FontDescriptor_idl__ 75#include <com/sun/star/awt/FontDescriptor.idl> 76#endif 77 78 79//============================================================================= 80 81 module com { module sun { module star { module form { module component { 82 83//============================================================================= 84 85/** specifies a model for a control which can display form data in a table-like way. 86 87 <p>In opposite to other form controls, grid controls do not only 88 display the single current value of a column they are bound to. Moreover, they do 89 display not only the current row of the form, but all rows (at least potentially, limited 90 by the control size, of course).</p> 91 92 <p>The table rows in a grid control correspond to the rows in the <type>DataForm</type> 93 the control belongs to, and the columns correspond to single columns of the form's row set.</p> 94 95 <p>Columns of a grid control are modeled by own objects, too. They are very similar to usual 96 <type scope="com::sun::star::form">DataAwareControlModel</type>s modeling other "single-value" controls, but they are not described 97 as own services. Instead, they need to be created using the <type scope="com::sun::star::form">XGridColumnFactory</type> interface.</p> 98 */ 99published service GridControl 100{ 101 service com::sun::star::form::FormControlModel; 102 103 /** provides basic functionality of a container of <type scope="com::sun::star::form">FormComponent</type>s. 104 105 <p>All the container-related methods of this service related to control models, 106 this is what are the container elements for a <type>GridControl</type>.</p> 107 108 <p>As the <type scope="com::sun::star::form">FormComponents</type> service also specifies 109 the <type scope"com::sun::star::script">XEventAttacherManager</type> service, grid control models 110 also provide a scripting environment for their columns.</p> 111 */ 112 service com::sun::star::form::FormComponents; 113 114 /** allows to create column models to be inserted into the control model. 115 116 <p>Note that the object returned by the <membere scope="com::sun::star::form">XGridColumnFactory::createColumn</member> 117 method is not part of the grid control, yet. It needs to be inserted using any of the 118 container interfaces.</p> 119 120 <p>You always need to use this interface for creating columns for the grid control. 121 Column models not created this way will not be accepted when inserted later on.</p> 122 */ 123 interface com::sun::star::form::XGridColumnFactory; 124 125 /** gives access to the currently selection. 126 127 <p>In a grid control, single columns can be selected (at most one at a time).<br/> 128 For various unfortunate reaons, this selection is an aspect of the model, not of the 129 control as you would expect.</p> 130 131 <p>This interface is deprecated, new implementations should not use it anymore, as it is to 132 be superseeded by a solution which is bound to the control, not the model.</p> 133 134 @deprecated 135 */ 136 interface com::sun::star::view::XSelectionSupplier; 137 138 /** resets the control. 139 140 <p>The reset of the control is forwarded to all it's elements, means to all the column models. 141 As grid columns are very much like data-aware stand-alone controls, you can find a description 142 of the reset functionality in <member scope="com::sun::star::form">DataAwareControlModel::XReset</member>. 143 */ 144 interface com::sun::star::form::XReset; 145 146 //------------------------------------------------------------------------- 147 148 /** returns the border style of the control. 149 150 <pre> 151 0: No border 152 1: 3D border 153 2: simple border 154 </pre> 155 */ 156 [property] short Border; 157 158 //------------------------------------------------------------------------- 159 160 /** specifies the color of the border, if present 161 162 <p>Not every border style (see <member>Border</member>) may support coloring. 163 For instance, usually a border with 3D effect will ignore the BorderColor setting.</p> 164 165 @since OOo 2.0 166 */ 167 [optional, property] long BorderColor; 168 169 //------------------------------------------------------------------------- 170 171 /** determines whether the control is enabled or disabled. 172 */ 173 [property] boolean Enabled; 174 175 //------------------------------------------------------------------------- 176 177 /** contains the font attributes of the text in the control. 178 */ 179 [property] com::sun::star::awt::FontDescriptor FontDescriptor; 180 181 //------------------------------------------------------------------------- 182 183 /** specifies the height of a row of the grid. 184 185 <p>If the value is set to <NULL/>, the height is determined automatically according 186 to the current font used.</p> 187 188 @see GridControl::FontDescriptor 189 */ 190 [property] long RowHeight; 191 192 //------------------------------------------------------------------------- 193 194 /** determines whether the control can be reached by the tabulator key. 195 */ 196 [property] boolean Tabstop; 197 198 //------------------------------------------------------------------------- 199 200 /** specifies the text color (RGB) of the control. 201 */ 202 [property] com::sun::star::util::Color TextColor; 203 204}; 205 206//============================================================================= 207 208}; }; }; }; }; 209 210#endif 211