1d1766043SAndrew Rist/**************************************************************
2d1766043SAndrew Rist *
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_ui_XUIElementFactory_idl__
25cdf0e10cSrcweir#define __com_sun_star_ui_XUIElementFactory_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_ui_XUIElement_idl__
28cdf0e10cSrcweir#include <com/sun/star/ui/XUIElement.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef __com_sun_star_container_NoSuchElementException_idl__
32cdf0e10cSrcweir#include <com/sun/star/container/NoSuchElementException.idl>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir
35cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
36cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir
39cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__
40cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl>
41cdf0e10cSrcweir#endif
42cdf0e10cSrcweir
43cdf0e10cSrcweir//=============================================================================
44cdf0e10cSrcweir
45cdf0e10cSrcweirmodule com { module sun { module star { module ui {
46cdf0e10cSrcweir
47cdf0e10cSrcweir//=============================================================================
48cdf0e10cSrcweir
49cdf0e10cSrcweir/** specifies a user interface element factory that can create and initialize
50cdf0e10cSrcweir    user interface elements.
51cdf0e10cSrcweir
52cdf0e10cSrcweir    <p>
53cdf0e10cSrcweir    User interface element factories must be registered at a
54cdf0e10cSrcweir    <type>UIElementFactoryManager</type> service to provide access to itself.
55cdf0e10cSrcweir
56cdf0e10cSrcweir    Currently the following user interface element types are defined:
57cdf0e10cSrcweir    <ul>
58cdf0e10cSrcweir        <li><b>menubar</b>A configurable user interface element.</li>
59cdf0e10cSrcweir        <li><b>popupmenu</b>A configurable user interface element.</li>
60cdf0e10cSrcweir        <li><b>toolbar</b>A configurable user interface element.</li>
61cdf0e10cSrcweir        <li><b>statusbar</b>A configurable user interface element.</li>
62cdf0e10cSrcweir        <li><b>floater</b>A basic user interface element.</li>
63cdf0e10cSrcweir    </ul>
64cdf0e10cSrcweir    </p>
65cdf0e10cSrcweir
66*f431c806SJürgen Schmidt    @since OpenOffice 2.0
67cdf0e10cSrcweir*/
68cdf0e10cSrcweir
69cdf0e10cSrcweirpublished interface XUIElementFactory : ::com::sun::star::uno::XInterface
70cdf0e10cSrcweir{
71cdf0e10cSrcweir    /** creates a new instances of a specific user interface element.
72cdf0e10cSrcweir
73cdf0e10cSrcweir        @param ResourceURL
74cdf0e10cSrcweir            specifies which unique user interface element should be created
75cdf0e10cSrcweir            by the factory. A resourcce URL must meet the following syntax:
76cdf0e10cSrcweir            "private:resource/$type/$name. It is only allowed to use ascii
77cdf0e10cSrcweir            characters for type and name. This argument must not be empty to
78cdf0e10cSrcweir            have a working user interface element instance.The implementation
79cdf0e10cSrcweir            can throw an
80cdf0e10cSrcweir            <type scope="com::sun::star::container">NoSuchElementException</type>
81cdf0e10cSrcweir            if it doesn't know how to create the request user interface
82cdf0e10cSrcweir            element.
83cdf0e10cSrcweir
84cdf0e10cSrcweir        @param Args
85cdf0e10cSrcweir            The following arguments are supported:
86cdf0e10cSrcweir            <ul>
87cdf0e10cSrcweir                <li><b>Frame</b><br>
88cdf0e10cSrcweir                    specifies the <type scope="com::sun::star::frame">XFrame</type>
89cdf0e10cSrcweir                    instance to which the user interface element belongs to. To
90cdf0e10cSrcweir                    create a configurable user interface element the frame
91cdf0e10cSrcweir                    instance must contain a visible component. Otherwise it is
92cdf0e10cSrcweir                    not possible to determine the correct user interface
93cdf0e10cSrcweir                    configuration manager. This argument is <b>mandatory</b> to
94cdf0e10cSrcweir                    have a working configurable user interface element instance.
95cdf0e10cSrcweir                </li>
96cdf0e10cSrcweir                <li><b>ParentWindow</b><br/>
97cdf0e10cSrcweir                    specifies a parent window to use for the window(s) representing
98cdf0e10cSrcweir                    the UI element. Depending on the concrete UI element type, this parameter
99cdf0e10cSrcweir                    might be required or ignored by an implementation.
100cdf0e10cSrcweir                </li>
101cdf0e10cSrcweir                <li><b>Persistent</b><br>specifies if changes to a configurable
102cdf0e10cSrcweir                    user interface element should be persistent. This is an
103cdf0e10cSrcweir                    optional argument. The default value is <TRUE/>.</li>
104cdf0e10cSrcweir            </ul>
105cdf0e10cSrcweir
106cdf0e10cSrcweir        <p>
107cdf0e10cSrcweir        An implementation is responsible to initialize every newly created user
108cdf0e10cSrcweir        interface element if the necessary properties are provided. Especially
109cdf0e10cSrcweir        it must connect a configurable user interface element to the correct user
110cdf0e10cSrcweir        interface configuration manager. Without this connection the configurable
111cdf0e10cSrcweir        user interface element cannot retrieve its structure data and changes to
112cdf0e10cSrcweir        the user interface element structure won't be persistent. It is up to the
113cdf0e10cSrcweir        implementation to throw an
114cdf0e10cSrcweir        <type scope="com::sun::star::lang">IllegalArgumentException</type>
115cdf0e10cSrcweir        if it cannot create a user interface element with the provided arguments.
116cdf0e10cSrcweir
117cdf0e10cSrcweir        @see ConfigurableUIElement
118cdf0e10cSrcweir        @see UIElement
119cdf0e10cSrcweir        </p>
120cdf0e10cSrcweir    */
121cdf0e10cSrcweir    ::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 );
122cdf0e10cSrcweir};
123cdf0e10cSrcweir
124cdf0e10cSrcweir}; }; }; };
125cdf0e10cSrcweir
126cdf0e10cSrcweir#endif
127