1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_frame_ToolbarController_idl__
21 #define __com_sun_star_frame_ToolbarController_idl__
23 #include
<com
/sun
/star
/lang
/XInitialization.idl
>
24 #include
<com
/sun
/star
/util
/XUpdatable.idl
>
25 #include
<com
/sun
/star
/frame
/XStatusListener.idl
>
26 #include
<com
/sun
/star
/frame
/XToolbarController.idl
>
27 #include
<com
/sun
/star
/frame
/XSubToolbarController.idl
>
30 module com
{ module sun
{ module star
{ module frame
{
32 /** is an abstract service for a component which offers a more complex user
33 interface to users within a toolbar.
36 A generic toolbar function is represented as a button which has a state
37 (enabled,disabled and selected, not selected). A toolbar controller can
38 be added to a toolbar and provide information or functions within a more
39 sophisticated user interface.<br/> A typical example for toolbar controller
40 is the font chooser within the toolbar. It provides all available fonts in
41 a dropdown box and shows the current chosen font.
44 @see com::sun::star::frame::XDispatchProvider
49 service ToolbarController
51 /** with this interface a component can receive events if a feature has
55 The toolbar controller implementation should register itself as a
56 listener when its <member scope="com::sun::star::util">XUpdatable</member>
57 interface has been called.
60 interface com
::sun
::star
::frame
::XStatusListener
;
62 /** used to initialize a component with required arguments.
64 A toolbar controller needs at least three additional arguments
65 provided as <type scope="com::sun::star::beans">PropertyValue</type>:
67 <li><b>Frame</b><br>a <type scope="com::sun::star::frame">XFrame</type>
68 instance to which the toolbar controller belongs.</li>
69 <li><b>CommandURL</b><br>a string which specifies the command a
70 toolbar controller is bound.</li>
71 <li><b>ServiceManager</b><br>a
72 <type scope="com::sun::star::lang">XMultiServiceFactory</type>
73 instance which can be used to create additional UNO services.</li>
76 interface com
::sun
::star
::lang
::XInitialization
;
78 /** used to notify an implementation that it needs to add its listener or remove
82 A toolbar controller instance is ready for use after this call has been made
83 the first time. The toolbar implementation guarantees that the controller's
84 item window has been added to the toolbar and its reference is held by it.
87 interface com
::sun
::star
::util
::XUpdatable
;
89 /** used to notify changed features and requests for additional user interface
93 Mostly used by a toolbar implementation to forward information to and request
94 services from a toolbar controller component. This interface must be usable
95 after <member scope="com::sun::star::lang">XInitialitation::initialize</member>
96 has been called. The behavior of the interface is undefined if the controller
97 component hasn't been initialized.
100 interface com
::sun
::star
::frame
::XToolbarController
;
102 /** used to notify and retrieve information that are specific for sub-toolbar
106 Used by implementations that want to provide the toolbar button/sub-
107 toolbar function feature. A controller supporting this interface exchanges
108 the function of its own toolbar button, that opened the sub-toolbar, with
109 the one that has been selected on the sub-toolbar.
112 [optional] interface ::com
::sun
::star
::frame
::XSubToolbarController
;
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */