/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *************************************************************/ #ifndef __com_sun_star_form_component_GridControl_idl__ #define __com_sun_star_form_component_GridControl_idl__ #ifndef __com_sun_star_util_Color_idl__ #include #endif #ifndef __com_sun_star_form_FormControlModel_idl__ #include #endif #ifndef __com_sun_star_form_XGridColumnFactory_idl__ #include #endif #ifndef __com_sun_star_form_FormComponents_idl__ #include #endif #ifndef __com_sun_star_container_XContainer_idl__ #include #endif #ifndef __com_sun_star_view_XSelectionSupplier_idl__ #include #endif #ifndef __com_sun_star_container_XNameContainer_idl__ #include #endif #ifndef __com_sun_star_container_XIndexContainer_idl__ #include #endif #ifndef __com_sun_star_container_XEnumerationAccess_idl__ #include #endif #ifndef __com_sun_star_script_XEventAttacherManager_idl__ #include #endif #ifndef __com_sun_star_form_XReset_idl__ #include #endif #ifndef __com_sun_star_awt_FontDescriptor_idl__ #include #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.

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).

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

Columns of a grid control are modeled by own objects, too. They are very similar to usual DataAwareControlModels modeling other "single-value" controls, but they are not described as own services. Instead, they need to be created using the XGridColumnFactory interface.

*/ published service GridControl { service com::sun::star::form::FormControlModel; /** provides basic functionality of a container of FormComponents.

All the container-related methods of this service related to control models, this is what are the container elements for a GridControl.

As the FormComponents service also specifies the XEventAttacherManager service, grid control models also provide a scripting environment for their columns.

*/ service com::sun::star::form::FormComponents; /** allows to create column models to be inserted into the control model.

Note that the object returned by the XGridColumnFactory::createColumn method is not part of the grid control, yet. It needs to be inserted using any of the container interfaces.

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.

*/ interface com::sun::star::form::XGridColumnFactory; /** gives access to the currently selection.

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

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.

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

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 DataAwareControlModel::XReset. */ interface com::sun::star::form::XReset; //------------------------------------------------------------------------- /** returns the border style of the control.

		0: No border
		1: 3D border
		2: simple border
		
*/ [property] short Border; //------------------------------------------------------------------------- /** specifies the color of the border, if present

Not every border style (see Border) may support coloring. For instance, usually a border with 3D effect will ignore the BorderColor setting.

@since OOo 2.0 */ [optional, property] long BorderColor; //------------------------------------------------------------------------- /** 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.

If the value is set to , the height is determined automatically according to the current font used.

@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] com::sun::star::util::Color TextColor; }; //============================================================================= }; }; }; }; }; #endif