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_XSubToolbarController_idl__
24#define __com_sun_star_frame_XSubToolbarController_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30//=============================================================================
31
32 module com {  module sun {  module star {  module frame {
33
34//=============================================================================
35/** special interface to support sub-toolbars in a controller implementation.
36
37    <p>
38    This interface is normally used to implement the toolbar button/sub-
39    toolbar function feature. It exchanges the function of the toolbar
40    button, that opened the sub-toolbar, with the one that has been selected
41    on the sub-toolbar.
42    </p>
43
44    @see com::sun::star::frame::ToolbarController
45
46    @since OOo 2.0
47 */
48interface XSubToolbarController : com::sun::star::uno::XInterface
49{
50    //=============================================================================
51    /** if the controller features a sub-toolbar.
52
53        @return
54            <TRUE/> if the controller offers a sub toolbar, otherwise <FALSE/>.
55
56        <p>
57        Enables implementations to dynamically decide to support sub-toolbars
58        or not.
59        </p>
60    */
61    boolean opensSubToolbar();
62
63    //=============================================================================
64    /** provides the resource URL of the sub-toolbar this controller opens.
65
66        @return
67            name of the sub-toolbar this controller offers. A empty string
68            will be interpreted as if this controller offers no sub-toolbar.
69    */
70    string getSubToolbarName();
71
72    //=============================================================================
73    /** gets called to notify a controller that a sub-toolbar function has been
74        selected.
75
76        @param aCommand
77            a string which identifies the function that has been selected by
78            a user.
79    */
80    void functionSelected( [in] string aCommand );
81
82    //=============================================================================
83    /** gets called to notify a controller that it should set an image which
84        represents the current selected function.
85
86        <p>
87        Only the controller instance is able to set the correct image for the
88        current function. A toolbar implementation will ask sub-toolbar
89        controllers to update their image whenever it has to update the images
90        of all its buttons.
91        </p>
92    */
93    void updateImage();
94};
95
96}; }; }; };
97
98#endif
99