1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XUIConfigurationManager.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_ui_XUIConfigurationManager_idl__
32 #define __com_sun_star_ui_XUIConfigurationManager_idl__
34 #ifndef __com_sun_star_container_XIndexContainer_idl__
35 #include
<com
/sun
/star
/container
/XIndexContainer.idl
>
38 #ifndef __com_sun_star_container_XIndexAccess_idl__
39 #include
<com
/sun
/star
/container
/XIndexAccess.idl
>
42 #ifndef __com_sun_star_beans_XPropertySet_idl__
43 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
46 #ifndef __com_sun_star_beans_PropertyValue_idl__
47 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
50 #ifndef __com_sun_star_ui_XUIConfigurationListener_idl__
51 #include
<com
/sun
/star
/ui
/XUIConfigurationListener.idl
>
54 #ifndef __com_sun_star_container_ElementExistException_idl__
55 #include
<com
/sun
/star
/container
/ElementExistException.idl
>
58 #ifndef __com_sun_star_container_NoSuchElementException_idl__
59 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
62 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
63 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
66 #ifndef __com_sun_star_lang_IllegalAccessException_idl__
67 #include
<com
/sun
/star
/lang
/IllegalAccessException.idl
>
70 module com
{ module sun
{ module star
{ module ui
{
72 /** specifies a user interface configuration manager interface which
73 controls the structure of all customizable user interface
79 interface XUIConfigurationManager
: ::com
::sun
::star
::uno
::XInterface
81 /** resets the configuration manager to the default user interface
84 This means that all user interface configuration data of the
85 instance will be removed. A module based user interface
86 configuration manager removes user defined elements, but set all
87 other elements back to default. It is not possible to remove
88 default elements from a module user interface configuration
94 /** retrieves information about all user interface elements within
95 the user interface configuration manager.
98 makes it possible to narrow the result set to only one type
99 of user interface elements. If all user interface element
100 types should be returned
101 <value scope=com::sun::star::ui>UIElementType::UNKNOWN</value>
105 returns all user interface elements within the user interface
106 configuration manager that meet the given ElementType
107 specification. <p>The following
108 <type scope="com::sun::star::beans">PropertyValue</type> entries
109 are defined inside the sequence for every user interface element.
111 <li><b>ResourceURL<b/>specifies the unique resource URL for
112 the user interface element.</li>
113 <li><b>UIName<b/>specifies the user interface name for the
114 user interface element. Not all user interface elements have
115 set UIName. At least menubars do not.</li>
121 sequence
< sequence
< com
::sun
::star
::beans
::PropertyValue
> > getUIElementsInfo
( [in] short ElementType
) raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
123 /** creates an empty settings data container.
126 an empty user interface element settings data container, which
127 implements <type>UIElementSettings</type>.
129 ::com
::sun
::star
::container
::XIndexContainer createSettings
();
131 /** determines if the settings of a user interface element is part the
132 user interface configuration manager.
135 a resource URL which identifies the user interface element. A
136 resourcce URL must meet the following syntax:
137 "private:resource/$type/$name. It is only allowed to use ascii
138 characters for type and name.
141 <TRUE/> if settings have been found, otherwise <FALSE/>.
143 boolean hasSettings
( [in] string ResourceURL
) raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
145 /** retrieves the settings of a user interface element.
148 a resource URL which identifies the user interface element. A
149 resourcce URL must meet the following syntax:
150 "private:resource/$type/$name. It is only allowed to use ascii
151 characters for type and name.
154 must be <TRUE/> if the retrieved settings should be a writeable.
155 Otherwise <FALSE/> should be provided to get a shareable reference
156 to the settings data.
159 settings data of an existing user interface element, which
160 implements <type>UIElementSettings</type>. If the settings data
162 <type scope="com::sun::star::container">NoSuchElementException</type>
163 is thrown. If the <member>ResourceURL</member> is not valid or
164 describes an unknown type a
165 <type scope="com::sun::star::lang">IllegalArgumentException</type>
168 ::com
::sun
::star
::container
::XIndexAccess getSettings
( [in] string ResourceURL
, [in] boolean bWriteable
) raises
( com
::sun
::star
::container
::NoSuchElementException
, com
::sun
::star
::lang
::IllegalArgumentException
);
170 /** replaces the settings of a user interface element with new settings.
173 a resource URL which identifies the user interface element to
174 be replaced. If no element with the given resource URL exists a
175 <type scope="com::sun::star::container">NoSuchElementException</type>
179 the new settings data of an existing user interface element, which
180 implements <type>UIElementSettings</type>.
183 If the settings data cannot be found a
184 <type scope="com::sun::star::container">NoSuchElementException</type>
185 is thrown. If the <member>ResourceURL</member> is not valid or describes
187 <type scope="com::sun::star::lang">IllegalArgumentException</type>
188 is thrown. If the configuration manager is read-only a
189 <type scope="com::sun::star::lang">IllegalAccessException</type> is
193 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
);
195 /** removes the settings of an existing user interface element.
198 a resource URL which identifies the user interface element settings
202 If the settings data cannot be found a
203 <type scope="com::sun::star::container">NoSuchElementException</type> is
204 thrown. If the <member>ResourceURL</member> is not valid or describes an
205 unknown type a <type scope="com::sun::star::lang">IllegalArgumentException</type>
206 is thrown. If the configuration manager is read-only a
207 <type scope="com::sun::star::lang">IllegalAccessException</type> is thrown.
210 void removeSettings
( [in] string ResourceURL
) raises
( com
::sun
::star
::container
::NoSuchElementException
, com
::sun
::star
::lang
::IllegalArgumentException
, com
::sun
::star
::lang
::IllegalAccessException
);
212 /** inserts the settings of a new user interface element.
215 a resource URL which identifies the new user interface element.
218 the settings data of the new user interface element, which implements
219 <type>UIElementSettings</type>.
222 If the settings data is already present a
223 <type scope="com::sun::star::container">ElementExistException</type>
224 is thrown. If the <member>ResourceURL</member> is not valid or describes
225 an unknown type a <type scope="com::sun::star::lang">IllegalArgumentException</type>
226 is thrown. If the configuration manager is read-only a
227 <type scope="com::sun::star::lang">IllegalAccessException</type> is thrown.
230 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
);
232 /** retrieves the image manager from the user interface configuration
236 Every user interface configuration manager has one image manager
237 instance which controls all images of a module or document.
241 the image manager of the user interface configuration manager.
243 com
::sun
::star
::uno
::XInterface getImageManager
();
245 /** retrieves the keyboard short cut manager from the user interface
246 configuration manager.
249 Every user interface configuration manager has one keyboard short cut
250 manager instance which controls all short cuts of a module or document.
254 the short cut manager of the user interface configuration manager.
256 com
::sun
::star
::uno
::XInterface getShortCutManager
();
258 /** retrieves the events manager from the user interface configuration manager.
261 Every user interface configuration manager has one events manager
262 instance which controls the mapping of events to script URLs of a module
267 the events manager of the user interface configuration
268 manager, if one exists.
270 com
::sun
::star
::uno
::XInterface getEventsManager
();
273 //=============================================================================