1*b1cdbd2cSJim Jagielski/************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_ui_XUIElementFactory_idl__ 25*b1cdbd2cSJim Jagielski#define __com_sun_star_ui_XUIElementFactory_idl__ 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_ui_XUIElement_idl__ 28*b1cdbd2cSJim Jagielski#include <com/sun/star/ui/XUIElement.idl> 29*b1cdbd2cSJim Jagielski#endif 30*b1cdbd2cSJim Jagielski 31*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_container_NoSuchElementException_idl__ 32*b1cdbd2cSJim Jagielski#include <com/sun/star/container/NoSuchElementException.idl> 33*b1cdbd2cSJim Jagielski#endif 34*b1cdbd2cSJim Jagielski 35*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 36*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/IllegalArgumentException.idl> 37*b1cdbd2cSJim Jagielski#endif 38*b1cdbd2cSJim Jagielski 39*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_beans_PropertyValue_idl__ 40*b1cdbd2cSJim Jagielski#include <com/sun/star/beans/PropertyValue.idl> 41*b1cdbd2cSJim Jagielski#endif 42*b1cdbd2cSJim Jagielski 43*b1cdbd2cSJim Jagielski//============================================================================= 44*b1cdbd2cSJim Jagielski 45*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module ui { 46*b1cdbd2cSJim Jagielski 47*b1cdbd2cSJim Jagielski//============================================================================= 48*b1cdbd2cSJim Jagielski 49*b1cdbd2cSJim Jagielski/** specifies a user interface element factory that can create and initialize 50*b1cdbd2cSJim Jagielski user interface elements. 51*b1cdbd2cSJim Jagielski 52*b1cdbd2cSJim Jagielski <p> 53*b1cdbd2cSJim Jagielski User interface element factories must be registered at a 54*b1cdbd2cSJim Jagielski <type>UIElementFactoryManager</type> service to provide access to itself. 55*b1cdbd2cSJim Jagielski 56*b1cdbd2cSJim Jagielski Currently the following user interface element types are defined: 57*b1cdbd2cSJim Jagielski <ul> 58*b1cdbd2cSJim Jagielski <li><b>menubar</b>A configurable user interface element.</li> 59*b1cdbd2cSJim Jagielski <li><b>popupmenu</b>A configurable user interface element.</li> 60*b1cdbd2cSJim Jagielski <li><b>toolbar</b>A configurable user interface element.</li> 61*b1cdbd2cSJim Jagielski <li><b>statusbar</b>A configurable user interface element.</li> 62*b1cdbd2cSJim Jagielski <li><b>floater</b>A basic user interface element.</li> 63*b1cdbd2cSJim Jagielski </ul> 64*b1cdbd2cSJim Jagielski </p> 65*b1cdbd2cSJim Jagielski 66*b1cdbd2cSJim Jagielski @since OpenOffice 2.0 67*b1cdbd2cSJim Jagielski*/ 68*b1cdbd2cSJim Jagielski 69*b1cdbd2cSJim Jagielskipublished interface XUIElementFactory : ::com::sun::star::uno::XInterface 70*b1cdbd2cSJim Jagielski{ 71*b1cdbd2cSJim Jagielski /** creates a new instances of a specific user interface element. 72*b1cdbd2cSJim Jagielski 73*b1cdbd2cSJim Jagielski @param ResourceURL 74*b1cdbd2cSJim Jagielski specifies which unique user interface element should be created 75*b1cdbd2cSJim Jagielski by the factory. A resourcce URL must meet the following syntax: 76*b1cdbd2cSJim Jagielski "private:resource/$type/$name. It is only allowed to use ascii 77*b1cdbd2cSJim Jagielski characters for type and name. This argument must not be empty to 78*b1cdbd2cSJim Jagielski have a working user interface element instance.The implementation 79*b1cdbd2cSJim Jagielski can throw an 80*b1cdbd2cSJim Jagielski <type scope="com::sun::star::container">NoSuchElementException</type> 81*b1cdbd2cSJim Jagielski if it doesn't know how to create the request user interface 82*b1cdbd2cSJim Jagielski element. 83*b1cdbd2cSJim Jagielski 84*b1cdbd2cSJim Jagielski @param Args 85*b1cdbd2cSJim Jagielski The following arguments are supported: 86*b1cdbd2cSJim Jagielski <ul> 87*b1cdbd2cSJim Jagielski <li><b>Frame</b><br> 88*b1cdbd2cSJim Jagielski specifies the <type scope="com::sun::star::frame">XFrame</type> 89*b1cdbd2cSJim Jagielski instance to which the user interface element belongs to. To 90*b1cdbd2cSJim Jagielski create a configurable user interface element the frame 91*b1cdbd2cSJim Jagielski instance must contain a visible component. Otherwise it is 92*b1cdbd2cSJim Jagielski not possible to determine the correct user interface 93*b1cdbd2cSJim Jagielski configuration manager. This argument is <b>mandatory</b> to 94*b1cdbd2cSJim Jagielski have a working configurable user interface element instance. 95*b1cdbd2cSJim Jagielski </li> 96*b1cdbd2cSJim Jagielski <li><b>ParentWindow</b><br/> 97*b1cdbd2cSJim Jagielski specifies a parent window to use for the window(s) representing 98*b1cdbd2cSJim Jagielski the UI element. Depending on the concrete UI element type, this parameter 99*b1cdbd2cSJim Jagielski might be required or ignored by an implementation. 100*b1cdbd2cSJim Jagielski </li> 101*b1cdbd2cSJim Jagielski <li><b>Persistent</b><br>specifies if changes to a configurable 102*b1cdbd2cSJim Jagielski user interface element should be persistent. This is an 103*b1cdbd2cSJim Jagielski optional argument. The default value is <TRUE/>.</li> 104*b1cdbd2cSJim Jagielski </ul> 105*b1cdbd2cSJim Jagielski 106*b1cdbd2cSJim Jagielski <p> 107*b1cdbd2cSJim Jagielski An implementation is responsible to initialize every newly created user 108*b1cdbd2cSJim Jagielski interface element if the necessary properties are provided. Especially 109*b1cdbd2cSJim Jagielski it must connect a configurable user interface element to the correct user 110*b1cdbd2cSJim Jagielski interface configuration manager. Without this connection the configurable 111*b1cdbd2cSJim Jagielski user interface element cannot retrieve its structure data and changes to 112*b1cdbd2cSJim Jagielski the user interface element structure won't be persistent. It is up to the 113*b1cdbd2cSJim Jagielski implementation to throw an 114*b1cdbd2cSJim Jagielski <type scope="com::sun::star::lang">IllegalArgumentException</type> 115*b1cdbd2cSJim Jagielski if it cannot create a user interface element with the provided arguments. 116*b1cdbd2cSJim Jagielski 117*b1cdbd2cSJim Jagielski @see ConfigurableUIElement 118*b1cdbd2cSJim Jagielski @see UIElement 119*b1cdbd2cSJim Jagielski </p> 120*b1cdbd2cSJim Jagielski */ 121*b1cdbd2cSJim Jagielski ::com::sun::star::ui::XUIElement createUIElement( [in] string ResourceURL, [in] sequence< com::sun::star::beans::PropertyValue > Args ) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::IllegalArgumentException ); 122*b1cdbd2cSJim Jagielski}; 123*b1cdbd2cSJim Jagielski 124*b1cdbd2cSJim Jagielski}; }; }; }; 125*b1cdbd2cSJim Jagielski 126*b1cdbd2cSJim Jagielski#endif 127