xref: /aoo42x/main/offapi/com/sun/star/awt/XComboBox.idl (revision d1766043)
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_XComboBox_idl__
24#define __com_sun_star_awt_XComboBox_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 combo box and makes it possible to
46	register item and action event listeners.
47 */
48published interface XComboBox: 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, [in] short nPos );
79
80	//-------------------------------------------------------------------------
81
82	/** adds multiple items at the specified position.
83	 */
84	[oneway] void addItems( [in] sequence<string> aItems, [in] short nPos );
85
86	//-------------------------------------------------------------------------
87
88	/** removes a number of items at the specified position.
89	 */
90	[oneway] void removeItems( [in] short nPos, [in] short nCount );
91
92	//-------------------------------------------------------------------------
93
94	/** returns the number of items in the combo box.
95	 */
96	short getItemCount();
97
98	//-------------------------------------------------------------------------
99
100	/** returns the item at the specified position.
101	 */
102	string getItem( [in] short nPos );
103
104	//-------------------------------------------------------------------------
105
106	/** returns all items of the combo box.
107	 */
108	sequence<string> getItems();
109
110	//-------------------------------------------------------------------------
111
112	/** returns the number of visible lines in the drop down mode.
113	 */
114	short getDropDownLineCount();
115
116	//-------------------------------------------------------------------------
117
118	/** sets the number of visible lines for drop down mode.
119	 */
120	[oneway] void setDropDownLineCount( [in] short nLines );
121
122};
123
124//=============================================================================
125
126}; }; }; };
127
128#endif
129