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
28*cdf0e10cSrcweir#ifndef __com_sun_star_frame_ToolbarController_idl__
29*cdf0e10cSrcweir#define __com_sun_star_frame_ToolbarController_idl__
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir#ifndef __com_sun_star_lang_XInitialization_idl__
32*cdf0e10cSrcweir#include <com/sun/star/lang/XInitialization.idl>
33*cdf0e10cSrcweir#endif
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir#ifndef __com_sun_star_util_XUpdatable_idl__
36*cdf0e10cSrcweir#include <com/sun/star/util/XUpdatable.idl>
37*cdf0e10cSrcweir#endif
38*cdf0e10cSrcweir
39*cdf0e10cSrcweir#ifndef __com_sun_star_frame_XStatusListener_idl__
40*cdf0e10cSrcweir#include <com/sun/star/frame/XStatusListener.idl>
41*cdf0e10cSrcweir#endif
42*cdf0e10cSrcweir
43*cdf0e10cSrcweir#ifndef __com_sun_star_frame_XToolbarController_idl__
44*cdf0e10cSrcweir#include <com/sun/star/frame/XToolbarController.idl>
45*cdf0e10cSrcweir#endif
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir#ifndef __com_sun_star_frame_XSubToolbarController_idl__
48*cdf0e10cSrcweir#include <com/sun/star/frame/XSubToolbarController.idl>
49*cdf0e10cSrcweir#endif
50*cdf0e10cSrcweir
51*cdf0e10cSrcweir//=============================================================================
52*cdf0e10cSrcweir
53*cdf0e10cSrcweir module com {  module sun {  module star {  module frame {
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir//=============================================================================
56*cdf0e10cSrcweir/** is an abstract service for a component which offers a more complex user
57*cdf0e10cSrcweir    interface to users within a toolbar.
58*cdf0e10cSrcweir
59*cdf0e10cSrcweir    <p>
60*cdf0e10cSrcweir    A generic toolbar function is represented as a button which has a state
61*cdf0e10cSrcweir    (enabled,disabled and selected, not selected). A toolbar controller can
62*cdf0e10cSrcweir    be added to a toolbar and provide information or functions within a more
63*cdf0e10cSrcweir    sophisticated user interface.<br/> A typical example for toolbar controller
64*cdf0e10cSrcweir    is the font chooser within the toolbar. It provides all available fonts in
65*cdf0e10cSrcweir    a dropdown box and shows the current chosen font.
66*cdf0e10cSrcweir    <p>
67*cdf0e10cSrcweir
68*cdf0e10cSrcweir    @see com::sun::star::frame::XDispatchProvider
69*cdf0e10cSrcweir
70*cdf0e10cSrcweir    @since OOo 2.0
71*cdf0e10cSrcweir */
72*cdf0e10cSrcweir
73*cdf0e10cSrcweirservice ToolbarController
74*cdf0e10cSrcweir{
75*cdf0e10cSrcweir    //-------------------------------------------------------------------------
76*cdf0e10cSrcweir    /** with this interface a component can receive events if a feature has
77*cdf0e10cSrcweir        changed.
78*cdf0e10cSrcweir
79*cdf0e10cSrcweir        <p>
80*cdf0e10cSrcweir        The toolbar controller implementation should register itself as a
81*cdf0e10cSrcweir        listener when its <member scope="com::sun::star::util">XUpdatable</member>
82*cdf0e10cSrcweir        interface has been called.
83*cdf0e10cSrcweir        </p>
84*cdf0e10cSrcweir     */
85*cdf0e10cSrcweir    interface com::sun::star::frame::XStatusListener;
86*cdf0e10cSrcweir
87*cdf0e10cSrcweir    /** used to initialize a component with required arguments.
88*cdf0e10cSrcweir
89*cdf0e10cSrcweir        A toolbar controller needs at least three additional arguments
90*cdf0e10cSrcweir        provided as <type scope="com::sun::star::beans">PropertyValue</type>:
91*cdf0e10cSrcweir        <ul>
92*cdf0e10cSrcweir            <li><b>Frame</b><br>a <type scope="com::sun::star::frame">XFrame</type>
93*cdf0e10cSrcweir                   instance to which the toolbar controller belongs.</li>
94*cdf0e10cSrcweir            <li><b>CommandURL</b><br>a string which specifies the command a
95*cdf0e10cSrcweir                   toolbar controller is bound.</li>
96*cdf0e10cSrcweir            <li><b>ServiceManager</b><br>a
97*cdf0e10cSrcweir                   <type scope="com::sun::star::lang">XMultiServiceFactory</type>
98*cdf0e10cSrcweir                   instance which can be used to create additional UNO services.</li>
99*cdf0e10cSrcweir        </ul>
100*cdf0e10cSrcweir    */
101*cdf0e10cSrcweir    interface com::sun::star::lang::XInitialization;
102*cdf0e10cSrcweir
103*cdf0e10cSrcweir    /** used to notify an implementation that it needs to add its listener or remove
104*cdf0e10cSrcweir        and add them again.
105*cdf0e10cSrcweir
106*cdf0e10cSrcweir        <p>
107*cdf0e10cSrcweir        A toolbar controller instance is ready for use after this call has been made
108*cdf0e10cSrcweir        the first time. The toolbar implementation guarentees that the controller's
109*cdf0e10cSrcweir        item window has been added to the toolbar and its reference is held by it.
110*cdf0e10cSrcweir        </p>
111*cdf0e10cSrcweir    */
112*cdf0e10cSrcweir    interface com::sun::star::util::XUpdatable;
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir    //-------------------------------------------------------------------------
115*cdf0e10cSrcweir    /** used to notify changed features and requests for additional user interface
116*cdf0e10cSrcweir        items.
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir        <p>
119*cdf0e10cSrcweir        Mostly used by a toolbar implementation to forward information to and request
120*cdf0e10cSrcweir        services from a toolbar controller component. This interface must be useable
121*cdf0e10cSrcweir        after <member scope="com::sun::star::lang">XInitialitation::initialize</member>
122*cdf0e10cSrcweir        has been called.  The behavior of the interface is undefined if the controller
123*cdf0e10cSrcweir        component hasn't been initialized.
124*cdf0e10cSrcweir        </p>
125*cdf0e10cSrcweir     */
126*cdf0e10cSrcweir    interface com::sun::star::frame::XToolbarController;
127*cdf0e10cSrcweir
128*cdf0e10cSrcweir    //-------------------------------------------------------------------------
129*cdf0e10cSrcweir    /** used to notify and retrieve information that are specific for sub-toolbar
130*cdf0e10cSrcweir        controllers.
131*cdf0e10cSrcweir
132*cdf0e10cSrcweir        <p>
133*cdf0e10cSrcweir        Used by implementations that want to provide the toolbar button/sub-
134*cdf0e10cSrcweir        toolbar function feature. A controller supporting this interface exchanges
135*cdf0e10cSrcweir        the function of its own toolbar button, that opened the sub-toolbar, with
136*cdf0e10cSrcweir        the one that has been selected on the sub-toolbar.
137*cdf0e10cSrcweir        </p>
138*cdf0e10cSrcweir     */
139*cdf0e10cSrcweir    [optional] interface ::com::sun::star::frame::XSubToolbarController;
140*cdf0e10cSrcweir};
141*cdf0e10cSrcweir
142*cdf0e10cSrcweir//=============================================================================
143*cdf0e10cSrcweir
144*cdf0e10cSrcweir}; }; }; };
145*cdf0e10cSrcweir
146*cdf0e10cSrcweir#endif
147