1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __offapi_com_sun_star_awt_XItemList_idl__
#define __offapi_com_sun_star_awt_XItemList_idl__
#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
#include <com/sun/star/beans/Pair.idl>
//==================================================================================================================
module com { module sun { module star { module awt {
interface XItemListListener;
//==================================================================================================================
/** provides convenient access to the list of items in a list box
*/
interface XItemList
{
/** is the number of items in the list
*/
[attribute, readonly] long ItemCount;
/** inserts a new item into the list
@param Position
the position at which the item should be inserted. Must be greater or equal to 0, and
lesser than or equal to <member>ItemCount</member>.
@param ItemText
the text of the item to be inserted.
@param ItemImageURL
the URL of the image to display for the item
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
void insertItem(
[in] long Position,
[in] string ItemText,
[in] string ItemImageURL
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** inserts an item which has only a text, but no image
@param Position
the position at which the item should be inserted. Must be greater or equal to 0, and
lesser than or equal to <member>ItemCount</member>.
@param ItemText
the text of the item to be inserted.
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
void insertItemText(
[in] long Position,
[in] string ItemText
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** inserts an item which has only an image, but no text
@param Position
the position at which the item should be inserted. Must be greater or equal to 0, and
lesser than or equal to <member>ItemCount</member>.
@param ItemImageURL
the URL of the image to display for the item
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
void insertItemImage(
[in] long Position,
[in] string ItemImageURL
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** removes an item from the list
@param Position
the position of the item which should be removed. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
void removeItem(
[in] long Position
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** removes all items from the list
*/
void removeAllItems();
/** sets a new text for an existing item
@param Position
the position of the item whose text is to be changed. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@param ItemText
the new text of the item
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
void setItemText(
[in] long Position,
[in] string ItemText
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** sets a new image for an existing item
@param Position
the position of the item whose image is to be changed. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@param ItemImageURL
the new URL of the image to display for the item
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
void setItemImage(
[in] long Position,
[in] string ItemImageURL
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** sets both a new position and text for an existing item
@param Position
the position of the item whose text and image is to be changed. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@param ItemText
the new text of the item
@param ItemImageURL
the new URL of the image to display for the item
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
void setItemTextAndImage(
[in] long Position,
[in] string ItemText,
[in] string ItemImageURL
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** associates an implementation dependent value with the given list item.
<p>You can use this to store data for an item which does not interfere with the displayed
text and image, but can be used by the client of the list box for an arbitrary purpose.</p>
@param Position
the position of the item whose data value should be set. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@param ItemData
the data to associate with the list item
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
@see getItemData
*/
void setItemData(
[in] long Position,
[in] any ItemData
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** retrieves the text of an existing item
@param Position
the position of the item whose text should be retrieved. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
string getItemText(
[in] long Position
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** retrieves the URL of the image of an existing item
@param Position
the position of the item whose image should be retrieved. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
string getItemImage(
[in] long Position
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** retrieves both the text and the image URL of an existing item
@param Position
the position of the item whose text and image should be retrieved. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
*/
::com::sun::star::beans::Pair< string, string >
getItemTextAndImage(
[in] long Position
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** retrieves the implementation dependent value associated with the given list item.
@see setItemData
@param Position
the position of the item whose data value should be retrieved. Must be greater or equal to 0, and
lesser than <member>ItemCount</member>.
@throws ::com::sun::star::lang::IndexOutOfBoundsException
if <code>Position</code> is invalid.
@see setItemData
*/
any getItemData(
[in] long Position
)
raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
/** retrieves the texts and images of all items in the list
*/
sequence< ::com::sun::star::beans::Pair< string, string > >
getAllItems();
/** registers a listener which is notified about changes in the item list.
*/
void addItemListListener( [in] XItemListListener Listener );
/** revokes a listener which is notified about changes in the item list.
*/
void removeItemListListener( [in] XItemListListener Listener );
};
//==================================================================================================================
}; }; }; };
//==================================================================================================================
#endif
|