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