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_XUIElementFactoryRegistration_idl__ 25cdf0e10cSrcweir#define __com_sun_star_frame_XUIElementFactoryRegistration_idl__ 26cdf0e10cSrcweir 27cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__ 28cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl> 29cdf0e10cSrcweir#endif 30cdf0e10cSrcweir 31cdf0e10cSrcweir#ifndef __com_sun_star_ui_XUIElementFactory_idl__ 32cdf0e10cSrcweir#include <com/sun/star/ui/XUIElementFactory.idl> 33cdf0e10cSrcweir#endif 34cdf0e10cSrcweir 35cdf0e10cSrcweir#ifndef __com_sun_star_container_ElementExistException_idl__ 36cdf0e10cSrcweir#include <com/sun/star/container/ElementExistException.idl> 37cdf0e10cSrcweir#endif 38cdf0e10cSrcweir 39cdf0e10cSrcweir#ifndef __com_sun_star_container_NoSuchElementException_idl__ 40cdf0e10cSrcweir#include <com/sun/star/container/NoSuchElementException.idl> 41cdf0e10cSrcweir#endif 42cdf0e10cSrcweir 43cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__ 44cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl> 45cdf0e10cSrcweir#endif 46cdf0e10cSrcweir 47cdf0e10cSrcweir//============================================================================= 48cdf0e10cSrcweir 49cdf0e10cSrcweirmodule com { module sun { module star { module ui { 50cdf0e10cSrcweir 51cdf0e10cSrcweir//============================================================================= 52cdf0e10cSrcweir 53cdf0e10cSrcweir/** is used to query, register and deregister user interface element factories. 54cdf0e10cSrcweir 55cdf0e10cSrcweir <p> 56cdf0e10cSrcweir A user interface element factory is registered for a set of three properties. 57cdf0e10cSrcweir <ul> 58cdf0e10cSrcweir <li><b>Type</b>a string that identifies a type of a user interface element.</li> 59cdf0e10cSrcweir <li><b>Name</b>a string that identifies a single user interface element within a type class.</li> 60cdf0e10cSrcweir <li><b>Module</b>a string that identifies a single module of OpenOffice.</li> 61cdf0e10cSrcweir <ul> 62cdf0e10cSrcweir A combination of these three property values can uniquely identifiy every user interface 63cdf0e10cSrcweir element within OpenOffice. 64cdf0e10cSrcweir 65cdf0e10cSrcweir Currently the following user interface element types are defined: 66cdf0e10cSrcweir <ul> 67cdf0e10cSrcweir <li><b>menubar</b></li> 68cdf0e10cSrcweir <li><b>popupmenu</b></li> 69cdf0e10cSrcweir <li><b>toolbar</b></li> 70cdf0e10cSrcweir <li><b>statusbar</b></li> 71cdf0e10cSrcweir <li><b>floater</b></li> 72cdf0e10cSrcweir </ul> 73cdf0e10cSrcweir </p> 74cdf0e10cSrcweir 75*f431c806SJürgen Schmidt @since OpenOffice 2.0 76cdf0e10cSrcweir */ 77cdf0e10cSrcweir 78cdf0e10cSrcweirinterface XUIElementFactoryRegistration : com::sun::star::uno::XInterface 79cdf0e10cSrcweir{ 80cdf0e10cSrcweir /** function to retrieve a list of all registered user interface element factories 81cdf0e10cSrcweir 82cdf0e10cSrcweir @returns 83cdf0e10cSrcweir a sequence of sequence of propert values which describe every registered 84cdf0e10cSrcweir user interface element factory.<br/> 85cdf0e10cSrcweir 86cdf0e10cSrcweir The following properties are defined: 87cdf0e10cSrcweir <ul> 88cdf0e10cSrcweir <li><b>Type</b>a string property that identifies the type of the user interface 89cdf0e10cSrcweir element which this factory can create.</li> 90cdf0e10cSrcweir <li><b>Name</b>an optional string property which identifies a single user interface 91cdf0e10cSrcweir element within a type class which this factory can create. If this property is not 92cdf0e10cSrcweir returned, the factory is a generic factory for all user interface elements of the 93cdf0e10cSrcweir same type.</li> 94cdf0e10cSrcweir <li><b>Module</b>an optional string property that specifies to which module this factory is 95cdf0e10cSrcweir bound to. If this property is not returned, the factory is a generic factory.</li> 96cdf0e10cSrcweir </ul> 97cdf0e10cSrcweir */ 98cdf0e10cSrcweir sequence< sequence< com::sun::star::beans::PropertyValue > > getRegisteredFactories(); 99cdf0e10cSrcweir 100cdf0e10cSrcweir /** function to retrieve a previously registered user interface element factory. 101cdf0e10cSrcweir 102cdf0e10cSrcweir @returns 103cdf0e10cSrcweir a reference to a registered user interface element factory if a factory has been 104cdf0e10cSrcweir found. An empty reference when no factory has been found. 105cdf0e10cSrcweir <b>The defined search order of factories must be from special to generic ones.</b> 106cdf0e10cSrcweir 107cdf0e10cSrcweir @param ResourceURL 108cdf0e10cSrcweir a resource URL which identifies a user interface element. A resource URL uses the 109cdf0e10cSrcweir following syntax: "private:resource/$type/$name". It is only allowed to use ascii 110cdf0e10cSrcweir characters for type and name. 111cdf0e10cSrcweir 112cdf0e10cSrcweir @param ModuleName 113cdf0e10cSrcweir an optional module identifier. This value can remain empty, if a generic factory is requested. 114cdf0e10cSrcweir The module identifier can be retrieved from the <type scope="com::sun::star::frame">ModuleManager</type> service. 115cdf0e10cSrcweir */ 116cdf0e10cSrcweir ::com::sun::star::ui::XUIElementFactory getFactory( [in] string ResourceURL, [in] string ModuleIdentifier ); 117cdf0e10cSrcweir 118cdf0e10cSrcweir /** function to register a user interface element factory. 119cdf0e10cSrcweir 120cdf0e10cSrcweir @param aType 121cdf0e10cSrcweir a string that identifies a type of a user interface element. Currently the following types 122cdf0e10cSrcweir are supported: 123cdf0e10cSrcweir <ul> 124cdf0e10cSrcweir <li><b>menubar</b></li> 125cdf0e10cSrcweir <li><b>toolbar</b></li> 126cdf0e10cSrcweir <li><b>statusbar</b></li> 127cdf0e10cSrcweir </ul> 128cdf0e10cSrcweir 129cdf0e10cSrcweir @param aName 130cdf0e10cSrcweir an optional name of a single user interface element. This name must be unique within a user 131cdf0e10cSrcweir interface element type class. This value can remain empty if no special factory for a single 132cdf0e10cSrcweir user interface element is needed. 133cdf0e10cSrcweir 134cdf0e10cSrcweir @param aModuleIdentifier 135cdf0e10cSrcweir an optional module identifier that can be used to register a factory only for a single module. This value 136cdf0e10cSrcweir can remain empty if no special factory for a single module is needed. The module identifier can be retrieved 137cdf0e10cSrcweir from the <type scope="com::sun::star::frame">ModuleManager</type> service. 138cdf0e10cSrcweir 139cdf0e10cSrcweir @param aFactoryImplementationName 140cdf0e10cSrcweir a UNO implementation name that can be used by an implementation to create a factory instance. 141cdf0e10cSrcweir */ 142cdf0e10cSrcweir void registerFactory( [in] string aType, [in] string aName, [in] string aModuleIdentifier, [in] string aFactoryImplementationName ) raises (com::sun::star::container::ElementExistException); 143cdf0e10cSrcweir 144cdf0e10cSrcweir /** function to remove a previously defined user interface element factory. 145cdf0e10cSrcweir 146cdf0e10cSrcweir @param aType 147cdf0e10cSrcweir a string that identifies a type of a user interface element. Currently the following types 148cdf0e10cSrcweir are supported: 149cdf0e10cSrcweir <ul> 150cdf0e10cSrcweir <li><b>menubar</b></li> 151cdf0e10cSrcweir <li><b>toolbar</b></li> 152cdf0e10cSrcweir <li><b>statusbar</b></li> 153cdf0e10cSrcweir </ul> 154cdf0e10cSrcweir 155cdf0e10cSrcweir @param aName 156cdf0e10cSrcweir an optional name of a single user interface element. This name must be unique within a user 157cdf0e10cSrcweir interface element type class. This value can remain empty if no special factory for a single 158cdf0e10cSrcweir user interface element should be deregistered. 159cdf0e10cSrcweir 160cdf0e10cSrcweir @param aModuleName 161cdf0e10cSrcweir an optional module name that can be used to deregister a factory only for a single module. This value 162cdf0e10cSrcweir can remain empty if not a module based factory should be deregisted. The module identifier can be retrieved 163cdf0e10cSrcweir from the <type scope="com::sun::star::frame">ModuleManager</type> service. 164cdf0e10cSrcweir 165cdf0e10cSrcweir <p> 166cdf0e10cSrcweir <b>Using this function can be very dangerous as other implementation with OpenOffice may not be able to create their 167cdf0e10cSrcweir user interface element anymore. 168cdf0e10cSrcweir </b> 169cdf0e10cSrcweir </p> 170cdf0e10cSrcweir */ 171cdf0e10cSrcweir void deregisterFactory( [in] string aType, [in] string aName, [in] string aModuleIdentifier ) raises (com::sun::star::container::NoSuchElementException); 172cdf0e10cSrcweir}; 173cdf0e10cSrcweir 174cdf0e10cSrcweir}; }; }; }; 175cdf0e10cSrcweir 176cdf0e10cSrcweir//============================================================================= 177cdf0e10cSrcweir 178cdf0e10cSrcweir#endif 179