merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / frame / ToolbarController.idl
blob674b35af4e6c56b5f1871f66e56c5f4f85050048
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_frame_ToolbarController_idl__
29 #define __com_sun_star_frame_ToolbarController_idl__
31 #ifndef __com_sun_star_lang_XInitialization_idl__
32 #include <com/sun/star/lang/XInitialization.idl>
33 #endif
35 #ifndef __com_sun_star_util_XUpdatable_idl__
36 #include <com/sun/star/util/XUpdatable.idl>
37 #endif
39 #ifndef __com_sun_star_frame_XStatusListener_idl__
40 #include <com/sun/star/frame/XStatusListener.idl>
41 #endif
43 #ifndef __com_sun_star_frame_XToolbarController_idl__
44 #include <com/sun/star/frame/XToolbarController.idl>
45 #endif
47 #ifndef __com_sun_star_frame_XSubToolbarController_idl__
48 #include <com/sun/star/frame/XSubToolbarController.idl>
49 #endif
51 //=============================================================================
53 module com { module sun { module star { module frame {
55 //=============================================================================
56 /** is an abstract service for a component which offers a more complex user
57 interface to users within a toolbar.
59 <p>
60 A generic toolbar function is represented as a button which has a state
61 (enabled,disabled and selected, not selected). A toolbar controller can
62 be added to a toolbar and provide information or functions within a more
63 sophisticated user interface.<br/> A typical example for toolbar controller
64 is the font chooser within the toolbar. It provides all available fonts in
65 a dropdown box and shows the current chosen font.
66 <p>
68 @see com::sun::star::frame::XDispatchProvider
70 @since OOo 2.0.0
73 service ToolbarController
75 //-------------------------------------------------------------------------
76 /** with this interface a component can receive events if a feature has
77 changed.
79 <p>
80 The toolbar controller implementation should register itself as a
81 listener when its <member scope="com::sun::star::util">XUpdatable</member>
82 interface has been called.
83 </p>
85 interface com::sun::star::frame::XStatusListener;
87 /** used to initialize a component with required arguments.
89 A toolbar controller needs at least three additional arguments
90 provided as <type scope="com::sun::star::beans">PropertyValue</type>:
91 <ul>
92 <li><b>Frame</b><br>a <type scope="com::sun::star::frame">XFrame</type>
93 instance to which the toolbar controller belongs.</li>
94 <li><b>CommandURL</b><br>a string which specifies the command a
95 toolbar controller is bound.</li>
96 <li><b>ServiceManager</b><br>a
97 <type scope="com::sun::star::lang">XMultiServiceFactory</type>
98 instance which can be used to create additional UNO services.</li>
99 </ul>
101 interface com::sun::star::lang::XInitialization;
103 /** used to notify an implementation that it needs to add its listener or remove
104 and add them again.
107 A toolbar controller instance is ready for use after this call has been made
108 the first time. The toolbar implementation guarentees that the controller's
109 item window has been added to the toolbar and its reference is held by it.
110 </p>
112 interface com::sun::star::util::XUpdatable;
114 //-------------------------------------------------------------------------
115 /** used to notify changed features and requests for additional user interface
116 items.
119 Mostly used by a toolbar implementation to forward information to and request
120 services from a toolbar controller component. This interface must be useable
121 after <member scope="com::sun::star::lang">XInitialitation::initialize</member>
122 has been called. The behavior of the interface is undefined if the controller
123 component hasn't been initialized.
124 </p>
126 interface com::sun::star::frame::XToolbarController;
128 //-------------------------------------------------------------------------
129 /** used to notify and retrieve information that are specific for sub-toolbar
130 controllers.
133 Used by implementations that want to provide the toolbar button/sub-
134 toolbar function feature. A controller supporting this interface exchanges
135 the function of its own toolbar button, that opened the sub-toolbar, with
136 the one that has been selected on the sub-toolbar.
137 </p>
139 [optional] interface ::com::sun::star::frame::XSubToolbarController;
142 //=============================================================================
144 }; }; }; };
146 #endif