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
24#ifndef __com_sun_star_drawing_framework_XTabBar_idl__
25#define __com_sun_star_drawing_framework_XTabBar_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30#ifndef __com_sun_star_awt_XWindow_idl__
31#include <com/sun/star/awt/XWindow.idl>
32#endif
33#ifndef __com_sun_star_drawing_framework_TabBarButton_idl__
34#include <com/sun/star/drawing/framework/TabBarButton.idl>
35#endif
36
37module com { module sun { module star { module drawing { module framework {
38
39/** UI control for the selection of views in a pane.
40    <p>Every tab of a tab bar has, besides its localized title and help
41    text, the URL of a view.  A possible alternative would be to use a
42    command URL instead of the view URL.</p>
43    <p>In the current Impress implementation a tab bar is only used for the
44    center pane to switch between views in the center pane.  Tab bars can
45    make sense for other panes as well, i.e. for showing either the slide
46    sorter or the outline view in the left pane.</p>
47    <p>Tab bar buttons are identified by their resource id.  Note that
48    because the resource anchors are all the same (the tab bar), it is the
49    resource URL that really identifies a button. There can not be two
50    buttons with the same resource id.</p>
51    </p>
52    <p>A better place for this interface (in an extended version) would be
53    <code>com::sun::star::awt</code></p>
54    @see TabBarButton
55*/
56interface XTabBar
57{
58    /** Add a tab bar button to the right of another one.
59        @param aButton
60            The new tab bar button that is to be inserted.  If a button with
61            the same resource id is already present than that is removed before the
62            new button is inserted.
63        @param aAnchor
64            The new button is inserted to the right of this button.  When
65            its ResourceId is empty then the new button is inserted at the left
66            most position.
67    */
68    void addTabBarButtonAfter ([in] TabBarButton aButton, [in] TabBarButton aAnchor);
69
70    /** Add a tab bar button at the right most position.
71        @param aButton
72            The new tab bar button that is to be inserted.
73    */
74    void appendTabBarButton ([in] TabBarButton aButton);
75
76    /** Remove a tab bar button.
77        @param aButton
78            The tab bar button to remove.  When there is no button with the
79            specified resource id then this call is silently ignored.
80    */
81    void removeTabBarButton ([in] TabBarButton aButton);
82
83    /** Test whether the specified button exists in the tab bar.
84        @param aButton
85            The tab bar button whose existence is tested.
86        @return
87            Returns <TRUE/> when the button exists.
88    */
89    boolean hasTabBarButton ([in] TabBarButton aButton);
90
91    /** Return a sequence of all the tab bar buttons.
92        <p>Their order reflects the visible order in the tab bar.</p>
93        <p>This method can be used when
94        <member>addTabBarButtonAfter()</member> does not provide enough
95        control as to where to insert a new button.</p>
96    */
97    sequence<TabBarButton> getTabBarButtons ();
98};
99
100}; }; }; }; }; // ::com::sun::star::drawing::framework
101
102#endif
103