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_XToolbarController_idl__ 28#define __com_sun_star_frame_XToolbarController_idl__ 29 30#ifndef __com_sun_star_awt_XWindow_idl__ 31#include <com/sun/star/awt/XWindow.idl> 32#endif 33 34#ifndef __com_sun_star_awt_KeyModifier_idl__ 35#include <com/sun/star/awt/KeyModifier.idl> 36#endif 37 38//============================================================================= 39 40 module com { module sun { module star { module frame { 41 42//============================================================================= 43/** is an abstract service for a component which offers a more complex user interface 44 to users within a toolbar. 45 46 <p> 47 A generic toolbar function is represented as a button which has a state 48 (enabled,disabled and selected, not selected). A toolbar controller can be added to a 49 toolbar and provide information or functions with a more sophisticated user interface.<br/> 50 A typical example for toolbar controller is a font chooser on a toolbar. It provides 51 all available fonts in a dropdown box and shows the current chosen font. 52 <p> 53 54 @see com::sun::star::frame::XDispatchProvider 55 56 @since OOo 2.0 57 */ 58interface XToolbarController : com::sun::star::uno::XInterface 59{ 60 //============================================================================= 61 /** provides a function to execute the command which is bound to the toolbar controller. 62 63 @param 64 a combination of <type scope="com::sun::star::awt">KeyModifier</type> value that represent 65 the current state of the modifier keys. 66 67 <p> 68 This function is usally called by a toolbar implementation when a user clicked on a toolbar button 69 or pressed enter on the keyboard when the item has the input focus. 70 </p> 71 */ 72 void execute( [in] short KeyModifier ); 73 74 //============================================================================= 75 /** notifies a component that a single click has been made on the toolbar item. 76 */ 77 void click(); 78 79 //============================================================================= 80 /** notifies a component that a double click has been made on the toolbar item. 81 */ 82 void doubleClick(); 83 84 //============================================================================= 85 /** requests to create a popup window for additional functions. 86 87 @return 88 a <type scope="com::sun::star::awt">XWindow</type> which provides additional functions 89 to the user. The reference must be empty if component does not want to provide a separate 90 window. 91 */ 92 com::sun::star::awt::XWindow createPopupWindow(); 93 94 //============================================================================= 95 /** requests to create an item window which can be added to the toolbar. 96 97 @param Parent 98 a <type scope="com::sun::star::awt">XWindow</type> which must be used as a parent 99 for the requested item window. 100 101 @return 102 a <type scope="com::sun::star::awt">XWindow</type> which can be added to a toolbar. 103 The reference must be empty if a component does not want to provide an item window. 104 */ 105 com::sun::star::awt::XWindow createItemWindow( [in] com::sun::star::awt::XWindow Parent ); 106}; 107 108}; }; }; }; 109 110#endif 111