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_XUIConfigurationManager_idl__
25cdf0e10cSrcweir#define __com_sun_star_ui_XUIConfigurationManager_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_container_XIndexContainer_idl__
28cdf0e10cSrcweir#include <com/sun/star/container/XIndexContainer.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef __com_sun_star_container_XIndexAccess_idl__
32cdf0e10cSrcweir#include <com/sun/star/container/XIndexAccess.idl>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir
35cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__
36cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir
39cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__
40cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl>
41cdf0e10cSrcweir#endif
42cdf0e10cSrcweir
43cdf0e10cSrcweir#ifndef __com_sun_star_ui_XUIConfigurationListener_idl__
44cdf0e10cSrcweir#include <com/sun/star/ui/XUIConfigurationListener.idl>
45cdf0e10cSrcweir#endif
46cdf0e10cSrcweir
47cdf0e10cSrcweir#ifndef __com_sun_star_container_ElementExistException_idl__
48cdf0e10cSrcweir#include <com/sun/star/container/ElementExistException.idl>
49cdf0e10cSrcweir#endif
50cdf0e10cSrcweir
51cdf0e10cSrcweir#ifndef __com_sun_star_container_NoSuchElementException_idl__
52cdf0e10cSrcweir#include <com/sun/star/container/NoSuchElementException.idl>
53cdf0e10cSrcweir#endif
54cdf0e10cSrcweir
55cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
56cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
57cdf0e10cSrcweir#endif
58cdf0e10cSrcweir
59cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalAccessException_idl__
60cdf0e10cSrcweir#include <com/sun/star/lang/IllegalAccessException.idl>
61cdf0e10cSrcweir#endif
62cdf0e10cSrcweir
63cdf0e10cSrcweirmodule com { module sun { module star { module ui {
64cdf0e10cSrcweir
65cdf0e10cSrcweir/** specifies a user interface configuration manager interface which
66cdf0e10cSrcweir    controls the structure of all customizable user interface
67cdf0e10cSrcweir    elements.
68cdf0e10cSrcweir
69*f431c806SJürgen Schmidt    @since OpenOffice 2.0
70cdf0e10cSrcweir*/
71cdf0e10cSrcweir
72cdf0e10cSrcweirpublished interface XUIConfigurationManager : ::com::sun::star::uno::XInterface
73cdf0e10cSrcweir{
74cdf0e10cSrcweir    /** resets the configuration manager to the default user interface
75cdf0e10cSrcweir        configuration data.
76cdf0e10cSrcweir        <p>
77cdf0e10cSrcweir        This means that all user interface configuration data of the
78cdf0e10cSrcweir        instance will be removed. A module based user interface
79cdf0e10cSrcweir        configuration manager removes user defined elements, but set all
80cdf0e10cSrcweir        other elements back to default. It is not possible to remove
81cdf0e10cSrcweir        default elements from a module user interface configuration
82cdf0e10cSrcweir        manager.
83cdf0e10cSrcweir        </p>
84cdf0e10cSrcweir    */
85cdf0e10cSrcweir    void reset();
86cdf0e10cSrcweir
87cdf0e10cSrcweir    /** retrieves information about all user interface elements within
88cdf0e10cSrcweir        the user interface configuration manager.
89cdf0e10cSrcweir
90cdf0e10cSrcweir        @param ElementType
91cdf0e10cSrcweir            makes it possible to narrow the result set to only one type
92cdf0e10cSrcweir            of user interface elements. If all user interface element
93cdf0e10cSrcweir            types should be returned
94cdf0e10cSrcweir            <value scope=com::sun::star::ui>UIElementType::UNKNOWN</value>
95cdf0e10cSrcweir            must be provided.
96cdf0e10cSrcweir
97cdf0e10cSrcweir        @return
98cdf0e10cSrcweir            returns all user interface elements within the user interface
99cdf0e10cSrcweir            configuration manager that meet the given ElementType
100cdf0e10cSrcweir            specification. <p>The following
101cdf0e10cSrcweir            <type scope="com::sun::star::beans">PropertyValue</type> entries
102cdf0e10cSrcweir            are defined inside the sequence for every user interface element.
103cdf0e10cSrcweir            <ul>
104cdf0e10cSrcweir                <li><b>ResourceURL<b/>specifies the unique resource URL for
105cdf0e10cSrcweir                the user interface element.</li>
106cdf0e10cSrcweir                <li><b>UIName<b/>specifies the user interface name for the
107cdf0e10cSrcweir                user interface element. Not all user interface elements have
108cdf0e10cSrcweir                set UIName. At least menubars do not.</li>
109cdf0e10cSrcweir            </ul>
110cdf0e10cSrcweir            <p>
111cdf0e10cSrcweir
112cdf0e10cSrcweir        @see UIElementType
113cdf0e10cSrcweir    */
114cdf0e10cSrcweir    sequence< sequence< com::sun::star::beans::PropertyValue > > getUIElementsInfo( [in] short ElementType ) raises ( com::sun::star::lang::IllegalArgumentException );
115cdf0e10cSrcweir
116cdf0e10cSrcweir    /** creates an empty settings data container.
117cdf0e10cSrcweir
118cdf0e10cSrcweir        @return
119cdf0e10cSrcweir            an empty user interface element settings data container, which
120cdf0e10cSrcweir            implements <type>UIElementSettings</type>.
121cdf0e10cSrcweir    */
122cdf0e10cSrcweir    ::com::sun::star::container::XIndexContainer createSettings();
123cdf0e10cSrcweir
124cdf0e10cSrcweir    /** determines if the settings of a user interface element is part the
125cdf0e10cSrcweir        user interface configuration manager.
126cdf0e10cSrcweir
127cdf0e10cSrcweir        @param ResourceURL
128cdf0e10cSrcweir            a resource URL which identifies the user interface element. A
129cdf0e10cSrcweir            resourcce URL must meet the following syntax:
130cdf0e10cSrcweir            "private:resource/$type/$name. It is only allowed to use ascii
131cdf0e10cSrcweir            characters for type and name.
132cdf0e10cSrcweir
133cdf0e10cSrcweir        @return
134cdf0e10cSrcweir            <TRUE/> if settings have been found, otherwise <FALSE/>.
135cdf0e10cSrcweir    */
136cdf0e10cSrcweir    boolean hasSettings( [in] string ResourceURL ) raises ( com::sun::star::lang::IllegalArgumentException );
137cdf0e10cSrcweir
138cdf0e10cSrcweir    /** retrieves the settings of a user interface element.
139cdf0e10cSrcweir
140cdf0e10cSrcweir        @param ResourceURL
141cdf0e10cSrcweir            a resource URL which identifies the user interface element. A
142cdf0e10cSrcweir            resourcce URL must meet the following syntax:
143cdf0e10cSrcweir            "private:resource/$type/$name. It is only allowed to use ascii
144cdf0e10cSrcweir            characters for type and name.
145cdf0e10cSrcweir
146cdf0e10cSrcweir        @param bWriteable
147cdf0e10cSrcweir            must be <TRUE/> if the retrieved settings should be a writeable.
148cdf0e10cSrcweir            Otherwise <FALSE/> should be provided to get a shareable reference
149cdf0e10cSrcweir            to the settings data.
150cdf0e10cSrcweir
151cdf0e10cSrcweir        @return
152cdf0e10cSrcweir            settings data of an existing user interface element, which
153cdf0e10cSrcweir            implements <type>UIElementSettings</type>. If the settings data
154cdf0e10cSrcweir            cannot be found a
155cdf0e10cSrcweir            <type scope="com::sun::star::container">NoSuchElementException</type>
156cdf0e10cSrcweir            is thrown.  If the <member>ResourceURL</member> is not valid or
157cdf0e10cSrcweir            describes an unknown type a
158cdf0e10cSrcweir            <type scope="com::sun::star::lang">IllegalArgumentException</type>
159cdf0e10cSrcweir            is thrown.
160cdf0e10cSrcweir    */
161cdf0e10cSrcweir    ::com::sun::star::container::XIndexAccess getSettings( [in] string ResourceURL, [in] boolean bWriteable ) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::IllegalArgumentException );
162cdf0e10cSrcweir
163cdf0e10cSrcweir    /** replaces the settings of a user interface element with new settings.
164cdf0e10cSrcweir
165cdf0e10cSrcweir        @param ResourceURL
166cdf0e10cSrcweir            a resource URL which identifies the user interface element to
167cdf0e10cSrcweir            be replaced. If no element with the given resource URL exists a
168cdf0e10cSrcweir            <type scope="com::sun::star::container">NoSuchElementException</type>
169cdf0e10cSrcweir            is thrown.
170cdf0e10cSrcweir
171cdf0e10cSrcweir        @param aNewData
172cdf0e10cSrcweir            the new settings data of an existing user interface element, which
173cdf0e10cSrcweir            implements <type>UIElementSettings</type>.
174cdf0e10cSrcweir
175cdf0e10cSrcweir        <p>
176cdf0e10cSrcweir        If the settings data cannot be found a
177cdf0e10cSrcweir        <type scope="com::sun::star::container">NoSuchElementException</type>
178cdf0e10cSrcweir        is thrown. If the <member>ResourceURL</member> is not valid or describes
179cdf0e10cSrcweir        an unknown type a
180cdf0e10cSrcweir        <type scope="com::sun::star::lang">IllegalArgumentException</type>
181cdf0e10cSrcweir        is thrown. If the configuration manager is read-only a
182cdf0e10cSrcweir        <type scope="com::sun::star::lang">IllegalAccessException</type> is
183cdf0e10cSrcweir        thrown.
184cdf0e10cSrcweir        </p>
185cdf0e10cSrcweir    */
186cdf0e10cSrcweir    void replaceSettings( [in] string ResourceURL, [in] ::com::sun::star::container::XIndexAccess aNewData ) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IllegalAccessException );
187cdf0e10cSrcweir
188cdf0e10cSrcweir    /** removes the settings of an existing user interface element.
189cdf0e10cSrcweir
190cdf0e10cSrcweir        @param ResourceURL
191cdf0e10cSrcweir            a resource URL which identifies the user interface element settings
192cdf0e10cSrcweir            to be removed.
193cdf0e10cSrcweir
194cdf0e10cSrcweir        <p>
195cdf0e10cSrcweir        If the settings data cannot be found a
196cdf0e10cSrcweir        <type scope="com::sun::star::container">NoSuchElementException</type> is
197cdf0e10cSrcweir        thrown. If the <member>ResourceURL</member> is not valid or describes an
198cdf0e10cSrcweir        unknown type a <type scope="com::sun::star::lang">IllegalArgumentException</type>
199cdf0e10cSrcweir        is thrown. If the configuration manager is read-only a
200cdf0e10cSrcweir        <type scope="com::sun::star::lang">IllegalAccessException</type> is thrown.
201cdf0e10cSrcweir        </p>
202cdf0e10cSrcweir    */
203cdf0e10cSrcweir    void removeSettings( [in] string ResourceURL ) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IllegalAccessException );
204cdf0e10cSrcweir
205cdf0e10cSrcweir    /** inserts the settings of a new user interface element.
206cdf0e10cSrcweir
207cdf0e10cSrcweir        @param ResourceURL
208cdf0e10cSrcweir            a resource URL which identifies the new user interface element.
209cdf0e10cSrcweir
210cdf0e10cSrcweir        @param aNewData
211cdf0e10cSrcweir            the settings data of the new user interface element, which implements
212cdf0e10cSrcweir            <type>UIElementSettings</type>.
213cdf0e10cSrcweir
214cdf0e10cSrcweir        <p>
215cdf0e10cSrcweir        If the settings data is already present a
216cdf0e10cSrcweir        <type scope="com::sun::star::container">ElementExistException</type>
217cdf0e10cSrcweir        is thrown. If the <member>ResourceURL</member> is not valid or describes
218cdf0e10cSrcweir        an unknown type a <type scope="com::sun::star::lang">IllegalArgumentException</type>
219cdf0e10cSrcweir        is thrown. If the configuration manager is read-only a
220cdf0e10cSrcweir        <type scope="com::sun::star::lang">IllegalAccessException</type> is thrown.
221cdf0e10cSrcweir        </p>
222cdf0e10cSrcweir    */
223cdf0e10cSrcweir    void insertSettings( [in] string NewResourceURL, [in] ::com::sun::star::container::XIndexAccess aNewData ) raises ( com::sun::star::container::ElementExistException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IllegalAccessException );
224cdf0e10cSrcweir
225cdf0e10cSrcweir    /** retrieves the image manager from the user interface configuration
226cdf0e10cSrcweir        manager.
227cdf0e10cSrcweir
228cdf0e10cSrcweir        <p>
229cdf0e10cSrcweir        Every user interface configuration manager has one image manager
230cdf0e10cSrcweir        instance which controls all images of a module or document.
231cdf0e10cSrcweir        </p>
232cdf0e10cSrcweir
233cdf0e10cSrcweir        @return
234cdf0e10cSrcweir            the image manager of the user interface configuration manager.
235cdf0e10cSrcweir    */
236cdf0e10cSrcweir    com::sun::star::uno::XInterface getImageManager();
237cdf0e10cSrcweir
238cdf0e10cSrcweir    /** retrieves the keyboard short cut manager from the user interface
239cdf0e10cSrcweir        configuration manager.
240cdf0e10cSrcweir
241cdf0e10cSrcweir        <p>
242cdf0e10cSrcweir        Every user interface configuration manager has one keyboard short cut
243cdf0e10cSrcweir        manager instance which controls all short cuts of a module or document.
244cdf0e10cSrcweir        </p>
245cdf0e10cSrcweir
246cdf0e10cSrcweir        @return
247cdf0e10cSrcweir            the short cut manager of the user interface configuration manager.
248cdf0e10cSrcweir    */
249cdf0e10cSrcweir    com::sun::star::uno::XInterface getShortCutManager();
250cdf0e10cSrcweir
251cdf0e10cSrcweir    /** retrieves the events manager from the user interface configuration manager.
252cdf0e10cSrcweir
253cdf0e10cSrcweir        <p>
254cdf0e10cSrcweir        Every user interface configuration manager has one events manager
255cdf0e10cSrcweir        instance which controls the mapping of events to script URLs of a module
256cdf0e10cSrcweir        or document.
257cdf0e10cSrcweir        </p>
258cdf0e10cSrcweir
259cdf0e10cSrcweir        @return
260cdf0e10cSrcweir            the events manager of the user interface configuration
261cdf0e10cSrcweir            manager, if one exists.
262cdf0e10cSrcweir    */
263cdf0e10cSrcweir    com::sun::star::uno::XInterface getEventsManager();
264cdf0e10cSrcweir};
265cdf0e10cSrcweir
266cdf0e10cSrcweir//=============================================================================
267cdf0e10cSrcweir
268cdf0e10cSrcweir}; }; }; };
269cdf0e10cSrcweir
270cdf0e10cSrcweir#endif
271