1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_frame_XToolbarController_idl__
24#define __com_sun_star_frame_XToolbarController_idl__
25
26#ifndef __com_sun_star_awt_XWindow_idl__
27#include <com/sun/star/awt/XWindow.idl>
28#endif
29
30#ifndef __com_sun_star_awt_KeyModifier_idl__
31#include <com/sun/star/awt/KeyModifier.idl>
32#endif
33
34//=============================================================================
35
36 module com {  module sun {  module star {  module frame {
37
38//=============================================================================
39/** is an abstract service for a component which offers a more complex user interface
40    to users within a toolbar.
41
42    <p>
43    A generic toolbar function is represented as a button which has a state
44    (enabled,disabled and selected, not selected). A toolbar controller can be added to a
45    toolbar and provide information or functions with a more sophisticated user interface.<br/>
46    A typical example for toolbar controller is a font chooser on a toolbar. It provides
47    all available fonts in a dropdown box and shows the current chosen font.
48    <p>
49
50    @see com::sun::star::frame::XDispatchProvider
51
52    @since OpenOffice 2.0
53 */
54interface XToolbarController : com::sun::star::uno::XInterface
55{
56    //=============================================================================
57    /** provides a function to execute the command which is bound to the toolbar controller.
58
59        @param
60            a combination of <type scope="com::sun::star::awt">KeyModifier</type> value that represent
61            the current state of the modifier keys.
62
63        <p>
64        This function is usally called by a toolbar implementation when a user clicked on a toolbar button
65        or pressed enter on the keyboard when the item has the input focus.
66        </p>
67    */
68    void execute( [in] short KeyModifier );
69
70    //=============================================================================
71    /** notifies a component that a single click has been made on the toolbar item.
72    */
73    void click();
74
75    //=============================================================================
76    /** notifies a component that a double click has been made on the toolbar item.
77    */
78    void doubleClick();
79
80    //=============================================================================
81    /** requests to create a popup window for additional functions.
82
83        @return
84            a <type scope="com::sun::star::awt">XWindow</type> which provides additional functions
85            to the user. The reference must be empty if component does not want to provide a separate
86            window.
87    */
88    com::sun::star::awt::XWindow createPopupWindow();
89
90    //=============================================================================
91    /** requests to create an item window which can be added to the toolbar.
92
93        @param Parent
94            a <type scope="com::sun::star::awt">XWindow</type> which must be used as a parent
95            for the requested item window.
96
97        @return
98            a <type scope="com::sun::star::awt">XWindow</type> which can be added to a toolbar.
99            The reference must be empty if a component does not want to provide an item window.
100    */
101    com::sun::star::awt::XWindow createItemWindow( [in] com::sun::star::awt::XWindow Parent );
102};
103
104}; }; }; };
105
106#endif
107