1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef __com_sun_star_ui_XUIConfigurationManager_idl__
29 #define __com_sun_star_ui_XUIConfigurationManager_idl__
31 #ifndef __com_sun_star_container_XIndexContainer_idl__
32 #include
<com
/sun
/star
/container
/XIndexContainer.idl
>
35 #ifndef __com_sun_star_container_XIndexAccess_idl__
36 #include
<com
/sun
/star
/container
/XIndexAccess.idl
>
39 #ifndef __com_sun_star_beans_XPropertySet_idl__
40 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
43 #ifndef __com_sun_star_beans_PropertyValue_idl__
44 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
47 #ifndef __com_sun_star_ui_XUIConfigurationListener_idl__
48 #include
<com
/sun
/star
/ui
/XUIConfigurationListener.idl
>
51 #ifndef __com_sun_star_container_ElementExistException_idl__
52 #include
<com
/sun
/star
/container
/ElementExistException.idl
>
55 #ifndef __com_sun_star_container_NoSuchElementException_idl__
56 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
59 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
60 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
63 #ifndef __com_sun_star_lang_IllegalAccessException_idl__
64 #include
<com
/sun
/star
/lang
/IllegalAccessException.idl
>
67 module com
{ module sun
{ module star
{ module ui
{
69 /** specifies a user interface configuration manager interface which
70 controls the structure of all customizable user interface
76 interface XUIConfigurationManager
: ::com
::sun
::star
::uno
::XInterface
78 /** resets the configuration manager to the default user interface
81 This means that all user interface configuration data of the
82 instance will be removed. A module based user interface
83 configuration manager removes user defined elements, but set all
84 other elements back to default. It is not possible to remove
85 default elements from a module user interface configuration
91 /** retrieves information about all user interface elements within
92 the user interface configuration manager.
95 makes it possible to narrow the result set to only one type
96 of user interface elements. If all user interface element
97 types should be returned
98 <value scope=com::sun::star::ui>UIElementType::UNKNOWN</value>
102 returns all user interface elements within the user interface
103 configuration manager that meet the given ElementType
104 specification. <p>The following
105 <type scope="com::sun::star::beans">PropertyValue</type> entries
106 are defined inside the sequence for every user interface element.
108 <li><b>ResourceURL<b/>specifies the unique resource URL for
109 the user interface element.</li>
110 <li><b>UIName<b/>specifies the user interface name for the
111 user interface element. Not all user interface elements have
112 set UIName. At least menubars do not.</li>
118 sequence
< sequence
< com
::sun
::star
::beans
::PropertyValue
> > getUIElementsInfo
( [in] short ElementType
) raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
120 /** creates an empty settings data container.
123 an empty user interface element settings data container, which
124 implements <type>UIElementSettings</type>.
126 ::com
::sun
::star
::container
::XIndexContainer createSettings
();
128 /** determines if the settings of a user interface element is part the
129 user interface configuration manager.
132 a resource URL which identifies the user interface element. A
133 resourcce URL must meet the following syntax:
134 "private:resource/$type/$name. It is only allowed to use ascii
135 characters for type and name.
138 <TRUE/> if settings have been found, otherwise <FALSE/>.
140 boolean hasSettings
( [in] string ResourceURL
) raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
142 /** retrieves the settings of a user interface element.
145 a resource URL which identifies the user interface element. A
146 resourcce URL must meet the following syntax:
147 "private:resource/$type/$name. It is only allowed to use ascii
148 characters for type and name.
151 must be <TRUE/> if the retrieved settings should be a writeable.
152 Otherwise <FALSE/> should be provided to get a shareable reference
153 to the settings data.
156 settings data of an existing user interface element, which
157 implements <type>UIElementSettings</type>. If the settings data
159 <type scope="com::sun::star::container">NoSuchElementException</type>
160 is thrown. If the <member>ResourceURL</member> is not valid or
161 describes an unknown type a
162 <type scope="com::sun::star::lang">IllegalArgumentException</type>
165 ::com
::sun
::star
::container
::XIndexAccess getSettings
( [in] string ResourceURL
, [in] boolean bWriteable
) raises
( com
::sun
::star
::container
::NoSuchElementException
, com
::sun
::star
::lang
::IllegalArgumentException
);
167 /** replaces the settings of a user interface element with new settings.
170 a resource URL which identifies the user interface element to
171 be replaced. If no element with the given resource URL exists a
172 <type scope="com::sun::star::container">NoSuchElementException</type>
176 the new settings data of an existing user interface element, which
177 implements <type>UIElementSettings</type>.
180 If the settings data cannot be found a
181 <type scope="com::sun::star::container">NoSuchElementException</type>
182 is thrown. If the <member>ResourceURL</member> is not valid or describes
184 <type scope="com::sun::star::lang">IllegalArgumentException</type>
185 is thrown. If the configuration manager is read-only a
186 <type scope="com::sun::star::lang">IllegalAccessException</type> is
190 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
);
192 /** removes the settings of an existing user interface element.
195 a resource URL which identifies the user interface element settings
199 If the settings data cannot be found a
200 <type scope="com::sun::star::container">NoSuchElementException</type> is
201 thrown. If the <member>ResourceURL</member> is not valid or describes an
202 unknown type a <type scope="com::sun::star::lang">IllegalArgumentException</type>
203 is thrown. If the configuration manager is read-only a
204 <type scope="com::sun::star::lang">IllegalAccessException</type> is thrown.
207 void removeSettings
( [in] string ResourceURL
) raises
( com
::sun
::star
::container
::NoSuchElementException
, com
::sun
::star
::lang
::IllegalArgumentException
, com
::sun
::star
::lang
::IllegalAccessException
);
209 /** inserts the settings of a new user interface element.
212 a resource URL which identifies the new user interface element.
215 the settings data of the new user interface element, which implements
216 <type>UIElementSettings</type>.
219 If the settings data is already present a
220 <type scope="com::sun::star::container">ElementExistException</type>
221 is thrown. If the <member>ResourceURL</member> is not valid or describes
222 an unknown type a <type scope="com::sun::star::lang">IllegalArgumentException</type>
223 is thrown. If the configuration manager is read-only a
224 <type scope="com::sun::star::lang">IllegalAccessException</type> is thrown.
227 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
);
229 /** retrieves the image manager from the user interface configuration
233 Every user interface configuration manager has one image manager
234 instance which controls all images of a module or document.
238 the image manager of the user interface configuration manager.
240 com
::sun
::star
::uno
::XInterface getImageManager
();
242 /** retrieves the keyboard short cut manager from the user interface
243 configuration manager.
246 Every user interface configuration manager has one keyboard short cut
247 manager instance which controls all short cuts of a module or document.
251 the short cut manager of the user interface configuration manager.
253 com
::sun
::star
::uno
::XInterface getShortCutManager
();
255 /** retrieves the events manager from the user interface configuration manager.
258 Every user interface configuration manager has one events manager
259 instance which controls the mapping of events to script URLs of a module
264 the events manager of the user interface configuration
265 manager, if one exists.
267 com
::sun
::star
::uno
::XInterface getEventsManager
();
270 //=============================================================================