Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / awt / XSimpleTabController.idl
blobce316c096690c7713387f84494875ba3ed8cdd80
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XSimpleTabController.idl,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_awt_XSimpleTabController_idl__
31 #define __com_sun_star_awt_XSimpleTabController_idl__
33 #ifndef __com_sun_star_awt_XTabListener_idl__
34 #include <com/sun/star/awt/XTabListener.idl>
35 #endif
37 #ifndef __com_sun_star_uno_XInterface_idl__
38 #include <com/sun/star/uno/XInterface.idl>
39 #endif
41 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
42 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
43 #endif
45 #ifndef __com_sun_star_beans_NamedValue_idl__
46 #include <com/sun/star/beans/NamedValue.idl>
47 #endif
49 //=============================================================================
51 module com { module sun { module star { module awt {
53 //=============================================================================
55 /** specifies the basic operations for a tab controller,
56 but does not require XControl as type of tabs.
58 interface XSimpleTabController : com::sun::star::uno::XInterface
60 //-------------------------------------------------------------------------
61 /** create a new tab and return an unique ID,
62 which can be used further to adress this tab by using other methods
63 of this interface.
65 @return [long
66 an unique ID for this new tab.
68 long insertTab();
70 //-------------------------------------------------------------------------
71 /** remove a tab with the given ID.
73 @param ID
74 the ID of the tab, which should be removed.
76 @throws ::com::sun::star::lang::IndexOutOfBoundsException
77 if the specified ID isnt used inside this tab controller.
79 void removeTab( [in] long ID )
80 raises( com::sun::star::lang::IndexOutOfBoundsException );
82 //-------------------------------------------------------------------------
83 /** change some properties of the specified tab.
85 @descr Such properties can be:
86 <table>
87 <tr>
88 <td><b>Property</b></td>
89 <td><b>Type</b></td>
90 <td><b>Description</b></td>
91 </tr>
92 <tr>
93 <td>Title</td>
94 <td>string</td>
95 <td>the title of the tab, which is shown at the UI.</td>
96 </tr>
97 <tr>
98 <td>Position</td>
99 <td>int</td>
100 <td>describe the order of this tab in relation to all other tabs inside this control.</td>
101 </tr>
102 </table>
104 @attention Not all properties must be supported by all implementations of this interface.
105 Of course some important ones should be handled by every implementation ...
106 as e.g. "Title".
108 @param ID
109 the ID of the tab, which should be changed.
111 @throws ::com::sun::star::lang::IndexOutOfBoundsException
112 if the specified ID isnt used inside this tab controller.
114 void setTabProps( [in] long ID ,
115 [in] sequence< com::sun::star::beans::NamedValue > Properties )
116 raises( com::sun::star::lang::IndexOutOfBoundsException );
118 //-------------------------------------------------------------------------
119 /** retrieve the set of properties for the specified tab.
121 @param ID
122 the ID of the tab.
124 @throws ::com::sun::star::lang::IndexOutOfBoundsException
125 if the specified ID isnt used inside this tab controller.
127 sequence< com::sun::star::beans::NamedValue > getTabProps( [in] long ID )
128 raises( com::sun::star::lang::IndexOutOfBoundsException );
130 //-------------------------------------------------------------------------
131 /** activate the specified tab.
133 @descr The new tab will be activated and all listener will get an event describing this.
134 Of course there will be an event too, which notify's listener about the deactivation
135 of the last active tab.
137 @param ID
138 the ID of the new active tab.
140 @throws ::com::sun::star::lang::IndexOutOfBoundsException
141 if the specified ID isnt used inside this tab controller.
143 void activateTab( [in] long ID )
144 raises( com::sun::star::lang::IndexOutOfBoundsException );
146 //-------------------------------------------------------------------------
147 /** return the unique ID of the current active tab.
149 @eturn [long]
150 the ID of the active tab.
152 long getActiveTabID();
154 //-------------------------------------------------------------------------
155 /** register listener for inserting/removing tab's and changing her properties.
157 @param Listener
158 the listener for registration.
160 void addTabListener( [in] XTabListener Listener );
162 //-------------------------------------------------------------------------
163 /** deregister listener for inserting/removing tab's and changing her properties.
165 @param Listener
166 the listener for deregistration.
168 void removeTabListener( [in] XTabListener Listener );
171 //=============================================================================
173 }; }; }; };
175 #endif