tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / offapi / com / sun / star / awt / XItemList.idl
blob19c3cb127655b5f2e0732a108b23acb154698647
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com { module sun { module star { module awt {
23 interface XItemListListener;
26 /** provides convenient access to the list of items in a list box
28 interface XItemList
30 /** is the number of items in the list
32 [attribute, readonly] long ItemCount;
34 /** inserts a new item into the list
36 @param Position
37 the position at which the item should be inserted. Must be greater or equal to 0, and
38 lesser than or equal to #ItemCount.
40 @param ItemText
41 the text of the item to be inserted.
43 @param ItemImageURL
44 the URL of the image to display for the item
46 @throws ::com::sun::star::lang::IndexOutOfBoundsException
47 if <code>Position</code> is invalid.
49 void insertItem(
50 [in] long Position,
51 [in] string ItemText,
52 [in] string ItemImageURL
54 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
56 /** inserts an item which has only a text, but no image
58 @param Position
59 the position at which the item should be inserted. Must be greater or equal to 0, and
60 lesser than or equal to #ItemCount.
62 @param ItemText
63 the text of the item to be inserted.
65 @throws ::com::sun::star::lang::IndexOutOfBoundsException
66 if <code>Position</code> is invalid.
68 void insertItemText(
69 [in] long Position,
70 [in] string ItemText
72 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
74 /** inserts an item which has only an image, but no text
76 @param Position
77 the position at which the item should be inserted. Must be greater or equal to 0, and
78 lesser than or equal to #ItemCount.
80 @param ItemImageURL
81 the URL of the image to display for the item
83 @throws ::com::sun::star::lang::IndexOutOfBoundsException
84 if <code>Position</code> is invalid.
86 void insertItemImage(
87 [in] long Position,
88 [in] string ItemImageURL
90 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
92 /** removes an item from the list
94 @param Position
95 the position of the item which should be removed. Must be greater or equal to 0, and
96 lesser than #ItemCount.
98 @throws ::com::sun::star::lang::IndexOutOfBoundsException
99 if <code>Position</code> is invalid.
101 void removeItem(
102 [in] long Position
104 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
106 /** removes all items from the list
108 void removeAllItems();
110 /** sets a new text for an existing item
112 @param Position
113 the position of the item whose text is to be changed. Must be greater or equal to 0, and
114 lesser than #ItemCount.
116 @param ItemText
117 the new text of the item
119 @throws ::com::sun::star::lang::IndexOutOfBoundsException
120 if <code>Position</code> is invalid.
122 void setItemText(
123 [in] long Position,
124 [in] string ItemText
126 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
128 /** sets a new image for an existing item
130 @param Position
131 the position of the item whose image is to be changed. Must be greater or equal to 0, and
132 lesser than #ItemCount.
134 @param ItemImageURL
135 the new URL of the image to display for the item
137 @throws ::com::sun::star::lang::IndexOutOfBoundsException
138 if <code>Position</code> is invalid.
140 void setItemImage(
141 [in] long Position,
142 [in] string ItemImageURL
144 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
146 /** sets both a new position and text for an existing item
148 @param Position
149 the position of the item whose text and image is to be changed. Must be greater or equal to 0, and
150 lesser than #ItemCount.
152 @param ItemText
153 the new text of the item
155 @param ItemImageURL
156 the new URL of the image to display for the item
158 @throws ::com::sun::star::lang::IndexOutOfBoundsException
159 if <code>Position</code> is invalid.
161 void setItemTextAndImage(
162 [in] long Position,
163 [in] string ItemText,
164 [in] string ItemImageURL
166 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
168 /** associates an implementation dependent value with the given list item.
170 <p>You can use this to store data for an item which does not interfere with the displayed
171 text and image, but can be used by the client of the list box for an arbitrary purpose.</p>
173 @param Position
174 the position of the item whose data value should be set. Must be greater or equal to 0, and
175 lesser than #ItemCount.
177 @param ItemData
178 the data to associate with the list item
180 @throws ::com::sun::star::lang::IndexOutOfBoundsException
181 if <code>Position</code> is invalid.
183 @see getItemData
185 void setItemData(
186 [in] long Position,
187 [in] any ItemData
189 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
191 /** retrieves the text of an existing item
193 @param Position
194 the position of the item whose text should be retrieved. Must be greater or equal to 0, and
195 lesser than #ItemCount.
197 @throws ::com::sun::star::lang::IndexOutOfBoundsException
198 if <code>Position</code> is invalid.
200 string getItemText(
201 [in] long Position
203 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
205 /** retrieves the URL of the image of an existing item
207 @param Position
208 the position of the item whose image should be retrieved. Must be greater or equal to 0, and
209 lesser than #ItemCount.
211 @throws ::com::sun::star::lang::IndexOutOfBoundsException
212 if <code>Position</code> is invalid.
214 string getItemImage(
215 [in] long Position
217 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
219 /** retrieves both the text and the image URL of an existing item
221 @param Position
222 the position of the item whose text and image should be retrieved. Must be greater or equal to 0, and
223 lesser than #ItemCount.
225 @throws ::com::sun::star::lang::IndexOutOfBoundsException
226 if <code>Position</code> is invalid.
228 ::com::sun::star::beans::Pair< string, string >
229 getItemTextAndImage(
230 [in] long Position
232 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
234 /** retrieves the implementation dependent value associated with the given list item.
235 @param Position
236 the position of the item whose data value should be retrieved. Must be greater or equal to 0, and
237 lesser than #ItemCount.
239 @throws ::com::sun::star::lang::IndexOutOfBoundsException
240 if <code>Position</code> is invalid.
242 @see setItemData
244 any getItemData(
245 [in] long Position
247 raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
249 /** retrieves the texts and images of all items in the list
251 sequence< ::com::sun::star::beans::Pair< string, string > >
252 getAllItems();
254 /** registers a listener which is notified about changes in the item list.
256 void addItemListListener( [in] XItemListListener Listener );
258 /** revokes a listener which is notified about changes in the item list.
260 void removeItemListListener( [in] XItemListListener Listener );
264 }; }; }; };
267 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */