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