1d1766043SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4d1766043SAndrew Rist * or more contributor license agreements. See the NOTICE file 5d1766043SAndrew Rist * distributed with this work for additional information 6d1766043SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the 8d1766043SAndrew Rist * "License"); you may not use this file except in compliance 9d1766043SAndrew Rist * with the License. You may obtain a copy of the License at 10d1766043SAndrew Rist * 11d1766043SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12d1766043SAndrew Rist * 13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing, 14d1766043SAndrew Rist * software distributed under the License is distributed on an 15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16d1766043SAndrew Rist * KIND, either express or implied. See the License for the 17d1766043SAndrew Rist * specific language governing permissions and limitations 18d1766043SAndrew Rist * under the License. 19d1766043SAndrew Rist * 20d1766043SAndrew Rist *************************************************************/ 21d1766043SAndrew Rist 22d1766043SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef __com_sun_star_frame_ToolbarController_idl__ 25cdf0e10cSrcweir#define __com_sun_star_frame_ToolbarController_idl__ 26cdf0e10cSrcweir 27cdf0e10cSrcweir#ifndef __com_sun_star_lang_XInitialization_idl__ 28cdf0e10cSrcweir#include <com/sun/star/lang/XInitialization.idl> 29cdf0e10cSrcweir#endif 30cdf0e10cSrcweir 31cdf0e10cSrcweir#ifndef __com_sun_star_util_XUpdatable_idl__ 32cdf0e10cSrcweir#include <com/sun/star/util/XUpdatable.idl> 33cdf0e10cSrcweir#endif 34cdf0e10cSrcweir 35cdf0e10cSrcweir#ifndef __com_sun_star_frame_XStatusListener_idl__ 36cdf0e10cSrcweir#include <com/sun/star/frame/XStatusListener.idl> 37cdf0e10cSrcweir#endif 38cdf0e10cSrcweir 39cdf0e10cSrcweir#ifndef __com_sun_star_frame_XToolbarController_idl__ 40cdf0e10cSrcweir#include <com/sun/star/frame/XToolbarController.idl> 41cdf0e10cSrcweir#endif 42cdf0e10cSrcweir 43cdf0e10cSrcweir#ifndef __com_sun_star_frame_XSubToolbarController_idl__ 44cdf0e10cSrcweir#include <com/sun/star/frame/XSubToolbarController.idl> 45cdf0e10cSrcweir#endif 46cdf0e10cSrcweir 47cdf0e10cSrcweir//============================================================================= 48cdf0e10cSrcweir 49cdf0e10cSrcweir module com { module sun { module star { module frame { 50cdf0e10cSrcweir 51cdf0e10cSrcweir//============================================================================= 52cdf0e10cSrcweir/** is an abstract service for a component which offers a more complex user 53cdf0e10cSrcweir interface to users within a toolbar. 54cdf0e10cSrcweir 55cdf0e10cSrcweir <p> 56cdf0e10cSrcweir A generic toolbar function is represented as a button which has a state 57cdf0e10cSrcweir (enabled,disabled and selected, not selected). A toolbar controller can 58cdf0e10cSrcweir be added to a toolbar and provide information or functions within a more 59cdf0e10cSrcweir sophisticated user interface.<br/> A typical example for toolbar controller 60cdf0e10cSrcweir is the font chooser within the toolbar. It provides all available fonts in 61cdf0e10cSrcweir a dropdown box and shows the current chosen font. 62cdf0e10cSrcweir <p> 63cdf0e10cSrcweir 64cdf0e10cSrcweir @see com::sun::star::frame::XDispatchProvider 65cdf0e10cSrcweir 66c4dc0a1aSJürgen Schmidt @since OpenOffice 2.0 67cdf0e10cSrcweir */ 68cdf0e10cSrcweir 69cdf0e10cSrcweirservice ToolbarController 70cdf0e10cSrcweir{ 71cdf0e10cSrcweir //------------------------------------------------------------------------- 72cdf0e10cSrcweir /** with this interface a component can receive events if a feature has 73cdf0e10cSrcweir changed. 74cdf0e10cSrcweir 75cdf0e10cSrcweir <p> 76cdf0e10cSrcweir The toolbar controller implementation should register itself as a 77cdf0e10cSrcweir listener when its <member scope="com::sun::star::util">XUpdatable</member> 78cdf0e10cSrcweir interface has been called. 79cdf0e10cSrcweir </p> 80cdf0e10cSrcweir */ 81cdf0e10cSrcweir interface com::sun::star::frame::XStatusListener; 82cdf0e10cSrcweir 83cdf0e10cSrcweir /** used to initialize a component with required arguments. 84cdf0e10cSrcweir 85cdf0e10cSrcweir A toolbar controller needs at least three additional arguments 86cdf0e10cSrcweir provided as <type scope="com::sun::star::beans">PropertyValue</type>: 87cdf0e10cSrcweir <ul> 88cdf0e10cSrcweir <li><b>Frame</b><br>a <type scope="com::sun::star::frame">XFrame</type> 89cdf0e10cSrcweir instance to which the toolbar controller belongs.</li> 90cdf0e10cSrcweir <li><b>CommandURL</b><br>a string which specifies the command a 91cdf0e10cSrcweir toolbar controller is bound.</li> 92cdf0e10cSrcweir <li><b>ServiceManager</b><br>a 93cdf0e10cSrcweir <type scope="com::sun::star::lang">XMultiServiceFactory</type> 94cdf0e10cSrcweir instance which can be used to create additional UNO services.</li> 95cdf0e10cSrcweir </ul> 96cdf0e10cSrcweir */ 97cdf0e10cSrcweir interface com::sun::star::lang::XInitialization; 98cdf0e10cSrcweir 99cdf0e10cSrcweir /** used to notify an implementation that it needs to add its listener or remove 100cdf0e10cSrcweir and add them again. 101cdf0e10cSrcweir 102cdf0e10cSrcweir <p> 103cdf0e10cSrcweir A toolbar controller instance is ready for use after this call has been made 104*a893be29SPedro Giffuni the first time. The toolbar implementation guarantees that the controller's 105cdf0e10cSrcweir item window has been added to the toolbar and its reference is held by it. 106cdf0e10cSrcweir </p> 107cdf0e10cSrcweir */ 108cdf0e10cSrcweir interface com::sun::star::util::XUpdatable; 109cdf0e10cSrcweir 110cdf0e10cSrcweir //------------------------------------------------------------------------- 111cdf0e10cSrcweir /** used to notify changed features and requests for additional user interface 112cdf0e10cSrcweir items. 113cdf0e10cSrcweir 114cdf0e10cSrcweir <p> 115cdf0e10cSrcweir Mostly used by a toolbar implementation to forward information to and request 116cdf0e10cSrcweir services from a toolbar controller component. This interface must be useable 117cdf0e10cSrcweir after <member scope="com::sun::star::lang">XInitialitation::initialize</member> 118cdf0e10cSrcweir has been called. The behavior of the interface is undefined if the controller 119cdf0e10cSrcweir component hasn't been initialized. 120cdf0e10cSrcweir </p> 121cdf0e10cSrcweir */ 122cdf0e10cSrcweir interface com::sun::star::frame::XToolbarController; 123cdf0e10cSrcweir 124cdf0e10cSrcweir //------------------------------------------------------------------------- 125cdf0e10cSrcweir /** used to notify and retrieve information that are specific for sub-toolbar 126cdf0e10cSrcweir controllers. 127cdf0e10cSrcweir 128cdf0e10cSrcweir <p> 129cdf0e10cSrcweir Used by implementations that want to provide the toolbar button/sub- 130cdf0e10cSrcweir toolbar function feature. A controller supporting this interface exchanges 131cdf0e10cSrcweir the function of its own toolbar button, that opened the sub-toolbar, with 132cdf0e10cSrcweir the one that has been selected on the sub-toolbar. 133cdf0e10cSrcweir </p> 134cdf0e10cSrcweir */ 135cdf0e10cSrcweir [optional] interface ::com::sun::star::frame::XSubToolbarController; 136cdf0e10cSrcweir}; 137cdf0e10cSrcweir 138cdf0e10cSrcweir//============================================================================= 139cdf0e10cSrcweir 140cdf0e10cSrcweir}; }; }; }; 141cdf0e10cSrcweir 142cdf0e10cSrcweir#endif 143