1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_drawing_framework_XTabBar_idl__
25cdf0e10cSrcweir#define __com_sun_star_drawing_framework_XTabBar_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
28cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir#ifndef __com_sun_star_awt_XWindow_idl__
31cdf0e10cSrcweir#include <com/sun/star/awt/XWindow.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir#ifndef __com_sun_star_drawing_framework_TabBarButton_idl__
34cdf0e10cSrcweir#include <com/sun/star/drawing/framework/TabBarButton.idl>
35cdf0e10cSrcweir#endif
36cdf0e10cSrcweir
37cdf0e10cSrcweirmodule com { module sun { module star { module drawing { module framework {
38cdf0e10cSrcweir
39cdf0e10cSrcweir/** UI control for the selection of views in a pane.
40cdf0e10cSrcweir    <p>Every tab of a tab bar has, besides its localized title and help
41cdf0e10cSrcweir    text, the URL of a view.  A possible alternative would be to use a
42cdf0e10cSrcweir    command URL instead of the view URL.</p>
43cdf0e10cSrcweir    <p>In the current Impress implementation a tab bar is only used for the
44cdf0e10cSrcweir    center pane to switch between views in the center pane.  Tab bars can
45cdf0e10cSrcweir    make sense for other panes as well, i.e. for showing either the slide
46cdf0e10cSrcweir    sorter or the outline view in the left pane.</p>
47cdf0e10cSrcweir    <p>Tab bar buttons are identified by their resource id.  Note that
48cdf0e10cSrcweir    because the resource anchors are all the same (the tab bar), it is the
49cdf0e10cSrcweir    resource URL that really identifies a button. There can not be two
50cdf0e10cSrcweir    buttons with the same resource id.</p>
51cdf0e10cSrcweir    </p>
52cdf0e10cSrcweir    <p>A better place for this interface (in an extended version) would be
53cdf0e10cSrcweir    <code>com::sun::star::awt</code></p>
54cdf0e10cSrcweir    @see TabBarButton
55cdf0e10cSrcweir*/
56cdf0e10cSrcweirinterface XTabBar
57cdf0e10cSrcweir{
58cdf0e10cSrcweir    /** Add a tab bar button to the right of another one.
59cdf0e10cSrcweir        @param aButton
60cdf0e10cSrcweir            The new tab bar button that is to be inserted.  If a button with
61cdf0e10cSrcweir            the same resource id is already present than that is removed before the
62cdf0e10cSrcweir            new button is inserted.
63cdf0e10cSrcweir        @param aAnchor
64cdf0e10cSrcweir            The new button is inserted to the right of this button.  When
65cdf0e10cSrcweir            its ResourceId is empty then the new button is inserted at the left
66cdf0e10cSrcweir            most position.
67cdf0e10cSrcweir    */
68cdf0e10cSrcweir    void addTabBarButtonAfter ([in] TabBarButton aButton, [in] TabBarButton aAnchor);
69cdf0e10cSrcweir
70cdf0e10cSrcweir    /** Add a tab bar button at the right most position.
71cdf0e10cSrcweir        @param aButton
72cdf0e10cSrcweir            The new tab bar button that is to be inserted.
73cdf0e10cSrcweir    */
74cdf0e10cSrcweir    void appendTabBarButton ([in] TabBarButton aButton);
75cdf0e10cSrcweir
76cdf0e10cSrcweir    /** Remove a tab bar button.
77cdf0e10cSrcweir        @param aButton
78cdf0e10cSrcweir            The tab bar button to remove.  When there is no button with the
79cdf0e10cSrcweir            specified resource id then this call is silently ignored.
80cdf0e10cSrcweir    */
81cdf0e10cSrcweir    void removeTabBarButton ([in] TabBarButton aButton);
82cdf0e10cSrcweir
83cdf0e10cSrcweir    /** Test whether the specified button exists in the tab bar.
84cdf0e10cSrcweir        @param aButton
85cdf0e10cSrcweir            The tab bar button whose existence is tested.
86cdf0e10cSrcweir        @return
87cdf0e10cSrcweir            Returns <TRUE/> when the button exists.
88cdf0e10cSrcweir    */
89cdf0e10cSrcweir    boolean hasTabBarButton ([in] TabBarButton aButton);
90cdf0e10cSrcweir
91cdf0e10cSrcweir    /** Return a sequence of all the tab bar buttons.
92cdf0e10cSrcweir        <p>Their order reflects the visible order in the tab bar.</p>
93cdf0e10cSrcweir        <p>This method can be used when
94cdf0e10cSrcweir        <member>addTabBarButtonAfter()</member> does not provide enough
95cdf0e10cSrcweir        control as to where to insert a new button.</p>
96cdf0e10cSrcweir    */
97cdf0e10cSrcweir    sequence<TabBarButton> getTabBarButtons ();
98cdf0e10cSrcweir};
99cdf0e10cSrcweir
100cdf0e10cSrcweir}; }; }; }; }; // ::com::sun::star::drawing::framework
101cdf0e10cSrcweir
102cdf0e10cSrcweir#endif
103