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