1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_awt_XListBox_idl__ 24#define __com_sun_star_awt_XListBox_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30#ifndef __com_sun_star_awt_XItemListener_idl__ 31#include <com/sun/star/awt/XItemListener.idl> 32#endif 33 34#ifndef __com_sun_star_awt_XActionListener_idl__ 35#include <com/sun/star/awt/XActionListener.idl> 36#endif 37 38 39//============================================================================= 40 41 module com { module sun { module star { module awt { 42 43//============================================================================= 44 45/** gives access to the items of a list box and makes it possible to 46 register item and action event listeners. 47 */ 48published interface XListBox: com::sun::star::uno::XInterface 49{ 50 //------------------------------------------------------------------------- 51 52 /** registers a listener for item events. 53 */ 54 [oneway] void addItemListener( [in] com::sun::star::awt::XItemListener l ); 55 56 //------------------------------------------------------------------------- 57 58 /** unregisters a listener for item events. 59 */ 60 [oneway] void removeItemListener( [in] com::sun::star::awt::XItemListener l ); 61 62 //------------------------------------------------------------------------- 63 64 /** registers a listener for action events. 65 */ 66 [oneway] void addActionListener( [in] com::sun::star::awt::XActionListener l ); 67 68 //------------------------------------------------------------------------- 69 70 /** unregisters a listener for action events. 71 */ 72 [oneway] void removeActionListener( [in] com::sun::star::awt::XActionListener l ); 73 74 //------------------------------------------------------------------------- 75 76 /** adds an item at the specified position. 77 */ 78 [oneway] void addItem( [in] string aItem, 79 [in] short nPos ); 80 81 //------------------------------------------------------------------------- 82 83 /** adds multiple items at the specified position. 84 */ 85 [oneway] void addItems( [in] sequence<string> aItems, 86 [in] short nPos ); 87 88 //------------------------------------------------------------------------- 89 90 /** removes a number of items at the specified position. 91 */ 92 [oneway] void removeItems( [in] short nPos, 93 [in] short nCount ); 94 95 //------------------------------------------------------------------------- 96 97 /** returns the number of items in the listbox. 98 */ 99 short getItemCount(); 100 101 //------------------------------------------------------------------------- 102 103 /** returns the item at the specified position. 104 */ 105 string getItem( [in] short nPos ); 106 107 //------------------------------------------------------------------------- 108 109 /** returns all items of the list box. 110 */ 111 sequence<string> getItems(); 112 113 //------------------------------------------------------------------------- 114 115 /** returns the position of the currently selected item. 116 */ 117 short getSelectedItemPos(); 118 119 //------------------------------------------------------------------------- 120 121 /** returns the positions of all currently selected items. 122 */ 123 sequence<short> getSelectedItemsPos(); 124 125 //------------------------------------------------------------------------- 126 127 /** returns the currently selected item. 128 */ 129 string getSelectedItem(); 130 131 //------------------------------------------------------------------------- 132 133 /** returns all currently selected items. 134 */ 135 sequence<string> getSelectedItems(); 136 137 //------------------------------------------------------------------------- 138 139 /** selects/deselects the item at the specified position. 140 */ 141 [oneway] void selectItemPos( [in] short nPos, 142 [in] boolean bSelect ); 143 144 //------------------------------------------------------------------------- 145 146 /** selects/deselects multiple items at the specified positions. 147 */ 148 [oneway] void selectItemsPos( [in] sequence<short> aPositions, 149 [in] boolean bSelect ); 150 151 //------------------------------------------------------------------------- 152 153 /** selects/deselects the specified item. 154 */ 155 [oneway] void selectItem( [in] string aItem, 156 [in] boolean bSelect ); 157 158 //------------------------------------------------------------------------- 159 160 /** returns <true/> if multiple items can be selected, 161 <false/> if only one item can be selected. 162 */ 163 boolean isMutipleMode(); 164 165 //------------------------------------------------------------------------- 166 167 /** determines if only a single item or multiple items can be selected. 168 */ 169 [oneway] void setMultipleMode( [in] boolean bMulti ); 170 171 //------------------------------------------------------------------------- 172 173 /** returns the number of visible lines in drop down mode. 174 */ 175 short getDropDownLineCount(); 176 177 //------------------------------------------------------------------------- 178 179 /** sets the number of visible lines for drop down mode. 180 */ 181 [oneway] void setDropDownLineCount( [in] short nLines ); 182 183 //------------------------------------------------------------------------- 184 185 /** makes the item at the specified position visible by scrolling. 186 */ 187 [oneway] void makeVisible( [in] short nEntry ); 188 189}; 190 191//============================================================================= 192 193}; }; }; }; 194 195#endif 196