1d1766043SAndrew Rist/************************************************************** 2d1766043SAndrew Rist * 3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5d1766043SAndrew Rist * distributed with this work for additional information 6d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10d1766043SAndrew Rist * 11d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12d1766043SAndrew Rist * 13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14d1766043SAndrew Rist * software distributed under the License is distributed on an 15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17d1766043SAndrew Rist * specific language governing permissions and limitations 18d1766043SAndrew Rist * under the License. 19d1766043SAndrew Rist * 20d1766043SAndrew Rist *************************************************************/ 21d1766043SAndrew Rist 22d1766043SAndrew Rist 23cdf0e10cSrcweir#ifndef __com_sun_star_awt_XSimpleTabController_idl__ 24cdf0e10cSrcweir#define __com_sun_star_awt_XSimpleTabController_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_awt_XTabListener_idl__ 27cdf0e10cSrcweir#include <com/sun/star/awt/XTabListener.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 31cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 32cdf0e10cSrcweir#endif 33cdf0e10cSrcweir 34cdf0e10cSrcweir#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 35cdf0e10cSrcweir#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 36cdf0e10cSrcweir#endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir#ifndef __com_sun_star_beans_NamedValue_idl__ 39cdf0e10cSrcweir#include <com/sun/star/beans/NamedValue.idl> 40cdf0e10cSrcweir#endif 41cdf0e10cSrcweir 42cdf0e10cSrcweir//============================================================================= 43cdf0e10cSrcweir 44cdf0e10cSrcweir module com { module sun { module star { module awt { 45cdf0e10cSrcweir 46cdf0e10cSrcweir//============================================================================= 47cdf0e10cSrcweir 48cdf0e10cSrcweir/** specifies the basic operations for a tab controller, 49cdf0e10cSrcweir but does not require XControl as type of tabs. 50cdf0e10cSrcweir */ 51cdf0e10cSrcweirpublished interface XSimpleTabController : com::sun::star::uno::XInterface 52cdf0e10cSrcweir{ 53cdf0e10cSrcweir //------------------------------------------------------------------------- 54cdf0e10cSrcweir /** create a new tab and return an unique ID, 55a893be29SPedro Giffuni which can be used further to address this tab by using other methods 56cdf0e10cSrcweir of this interface. 57cdf0e10cSrcweir 58*8e0daafcSTsutomu Uchino @return 59cdf0e10cSrcweir an unique ID for this new tab. 60cdf0e10cSrcweir */ 61cdf0e10cSrcweir long insertTab(); 62cdf0e10cSrcweir 63cdf0e10cSrcweir //------------------------------------------------------------------------- 64cdf0e10cSrcweir /** remove a tab with the given ID. 65cdf0e10cSrcweir 66cdf0e10cSrcweir @param ID 67cdf0e10cSrcweir the ID of the tab, which should be removed. 68cdf0e10cSrcweir 69cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 70a893be29SPedro Giffuni if the specified ID isn't used inside this tab controller. 71cdf0e10cSrcweir */ 72cdf0e10cSrcweir void removeTab( [in] long ID ) 73cdf0e10cSrcweir raises( com::sun::star::lang::IndexOutOfBoundsException ); 74cdf0e10cSrcweir 75cdf0e10cSrcweir //------------------------------------------------------------------------- 76cdf0e10cSrcweir /** change some properties of the specified tab. 77cdf0e10cSrcweir 78cdf0e10cSrcweir @descr Such properties can be: 79cdf0e10cSrcweir <table> 80cdf0e10cSrcweir <tr> 81cdf0e10cSrcweir <td><b>Property</b></td> 82cdf0e10cSrcweir <td><b>Type</b></td> 83cdf0e10cSrcweir <td><b>Description</b></td> 84cdf0e10cSrcweir </tr> 85cdf0e10cSrcweir <tr> 86cdf0e10cSrcweir <td>Title</td> 87cdf0e10cSrcweir <td>string</td> 88cdf0e10cSrcweir <td>the title of the tab, which is shown at the UI.</td> 89cdf0e10cSrcweir </tr> 90cdf0e10cSrcweir <tr> 91cdf0e10cSrcweir <td>Position</td> 92cdf0e10cSrcweir <td>int</td> 93cdf0e10cSrcweir <td>describe the order of this tab in relation to all other tabs inside this control.</td> 94cdf0e10cSrcweir </tr> 95cdf0e10cSrcweir </table> 96cdf0e10cSrcweir 97cdf0e10cSrcweir @attention Not all properties must be supported by all implementations of this interface. 98cdf0e10cSrcweir Of course some important ones should be handled by every implementation ... 99cdf0e10cSrcweir as e.g. "Title". 100cdf0e10cSrcweir 101cdf0e10cSrcweir @param ID 102cdf0e10cSrcweir the ID of the tab, which should be changed. 103cdf0e10cSrcweir 104cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 105a893be29SPedro Giffuni if the specified ID isn't used inside this tab controller. 106cdf0e10cSrcweir */ 107cdf0e10cSrcweir void setTabProps( [in] long ID , 108cdf0e10cSrcweir [in] sequence< com::sun::star::beans::NamedValue > Properties ) 109cdf0e10cSrcweir raises( com::sun::star::lang::IndexOutOfBoundsException ); 110cdf0e10cSrcweir 111cdf0e10cSrcweir //------------------------------------------------------------------------- 112cdf0e10cSrcweir /** retrieve the set of properties for the specified tab. 113cdf0e10cSrcweir 114cdf0e10cSrcweir @param ID 115cdf0e10cSrcweir the ID of the tab. 116cdf0e10cSrcweir 117cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 118a893be29SPedro Giffuni if the specified ID isn't used inside this tab controller. 119cdf0e10cSrcweir */ 120cdf0e10cSrcweir sequence< com::sun::star::beans::NamedValue > getTabProps( [in] long ID ) 121cdf0e10cSrcweir raises( com::sun::star::lang::IndexOutOfBoundsException ); 122cdf0e10cSrcweir 123cdf0e10cSrcweir //------------------------------------------------------------------------- 124cdf0e10cSrcweir /** activate the specified tab. 125cdf0e10cSrcweir 126cdf0e10cSrcweir @descr The new tab will be activated and all listener will get an event describing this. 127cdf0e10cSrcweir Of course there will be an event too, which notify's listener about the deactivation 128cdf0e10cSrcweir of the last active tab. 129cdf0e10cSrcweir 130cdf0e10cSrcweir @param ID 131cdf0e10cSrcweir the ID of the new active tab. 132cdf0e10cSrcweir 133cdf0e10cSrcweir @throws ::com::sun::star::lang::IndexOutOfBoundsException 134a893be29SPedro Giffuni if the specified ID isn't used inside this tab controller. 135cdf0e10cSrcweir */ 136cdf0e10cSrcweir void activateTab( [in] long ID ) 137cdf0e10cSrcweir raises( com::sun::star::lang::IndexOutOfBoundsException ); 138cdf0e10cSrcweir 139cdf0e10cSrcweir //------------------------------------------------------------------------- 140cdf0e10cSrcweir /** return the unique ID of the current active tab. 141cdf0e10cSrcweir 142*8e0daafcSTsutomu Uchino @return ID 143cdf0e10cSrcweir the ID of the active tab. 144cdf0e10cSrcweir */ 145cdf0e10cSrcweir long getActiveTabID(); 146cdf0e10cSrcweir 147cdf0e10cSrcweir //------------------------------------------------------------------------- 148cdf0e10cSrcweir /** register listener for inserting/removing tab's and changing her properties. 149cdf0e10cSrcweir 150cdf0e10cSrcweir @param Listener 151cdf0e10cSrcweir the listener for registration. 152cdf0e10cSrcweir */ 153cdf0e10cSrcweir void addTabListener( [in] XTabListener Listener ); 154cdf0e10cSrcweir 155cdf0e10cSrcweir //------------------------------------------------------------------------- 156cdf0e10cSrcweir /** deregister listener for inserting/removing tab's and changing her properties. 157cdf0e10cSrcweir 158cdf0e10cSrcweir @param Listener 159cdf0e10cSrcweir the listener for deregistration. 160cdf0e10cSrcweir */ 161cdf0e10cSrcweir void removeTabListener( [in] XTabListener Listener ); 162cdf0e10cSrcweir}; 163cdf0e10cSrcweir 164cdf0e10cSrcweir//============================================================================= 165cdf0e10cSrcweir 166cdf0e10cSrcweir}; }; }; }; 167cdf0e10cSrcweir 168cdf0e10cSrcweir#endif 169