tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / offapi / com / sun / star / awt / XListBox.idl
blob8430cfd9d28637f6849b0dac911bfab1308d9bc6
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 .
22 module com { module sun { module star { module awt {
25 /** gives access to the items of a list box and makes it possible to
26 register item and action event listeners.
28 published interface XListBox: com::sun::star::uno::XInterface
31 /** registers a listener for item events.
33 void addItemListener( [in] com::sun::star::awt::XItemListener l );
36 /** unregisters a listener for item events.
38 void removeItemListener( [in] com::sun::star::awt::XItemListener l );
41 /** registers a listener for action events.
43 void addActionListener( [in] com::sun::star::awt::XActionListener l );
46 /** unregisters a listener for action events.
48 void removeActionListener( [in] com::sun::star::awt::XActionListener l );
51 /** adds an item at the specified position.
53 void addItem( [in] string aItem,
54 [in] short nPos );
57 /** adds multiple items at the specified position.
59 void addItems( [in] sequence<string> aItems,
60 [in] short nPos );
63 /** removes a number of items at the specified position.
65 void removeItems( [in] short nPos,
66 [in] short nCount );
69 /** returns the number of items in the listbox.
71 short getItemCount();
74 /** returns the item at the specified position.
76 string getItem( [in] short nPos );
79 /** returns all items of the list box.
81 sequence<string> getItems();
84 /** returns the position of the currently selected item.
85 When multiple items are selected, the position of the first one is returned.
86 When nothing is selected, -1 is returned.
88 short getSelectedItemPos();
91 /** returns the positions of all currently selected items.
93 sequence<short> getSelectedItemsPos();
96 /** returns the currently selected item.
97 When multiple items are selected, the first one is returned.
98 When nothing is selected, an empty string is returned.
100 string getSelectedItem();
103 /** returns all currently selected items.
105 sequence<string> getSelectedItems();
108 /** selects/deselects the item at the specified position.
110 void selectItemPos( [in] short nPos,
111 [in] boolean bSelect );
114 /** selects/deselects multiple items at the specified positions.
116 void selectItemsPos( [in] sequence<short> aPositions,
117 [in] boolean bSelect );
120 /** selects/deselects the specified item.
122 void selectItem( [in] string aItem,
123 [in] boolean bSelect );
126 /** returns `TRUE` if multiple items can be selected,
127 `FALSE` if only one item can be selected.
129 boolean isMutipleMode();
132 /** determines if only a single item or multiple items can be selected.
134 void setMultipleMode( [in] boolean bMulti );
137 /** returns the number of visible lines in drop down mode.
139 short getDropDownLineCount();
142 /** sets the number of visible lines for drop down mode.
144 void setDropDownLineCount( [in] short nLines );
147 /** makes the item at the specified position visible by scrolling.
149 void makeVisible( [in] short nEntry );
154 }; }; }; };
156 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */