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#ifndef __com_sun_star_frame_XSubToolbarController_idl__ 28#define __com_sun_star_frame_XSubToolbarController_idl__ 29 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33 34//============================================================================= 35 36 module com { module sun { module star { module frame { 37 38//============================================================================= 39/** special interface to support sub-toolbars in a controller implementation. 40 41 <p> 42 This interface is normally used to implement the toolbar button/sub- 43 toolbar function feature. It exchanges the function of the toolbar 44 button, that opened the sub-toolbar, with the one that has been selected 45 on the sub-toolbar. 46 </p> 47 48 @see com::sun::star::frame::ToolbarController 49 50 @since OOo 2.0 51 */ 52interface XSubToolbarController : com::sun::star::uno::XInterface 53{ 54 //============================================================================= 55 /** if the controller features a sub-toolbar. 56 57 @return 58 <TRUE/> if the controller offers a sub toolbar, otherwise <FALSE/>. 59 60 <p> 61 Enables implementations to dynamically decide to support sub-toolbars 62 or not. 63 </p> 64 */ 65 boolean opensSubToolbar(); 66 67 //============================================================================= 68 /** provides the resource URL of the sub-toolbar this controller opens. 69 70 @return 71 name of the sub-toolbar this controller offers. A empty string 72 will be interpreted as if this controller offers no sub-toolbar. 73 */ 74 string getSubToolbarName(); 75 76 //============================================================================= 77 /** gets called to notify a controller that a sub-toolbar function has been 78 selected. 79 80 @param aCommand 81 a string which identifies the function that has been selected by 82 a user. 83 */ 84 void functionSelected( [in] string aCommand ); 85 86 //============================================================================= 87 /** gets called to notify a controller that it should set an image which 88 represents the current selected function. 89 90 <p> 91 Only the controller instance is able to set the correct image for the 92 current function. A toolbar implementation will ask sub-toolbar 93 controllers to update their image whenever it has to update the images 94 of all its buttons. 95 </p> 96 */ 97 void updateImage(); 98}; 99 100}; }; }; }; 101 102#endif 103