1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_ui_ConfigurableUIElement_idl__
25#define __com_sun_star_ui_ConfigurableUIElement_idl__
26
27#ifndef __com_sun_star_ui_UIElement_idl__
28#include <com/sun/star/ui/UIElement.idl>
29#endif
30
31#ifndef __com_sun_star_ui_XUIElementSettings_idl__
32#include <com/sun/star/ui/XUIElementSettings.idl>
33#endif
34
35#ifndef __com_sun_star_beans_XPropertySet_idl__
36#include <com/sun/star/beans/XPropertySet.idl>
37#endif
38
39#ifndef __com_sun_star_ui_UIElementType_idl__
40#include <com/sun/star/ui/UIElementType.idl>
41#endif
42
43#ifndef __com_sun_star_ui_XUIConfigurationManager_idl__
44#include <com/sun/star/ui/XUIConfigurationManager.idl>
45#endif
46
47#ifndef __com_sun_star_frame_XFrame_idl__
48#include <com/sun/star/frame/XFrame.idl>
49#endif
50
51#ifndef __com_sun_star_lang_XInitialization_idl__
52#include <com/sun/star/lang/XInitialization.idl>
53#endif
54
55//=============================================================================
56
57module com { module sun { module star { module ui {
58
59//=============================================================================
60
61/** specifies a configurable user interface element that supports persistence.
62
63    <p>
64    Configurable user interface elements are:
65    <ul>
66        <li>menubar</li>
67        <li>popupmenu<li>
68        <li>toolbar</li>
69        <li>statusbar</li>
70    </ul>
71    </p>
72
73    @since OpenOffice 2.0
74*/
75
76service ConfigurableUIElement
77{
78    /** provides properties and functions to initialize and identify a user
79        interface element.
80
81        <p>
82        A configurable user interface element must be initialized using
83        <member scope=com::sun::star::lang>XInitialization::initialize</member> before
84        it can be used. The following properties must be provided:
85        <ul>
86            <li><b>ResourceURL</b><br>specifies the user interface name.</li>
87            <li><b>Frame</b><br>specifies to which frame instance the user interface belongs to.</li>
88            <li><b>ConfigurationSource</b><br>specifies to which configuration manager a user interface
89            element instance is bound to.</li>
90        </ul>
91        </p>
92
93        A user interface element factory creates and initializes every user interface element
94        correctly.
95
96        @see com::sun::star::ui::UIElementFactory
97    */
98    service UIElement;
99
100    /** provides functions to retrieve and change the user interface element structure data and to
101        update its visible representation.
102    */
103    interface com::sun::star::ui::XUIElementSettings;
104
105    /** specifies if the user interface element stores changes of its structure to its creator
106        source defined by the property <member>ConfigurationSource</member>. */
107    [property] boolean Persistent;
108
109    /** specifies the configuration source of this user interface element.
110
111        <p>
112        If the property <member>Persistent</member> is <TRUE/> changes on the structure of
113        the user interface element are written back to configuration source. When this property is
114        changed, afterwards <member>XUIElementSettings::updateSettings</member>  must be called so
115        the user interface element tries to retrieve its settings from the new user interface
116        configuration manager.
117        </p>
118    */
119    [property] com::sun::star::ui::XUIConfigurationManager ConfigurationSource;
120};
121
122}; }; }; };
123
124#endif
125