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 .
21 module com
{ module sun
{ module star
{ module frame
{
23 /** is an abstract service for a component which offers a more complex user
24 interface to users within a toolbar.
27 A generic toolbar function is represented as a button which has a state
28 (enabled,disabled and selected, not selected). A toolbar controller can
29 be added to a toolbar and provide information or functions within a more
30 sophisticated user interface.<br/> A typical example for toolbar controller
31 is the font chooser within the toolbar. It provides all available fonts in
32 a dropdown box and shows the current chosen font.
35 @see com::sun::star::frame::XDispatchProvider
40 service ToolbarController
42 /** with this interface a component can receive events if a feature has
46 The toolbar controller implementation should register itself as a
47 listener when its com::sun::star::util::XUpdatable
48 interface has been called.
51 interface com
::sun
::star
::frame
::XStatusListener
;
53 /** used to initialize a component with required arguments.
55 A toolbar controller needs at least three additional arguments
56 provided as com::sun::star::beans::PropertyValue:
58 <li><b>Frame</b><br>a com::sun::star::frame::XFrame
59 instance to which the toolbar controller belongs.</li>
60 <li><b>CommandURL</b><br>a string which specifies the command a
61 toolbar controller is bound.</li>
62 <li><b>ServiceManager</b><br>a
63 com::sun::star::lang::XMultiServiceFactory
64 instance which can be used to create additional UNO services.</li>
67 interface com
::sun
::star
::lang
::XInitialization
;
69 /** used to notify an implementation that it needs to add its listener or remove
73 A toolbar controller instance is ready for use after this call has been made
74 the first time. The toolbar implementation guarantees that the controller's
75 item window has been added to the toolbar and its reference is held by it.
78 interface com
::sun
::star
::util
::XUpdatable
;
80 /** used to notify changed features and requests for additional user interface
84 Mostly used by a toolbar implementation to forward information to and request
85 services from a toolbar controller component. This interface must be usable
86 after com::sun::star::lang::XInitialization::initialize()
87 has been called. The behavior of the interface is undefined if the controller
88 component hasn't been initialized.
91 interface com
::sun
::star
::frame
::XToolbarController
;
93 /** used to notify and retrieve information that are specific for sub-toolbar
97 Used by implementations that want to provide the toolbar button/sub-
98 toolbar function feature. A controller supporting this interface exchanges
99 the function of its own toolbar button, that opened the sub-toolbar, with
100 the one that has been selected on the sub-toolbar.
103 [optional] interface ::com
::sun
::star
::frame
::XSubToolbarController
;
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */