1*b1cdbd2cSJim Jagielski/************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_awt_grid_XGridColumn_idl__ 24*b1cdbd2cSJim Jagielski#define __com_sun_star_awt_grid_XGridColumn_idl__ 25*b1cdbd2cSJim Jagielski 26*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/XComponent.idl> 27*b1cdbd2cSJim Jagielski#include <com/sun/star/style/HorizontalAlignment.idl> 28*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/IllegalArgumentException.idl> 29*b1cdbd2cSJim Jagielski#include <com/sun/star/awt/grid/XGridColumnListener.idl> 30*b1cdbd2cSJim Jagielski#include <com/sun/star/util/XCloneable.idl> 31*b1cdbd2cSJim Jagielski 32*b1cdbd2cSJim Jagielski//============================================================================= 33*b1cdbd2cSJim Jagielski 34*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module awt { module grid { 35*b1cdbd2cSJim Jagielski 36*b1cdbd2cSJim Jagielski//============================================================================= 37*b1cdbd2cSJim Jagielski 38*b1cdbd2cSJim Jagielski/** The <type>XGridColumn</types> defines the properties and behavior of a column in a grid control 39*b1cdbd2cSJim Jagielski @since OpenOffice 3.3 40*b1cdbd2cSJim Jagielski */ 41*b1cdbd2cSJim Jagielskipublished interface XGridColumn 42*b1cdbd2cSJim Jagielski{ 43*b1cdbd2cSJim Jagielski /** implements life time control for the component 44*b1cdbd2cSJim Jagielski */ 45*b1cdbd2cSJim Jagielski interface ::com::sun::star::lang::XComponent; 46*b1cdbd2cSJim Jagielski 47*b1cdbd2cSJim Jagielski /** allows cloning the complete grid column 48*b1cdbd2cSJim Jagielski */ 49*b1cdbd2cSJim Jagielski interface ::com::sun::star::util::XCloneable; 50*b1cdbd2cSJim Jagielski 51*b1cdbd2cSJim Jagielski /** specifies an identifier of the column 52*b1cdbd2cSJim Jagielski 53*b1cdbd2cSJim Jagielski <p>This identifier will not be evaluated by the grid control, or its model. It is merely for clients 54*b1cdbd2cSJim Jagielski to identify particular columns.</p> 55*b1cdbd2cSJim Jagielski */ 56*b1cdbd2cSJim Jagielski [attribute] any Identifier; 57*b1cdbd2cSJim Jagielski 58*b1cdbd2cSJim Jagielski /** specifies the current width of the column. 59*b1cdbd2cSJim Jagielski */ 60*b1cdbd2cSJim Jagielski [attribute] long ColumnWidth; 61*b1cdbd2cSJim Jagielski 62*b1cdbd2cSJim Jagielski /** specifies the minimal width the column can have. 63*b1cdbd2cSJim Jagielski */ 64*b1cdbd2cSJim Jagielski [attribute] long MinWidth; 65*b1cdbd2cSJim Jagielski 66*b1cdbd2cSJim Jagielski /** specifies the maximal width the column can have. 67*b1cdbd2cSJim Jagielski */ 68*b1cdbd2cSJim Jagielski [attribute] long MaxWidth; 69*b1cdbd2cSJim Jagielski 70*b1cdbd2cSJim Jagielski /** controls whether or not the column's width is fixed or not. 71*b1cdbd2cSJim Jagielski 72*b1cdbd2cSJim Jagielski <p>If this is <TRUE/>, the user can interactively change the column's width. Also, the column is subject to 73*b1cdbd2cSJim Jagielski auto-resizing, if its <member>Flexibility</member> attribute is greater <code>0</code>.</p> 74*b1cdbd2cSJim Jagielski */ 75*b1cdbd2cSJim Jagielski [attribute] boolean Resizeable; 76*b1cdbd2cSJim Jagielski 77*b1cdbd2cSJim Jagielski /** specifies the flexibility of the column when it is automatically resized due to the grid control as a whole 78*b1cdbd2cSJim Jagielski being resized. 79*b1cdbd2cSJim Jagielski 80*b1cdbd2cSJim Jagielski <p>Specify <code>0</code> here if you do not want the column to be resized automatically.</p> 81*b1cdbd2cSJim Jagielski 82*b1cdbd2cSJim Jagielski <p>If a column has a flexibility greater than 0, it is set in relationship to the flexibility of all 83*b1cdbd2cSJim Jagielski other such columns, and the respective widths of the columns are changed in the same relationship.</p> 84*b1cdbd2cSJim Jagielski 85*b1cdbd2cSJim Jagielski <p>Note that a column's flexibility is ignored if its <member>Resizeable</member> attribute is 86*b1cdbd2cSJim Jagielski <FALSE/>.</p> 87*b1cdbd2cSJim Jagielski 88*b1cdbd2cSJim Jagielski <p>A column's flexibility cannot be negative, attempts to set a negative value will raise an exception.</p> 89*b1cdbd2cSJim Jagielski */ 90*b1cdbd2cSJim Jagielski [attribute] long Flexibility 91*b1cdbd2cSJim Jagielski { 92*b1cdbd2cSJim Jagielski set raises ( ::com::sun::star::lang::IllegalArgumentException ); 93*b1cdbd2cSJim Jagielski }; 94*b1cdbd2cSJim Jagielski 95*b1cdbd2cSJim Jagielski /** Specifies the horizontal alignment of the content in the control. 96*b1cdbd2cSJim Jagielski */ 97*b1cdbd2cSJim Jagielski [attribute] ::com::sun::star::style::HorizontalAlignment HorizontalAlign; 98*b1cdbd2cSJim Jagielski 99*b1cdbd2cSJim Jagielski /** A title is displayed in the colum header row if <method>UnoControlGridModel::ShowColumnHeader</method> is set to <true/>**/ 100*b1cdbd2cSJim Jagielski [attribute] string Title; 101*b1cdbd2cSJim Jagielski 102*b1cdbd2cSJim Jagielski /** is the help text associated with the column. 103*b1cdbd2cSJim Jagielski 104*b1cdbd2cSJim Jagielski <p>A grid control will usually display a column's help text as tooltip.</p> 105*b1cdbd2cSJim Jagielski */ 106*b1cdbd2cSJim Jagielski [attribute] string HelpText; 107*b1cdbd2cSJim Jagielski 108*b1cdbd2cSJim Jagielski /** denotes the index of the column within the grid column model it belongs to 109*b1cdbd2cSJim Jagielski 110*b1cdbd2cSJim Jagielski <p>If the column is not yet part of a column model, <code>Index</code> is -1.</p> 111*b1cdbd2cSJim Jagielski */ 112*b1cdbd2cSJim Jagielski [attribute, readonly] long Index; 113*b1cdbd2cSJim Jagielski 114*b1cdbd2cSJim Jagielski /** denotes the index of the data column which should be used to fetch this grid column's data 115*b1cdbd2cSJim Jagielski 116*b1cdbd2cSJim Jagielski <p>A grid control has a column model and a data model, both containing a possibly different number of columns. 117*b1cdbd2cSJim Jagielski The <code>DataColumnIndex</code> attribute defines the index of the column within the data model, which should 118*b1cdbd2cSJim Jagielski be used to retrieve actual data.</p> 119*b1cdbd2cSJim Jagielski 120*b1cdbd2cSJim Jagielski <p>Using this, you can do runtime changes to the column model, i.e. insertion and removal of columns, without 121*b1cdbd2cSJim Jagielski necessarily needing to adjust the data model, too.</p> 122*b1cdbd2cSJim Jagielski 123*b1cdbd2cSJim Jagielski <p>If <code>DataColumnIndex</code> is negative, the it will be ignored, then the column's index within its 124*b1cdbd2cSJim Jagielski column model, as determined by the <member>Index</member> attribute, will be used.</p> 125*b1cdbd2cSJim Jagielski */ 126*b1cdbd2cSJim Jagielski [attribute] long DataColumnIndex; 127*b1cdbd2cSJim Jagielski 128*b1cdbd2cSJim Jagielski /** Adds a listener for the <type>GridColumnEvent</type> posted after the grid changes. 129*b1cdbd2cSJim Jagielski @param Listener 130*b1cdbd2cSJim Jagielski the listener to add. 131*b1cdbd2cSJim Jagielski */ 132*b1cdbd2cSJim Jagielski void addGridColumnListener( [in] XGridColumnListener listener); 133*b1cdbd2cSJim Jagielski 134*b1cdbd2cSJim Jagielski //------------------------------------------------------------------------- 135*b1cdbd2cSJim Jagielski 136*b1cdbd2cSJim Jagielski /** Removes a listener previously added with <method>addColumnListener()</method>. 137*b1cdbd2cSJim Jagielski @param Listener 138*b1cdbd2cSJim Jagielski the listener to remove. 139*b1cdbd2cSJim Jagielski */ 140*b1cdbd2cSJim Jagielski void removeGridColumnListener( [in] XGridColumnListener listener); 141*b1cdbd2cSJim Jagielski}; 142*b1cdbd2cSJim Jagielski 143*b1cdbd2cSJim Jagielski//============================================================================= 144*b1cdbd2cSJim Jagielski 145*b1cdbd2cSJim Jagielski}; }; }; }; }; 146*b1cdbd2cSJim Jagielski 147*b1cdbd2cSJim Jagielski#endif 148