Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / frame / XToolbarController.idl
blob7d0d3ad0e66a3c439ade6b030b9eb88db8934650
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XToolbarController.idl,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_frame_XToolbarController_idl__
31 #define __com_sun_star_frame_XToolbarController_idl__
33 #ifndef __com_sun_star_awt_XWindow_idl__
34 #include <com/sun/star/awt/XWindow.idl>
35 #endif
37 #ifndef __com_sun_star_awt_KeyModifier_idl__
38 #include <com/sun/star/awt/KeyModifier.idl>
39 #endif
41 //=============================================================================
43 module com { module sun { module star { module frame {
45 //=============================================================================
46 /** is an abstract service for a component which offers a more complex user interface
47 to users within a toolbar.
49 <p>
50 A generic toolbar function is represented as a button which has a state
51 (enabled,disabled and selected, not selected). A toolbar controller can be added to a
52 toolbar and provide information or functions with a more sophisticated user interface.<br/>
53 A typical example for toolbar controller is a font chooser on a toolbar. It provides
54 all available fonts in a dropdown box and shows the current chosen font.
55 <p>
57 @see com::sun::star::frame::XDispatchProvider
59 @since OOo 2.0.0
61 interface XToolbarController : com::sun::star::uno::XInterface
63 //=============================================================================
64 /** provides a function to execute the command which is bound to the toolbar controller.
66 @param
67 a combination of <type scope="com::sun::star::awt">KeyModifier</type> value that represent
68 the current state of the modifier keys.
70 <p>
71 This function is usally called by a toolbar implementation when a user clicked on a toolbar button
72 or pressed enter on the keyboard when the item has the input focus.
73 </p>
75 void execute( [in] short KeyModifier );
77 //=============================================================================
78 /** notifies a component that a single click has been made on the toolbar item.
80 void click();
82 //=============================================================================
83 /** notifies a component that a double click has been made on the toolbar item.
85 void doubleClick();
87 //=============================================================================
88 /** requests to create a popup window for additional functions.
90 @return
91 a <type scope="com::sun::star::awt">XWindow</type> which provides additional functions
92 to the user. The reference must be empty if component does not want to provide a separate
93 window.
95 com::sun::star::awt::XWindow createPopupWindow();
97 //=============================================================================
98 /** requests to create an item window which can be added to the toolbar.
100 @param Parent
101 a <type scope="com::sun::star::awt">XWindow</type> which must be used as a parent
102 for the requested item window.
104 @return
105 a <type scope="com::sun::star::awt">XWindow</type> which can be added to a toolbar.
106 The reference must be empty if a component does not want to provide an item window.
108 com::sun::star::awt::XWindow createItemWindow( [in] com::sun::star::awt::XWindow Parent );
111 }; }; }; };
113 #endif