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