1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XListBox.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_awt_grid_XGridColumnModel_idl__
31 #define __com_sun_star_awt_grid_XGridColumnModel_idl__
33 #include
<com
/sun
/star
/uno
/XInterface.idl
>
35 #include
<com
/sun
/star
/awt
/grid
/XGridColumn.idl
>
36 #include
<com
/sun
/star
/awt
/grid
/XGridColumnListener.idl
>
38 //=============================================================================
40 module com
{ module sun
{ module star
{ module awt
{ module grid
{
42 //=============================================================================
44 /** An instance of this interface is used by the <type>UnoControlGrid</type> to
45 retrieve the column structure that is displayed in the actual control.
47 If you do not need your own model implementation, you can also use the <type>DefaultGridColumnModel</type>.
49 interface XGridColumnModel
: com
::sun
::star
::uno
::XInterface
51 /** Specifies whether column selection is allowed
53 [attribute
] boolean ColumnSelectionAllowed
;
55 /** Returns the number of columns.
57 the number of columns.
59 long getColumnCount
();
61 /** Adds a column to the model.
63 the column to add to the model.
66 the index of new created column.
68 long addColumn
( [in] XGridColumn column
);
71 long getSelectedCount();
73 sequence<XGridColumn> getSelectedColumns();
75 sequence<long> getSelectedIndex();
79 /** Returns all columns of the model.
81 all columns associated with the model in a sequence of <type>XGridColumn</type>.
83 sequence
<XGridColumn
> getColumns
();
85 /** Returns a specific column.
87 the position of the reuquested column.
91 XGridColumn getColumn
( [in] long index
);
94 long getTotalColumnWidth();
97 /** Adds a listener for the <type>GridColumnEvent</type> posted after the grid changes.
101 [oneway
] void addColumnListener
( [in] XGridColumnListener listener
);
103 //-------------------------------------------------------------------------
105 /** Removes a listener previously added with <method>addColumnListener()</method>.
107 the listener to remove.
109 [oneway
] void removeColumnListener
( [in] XGridColumnListener listener
);
112 //=============================================================================