Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / awt / grid / XGridColumn.idl
blob08b894513702ea6fe44d773f1699e2ef272a3b54
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_awt_grid_XGridColumn_idl__
29 #define __com_sun_star_awt_grid_XGridColumn_idl__
31 #include <com/sun/star/lang/XComponent.idl>
32 #include <com/sun/star/style/HorizontalAlignment.idl>
33 #include <com/sun/star/lang/IllegalArgumentException.idl>
34 #include <com/sun/star/awt/grid/XGridColumnListener.idl>
35 #include <com/sun/star/util/XCloneable.idl>
37 //=============================================================================
39 module com { module sun { module star { module awt { module grid {
41 //=============================================================================
43 /** The <type>XGridColumn</types> defines the properties and behavior of a column in a grid control
44 @since OOo 3.3
46 interface XGridColumn
48 /** implements life time control for the component
50 interface ::com::sun::star::lang::XComponent;
52 /** allows cloning the complete grid column
54 interface ::com::sun::star::util::XCloneable;
56 /** specifies an identifier of the column
58 <p>This identifier will not be evaluated by the grid control, or its model. It is merely for clients
59 to identify particular columns.</p>
61 [attribute] any Identifier;
63 /** specifies the current width of the column.
65 [attribute] long ColumnWidth;
67 /** specifies the minimal width the column can have.
69 [attribute] long MinWidth;
71 /** specifies the maximal width the column can have.
73 [attribute] long MaxWidth;
75 /** controls whether or not the column's width is fixed or not.
77 <p>If this is <TRUE/>, the user can interactively change the column's width. Also, the column is subject to
78 auto-resizing, if its <member>Flexibility</member> attribute is greater <code>0</code>.</p>
80 [attribute] boolean Resizeable;
82 /** specifies the flexibility of the column when it is automatically resized due to the grid control as a whole
83 being resized.
85 <p>Specify <code>0</code> here if you do not want the column to be resized automatically.</p>
87 <p>If a column has a flexibility greater than 0, it is set in relationship to the flexibility of all
88 other such columns, and the respective widths of the columns are changed in the same relationship.</p>
90 <p>Note that a column's flexibility is ignored if its <member>Resizeable</member> attribute is
91 <FALSE/>.</p>
93 <p>A column's flexibility cannot be negative, attempts to set a negative value will raise an exception.</p>
95 [attribute] long Flexibility
97 set raises ( ::com::sun::star::lang::IllegalArgumentException );
100 /** Specifies the horizontal alignment of the content in the control.
102 [attribute] ::com::sun::star::style::HorizontalAlignment HorizontalAlign;
104 /** A title is displayed in the column header row if <method>UnoControlGridModel::ShowRowHeader</method> is set to <true/>**/
105 [attribute] string Title;
107 /** is the help text associated with the column.
109 <p>A grid control will usually display a column's help text as tooltip.</p>
111 [attribute] string HelpText;
113 /** denotes the index of the column within the grid column model it belongs to
115 <p>If the column is not yet part of a column model, <code>Index</code> is -1.</p>
117 [attribute, readonly] long Index;
119 /** denotes the index of the data column which should be used to fetch this grid column's data
121 <p>A grid control has a column model and a data model, both containing a possibly different number of columns.
122 The <code>DataColumnIndex</code> attribute defines the index of the column within the data model, which should
123 be used to retrieve actual data.</p>
125 <p>Using this, you can do runtime changes to the column model, i.e. insertion and removal of columns, without
126 necessarily needing to adjust the data model, too.</p>
128 <p>If <code>DataColumnIndex</code> is negative, the it will be ignored, then the column's index within its
129 column model, as determined by the <member>Index</member> attribute, will be used.</p>
131 [attribute] long DataColumnIndex;
133 /** Adds a listener for the <type>GridColumnEvent</type> posted after the grid changes.
134 @param Listener
135 the listener to add.
137 void addGridColumnListener( [in] XGridColumnListener listener);
139 //-------------------------------------------------------------------------
141 /** Removes a listener previously added with <method>addColumnListener()</method>.
142 @param Listener
143 the listener to remove.
145 void removeGridColumnListener( [in] XGridColumnListener listener);
148 //=============================================================================
150 }; }; }; }; };
152 #endif
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */