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