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