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
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_awt_XItemList_idl__
#define __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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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 #ItemCount.
@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.
@param Position
the position of the item whose data value should be retrieved. Must be greater or equal to 0, and
lesser than #ItemCount.
@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
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|