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_XListBox_idl__
29 #define __com_sun_star_awt_XListBox_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
33 #include
<com
/sun
/star
/awt
/XItemListener.idl
>
35 #include
<com
/sun
/star
/awt
/XActionListener.idl
>
38 //=============================================================================
40 module com
{ module sun
{ module star
{ module awt
{
42 //=============================================================================
44 /** gives access to the items of a list box and makes it possible to
45 register item and action event listeners.
47 published
interface XListBox
: com
::sun
::star
::uno
::XInterface
49 //-------------------------------------------------------------------------
51 /** registers a listener for item events.
53 [oneway
] void addItemListener
( [in] com
::sun
::star
::awt
::XItemListener l
);
55 //-------------------------------------------------------------------------
57 /** unregisters a listener for item events.
59 [oneway
] void removeItemListener
( [in] com
::sun
::star
::awt
::XItemListener l
);
61 //-------------------------------------------------------------------------
63 /** registers a listener for action events.
65 [oneway
] void addActionListener
( [in] com
::sun
::star
::awt
::XActionListener l
);
67 //-------------------------------------------------------------------------
69 /** unregisters a listener for action events.
71 [oneway
] void removeActionListener
( [in] com
::sun
::star
::awt
::XActionListener l
);
73 //-------------------------------------------------------------------------
75 /** adds an item at the specified position.
77 [oneway
] void addItem
( [in] string aItem
,
80 //-------------------------------------------------------------------------
82 /** adds multiple items at the specified position.
84 [oneway
] void addItems
( [in] sequence
<string> aItems
,
87 //-------------------------------------------------------------------------
89 /** removes a number of items at the specified position.
91 [oneway
] void removeItems
( [in] short nPos
,
94 //-------------------------------------------------------------------------
96 /** returns the number of items in the listbox.
100 //-------------------------------------------------------------------------
102 /** returns the item at the specified position.
104 string getItem
( [in] short nPos
);
106 //-------------------------------------------------------------------------
108 /** returns all items of the list box.
110 sequence
<string> getItems
();
112 //-------------------------------------------------------------------------
114 /** returns the position of the currently selected item.
116 short getSelectedItemPos
();
118 //-------------------------------------------------------------------------
120 /** returns the positions of all currently selected items.
122 sequence
<short> getSelectedItemsPos
();
124 //-------------------------------------------------------------------------
126 /** returns the currently selected item.
128 string getSelectedItem
();
130 //-------------------------------------------------------------------------
132 /** returns all currently selected items.
134 sequence
<string> getSelectedItems
();
136 //-------------------------------------------------------------------------
138 /** selects/deselects the item at the specified position.
140 [oneway
] void selectItemPos
( [in] short nPos
,
141 [in] boolean bSelect
);
143 //-------------------------------------------------------------------------
145 /** selects/deselects multiple items at the specified positions.
147 [oneway
] void selectItemsPos
( [in] sequence
<short> aPositions
,
148 [in] boolean bSelect
);
150 //-------------------------------------------------------------------------
152 /** selects/deselects the specified item.
154 [oneway
] void selectItem
( [in] string aItem
,
155 [in] boolean bSelect
);
157 //-------------------------------------------------------------------------
159 /** returns <true/> if multiple items can be selected,
160 <false/> if only one item can be selected.
162 boolean isMutipleMode
();
164 //-------------------------------------------------------------------------
166 /** determines if only a single item or multiple items can be selected.
168 [oneway
] void setMultipleMode
( [in] boolean bMulti
);
170 //-------------------------------------------------------------------------
172 /** returns the number of visible lines in drop down mode.
174 short getDropDownLineCount
();
176 //-------------------------------------------------------------------------
178 /** sets the number of visible lines for drop down mode.
180 [oneway
] void setDropDownLineCount
( [in] short nLines
);
182 //-------------------------------------------------------------------------
184 /** makes the item at the specified position visible by scrolling.
186 [oneway
] void makeVisible
( [in] short nEntry
);
190 //=============================================================================
196 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */