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_XImageManager_idl__ 29*cdf0e10cSrcweir#define __com_sun_star_ui_XImageManager_idl__ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir#ifndef __com_sun_star_lang_XComponent_idl__ 32*cdf0e10cSrcweir#include <com/sun/star/lang/XComponent.idl> 33*cdf0e10cSrcweir#endif 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir#ifndef __com_sun_star_graphic_XGraphic_idl__ 36*cdf0e10cSrcweir#include <com/sun/star/graphic/XGraphic.idl> 37*cdf0e10cSrcweir#endif 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir#ifndef __com_sun_star_ui_XUIConfigurationListener_idl__ 40*cdf0e10cSrcweir#include <com/sun/star/ui/XUIConfigurationListener.idl> 41*cdf0e10cSrcweir#endif 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir#ifndef __com_sun_star_ui_XUIConfigurationPersistence_idl__ 44*cdf0e10cSrcweir#include <com/sun/star/ui/XUIConfigurationPersistence.idl> 45*cdf0e10cSrcweir#endif 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir#ifndef __com_sun_star_ui_XUIConfiguration_idl__ 48*cdf0e10cSrcweir#include <com/sun/star/ui/XUIConfiguration.idl> 49*cdf0e10cSrcweir#endif 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir#ifndef __com_sun_star_ui_ImageType_idl__ 52*cdf0e10cSrcweir#include <com/sun/star/ui/ImageType.idl> 53*cdf0e10cSrcweir#endif 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir#ifndef __com_sun_star_lang_XInitialization_idl__ 56*cdf0e10cSrcweir#include <com/sun/star/lang/XInitialization.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 access functions to an images manager interface to add, 70*cdf0e10cSrcweir replace and remove images assocations to command URLs. 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir <p> 73*cdf0e10cSrcweir An image manager controls a number of image sets which are specified 74*cdf0e10cSrcweir by a <type>ImageType</type>. 75*cdf0e10cSrcweir </p> 76*cdf0e10cSrcweir*/ 77*cdf0e10cSrcweir 78*cdf0e10cSrcweirpublished interface XImageManager 79*cdf0e10cSrcweir{ 80*cdf0e10cSrcweir /** resets the image manager to default data. 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir <p> 83*cdf0e10cSrcweir This means that all user images of the instance will be removed. 84*cdf0e10cSrcweir </p> 85*cdf0e10cSrcweir */ 86*cdf0e10cSrcweir void reset(); 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir /** retrieves the list of command URLs which have images associated. 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir @param nImageType 91*cdf0e10cSrcweir specifies the image type for this operation. 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir @return 94*cdf0e10cSrcweir all command URLs within the images manager that have an image 95*cdf0e10cSrcweir associated. 96*cdf0e10cSrcweir */ 97*cdf0e10cSrcweir sequence< string > getAllImageNames( [in] short nImageType ); 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir /** determines if a command URL has an associated image. 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir @param nImageType 102*cdf0e10cSrcweir specifies the image type for this operation. 103*cdf0e10cSrcweir 104*cdf0e10cSrcweir @param ResourceURL 105*cdf0e10cSrcweir a command URL that should be checked for an associated image. 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir @return 108*cdf0e10cSrcweir <TRUE/> if an image is associated, otherwise <FALSE/>. 109*cdf0e10cSrcweir */ 110*cdf0e10cSrcweir boolean hasImage( [in] short nImageType, [in] string aCommandURL ) raises ( com::sun::star::lang::IllegalArgumentException ); 111*cdf0e10cSrcweir 112*cdf0e10cSrcweir /** retrieves the associated images of command URLs. 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir @param nImageType 115*cdf0e10cSrcweir specifies the image type for this association operation. 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir @param aCommandURLSequence 118*cdf0e10cSrcweir a sequence of command URLs for which the images are requested. 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir @return 121*cdf0e10cSrcweir a sequence of graphics object which are associated with the 122*cdf0e10cSrcweir provided command URLs. If an unknown command URL is provided or 123*cdf0e10cSrcweir a command URL has no associated image a graphics object with an 124*cdf0e10cSrcweir empty image is provided. If the sequence 125*cdf0e10cSrcweir <var>aCommandURLSequence</var> contains an invalid command 126*cdf0e10cSrcweir URL a <type scope="com::sun::star::lang">IllegalArgumentException</type> 127*cdf0e10cSrcweir is thrown. 128*cdf0e10cSrcweir */ 129*cdf0e10cSrcweir sequence< ::com::sun::star::graphic::XGraphic > getImages( [in] short nImageType, [in] sequence< string > aCommandURLSequence ) raises ( com::sun::star::lang::IllegalArgumentException ); 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir /** replaces the associated images of command URLs. 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir @param nImageType 134*cdf0e10cSrcweir specifies the image type for this association operation. 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir @param aCommandURLSequence 137*cdf0e10cSrcweir a sequence of command URLs for which images should be replaced. 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir @param aGraphicsSequence 140*cdf0e10cSrcweir a sequence of graphic objects which should replace the old images 141*cdf0e10cSrcweir of the provided command URLs. 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir <p> 144*cdf0e10cSrcweir If a command URL cannot be found the replace call will be omitted. If 145*cdf0e10cSrcweir <var>aCommandURLSequence</var> contains an invalid command URL a 146*cdf0e10cSrcweir <type scope="com::sun::star::lang">IllegalArgumentException</type> 147*cdf0e10cSrcweir is thrown. If the image manager is associated with a read-only configuration 148*cdf0e10cSrcweir manager a <type scope="com::sun::star::lang">IllegalAccessException</type> 149*cdf0e10cSrcweir is thrown. 150*cdf0e10cSrcweir </p> 151*cdf0e10cSrcweir */ 152*cdf0e10cSrcweir void replaceImages( [in] short nImageType, [in] sequence< string > aCommandURLSequence, [in] sequence< ::com::sun::star::graphic::XGraphic > aGraphicsSequence ) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IllegalAccessException ); 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir /** removes associated images to a command URL. 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir @param nImageType 157*cdf0e10cSrcweir specifies the image type for this association operation. 158*cdf0e10cSrcweir 159*cdf0e10cSrcweir @param aCommandURLSequence 160*cdf0e10cSrcweir a sequence of command URLs for which the images should be removed. 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir <p> 163*cdf0e10cSrcweir If the <var>aCommandURLSequence</var> contains an invalid command URL a 164*cdf0e10cSrcweir <type scope="com::sun::star::lang">IllegalArgumentException</type> is 165*cdf0e10cSrcweir thrown. If the image manager is associated with a read-only configuration 166*cdf0e10cSrcweir manager a <type scope="com::sun::star::lang">IllegalAccessException</type> 167*cdf0e10cSrcweir is thrown. 168*cdf0e10cSrcweir </p> 169*cdf0e10cSrcweir */ 170*cdf0e10cSrcweir void removeImages( [in] short nImageType, [in] sequence< string > aResourceURLSequence ) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IllegalAccessException ); 171*cdf0e10cSrcweir 172*cdf0e10cSrcweir /** inserts new image/command associations to a image manager. 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir @param nImageType 175*cdf0e10cSrcweir specifies the image type for this association operation. 176*cdf0e10cSrcweir 177*cdf0e10cSrcweir @param aCommandURLSequence 178*cdf0e10cSrcweir a sequence of command URLs which specify which commands get an new image. 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir @param aGraphicSequence 181*cdf0e10cSrcweir a sequence of graphic objects which should be associated with the provided 182*cdf0e10cSrcweir command URLs. 183*cdf0e10cSrcweir 184*cdf0e10cSrcweir <p> 185*cdf0e10cSrcweir If an association is already present it is replaced. If 186*cdf0e10cSrcweir <var>aCommandURLSequence</var> contains an invalid command URL a 187*cdf0e10cSrcweir <type scope="com::sun::star::lang">IllegalArgumentException</type> 188*cdf0e10cSrcweir is thrown. If the configuration manager is read-only a 189*cdf0e10cSrcweir <type scope="com::sun::star::lang">IllegalAccessException</type> is 190*cdf0e10cSrcweir thrown. 191*cdf0e10cSrcweir </p> 192*cdf0e10cSrcweir */ 193*cdf0e10cSrcweir void insertImages( [in] short nImageType, [in] sequence< string > aCommandURLSequence, [in] sequence< ::com::sun::star::graphic::XGraphic > aGraphicSequence ) raises ( com::sun::star::container::ElementExistException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::IllegalAccessException ); 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir /** provides access to persistence functions to load/store images 196*cdf0e10cSrcweir data from a storage. 197*cdf0e10cSrcweir */ 198*cdf0e10cSrcweir interface com::sun::star::ui::XUIConfigurationPersistence; 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir /** provides functions to add and remove listeners for changes within an 201*cdf0e10cSrcweir image manager. 202*cdf0e10cSrcweir 203*cdf0e10cSrcweir <p> 204*cdf0e10cSrcweir An image manager implementation notifies its listener whenever an image 205*cdf0e10cSrcweir set has been changed, due to insert, remove or replace operations. To 206*cdf0e10cSrcweir minimize the overhead for notifications an image manager places all 207*cdf0e10cSrcweir inserted and/or replaced images into a single notify call. A container 208*cdf0e10cSrcweir which implements <type scope="com::sun::star::container">XNameAccess</type> 209*cdf0e10cSrcweir holds the information. The access key is a command URL and provides a 210*cdf0e10cSrcweir <type scope="::com::sun::star::graphic">XGraphic</type>. This container 211*cdf0e10cSrcweir is placed into the 212*cdf0e10cSrcweir <member scope="com::sun::star::ui">ConfigurationEvent::Element</member>. 213*cdf0e10cSrcweir The image set which has been changed is put into the 214*cdf0e10cSrcweir <member scope="com::sun::star::ui">ConfigurationEvent::aInfo</member>. 215*cdf0e10cSrcweir </p> 216*cdf0e10cSrcweir */ 217*cdf0e10cSrcweir interface com::sun::star::ui::XUIConfiguration; 218*cdf0e10cSrcweir 219*cdf0e10cSrcweir /** allows controlling or observing the lifetime of an imahge manager 220*cdf0e10cSrcweir instance. 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir <p>The owner of the object may dispose of this object using 223*cdf0e10cSrcweir <member scope="com::sun::star::lang">XComponent::dispose()</member>. 224*cdf0e10cSrcweir </p> 225*cdf0e10cSrcweir */ 226*cdf0e10cSrcweir interface ::com::sun::star::lang::XComponent; 227*cdf0e10cSrcweir 228*cdf0e10cSrcweir /** initializes an image manager instance. 229*cdf0e10cSrcweir 230*cdf0e10cSrcweir An image manager instance must be initialized using 231*cdf0e10cSrcweir <member scope=com::sun::star::lang>XInitialization::initialize</member> 232*cdf0e10cSrcweir before it can be used.<br> 233*cdf0e10cSrcweir The following property must be provided if the image manager is 234*cdf0e10cSrcweir related to a module: 235*cdf0e10cSrcweir <ul> 236*cdf0e10cSrcweir <li><b>ModuleIdentifier</b>specifies a string property which is the 237*cdf0e10cSrcweir unique identifier of module. 238*cdf0e10cSrcweir </li> 239*cdf0e10cSrcweir <li><b>UserConfigStorage</b>specifies a 240*cdf0e10cSrcweir <type scope="com::sun::star::embed">XStorage</type> property which 241*cdf0e10cSrcweir provides access to the configuration storage of the module. 242*cdf0e10cSrcweir </li> 243*cdf0e10cSrcweir <li><b>UserRootCommit</b>specifies an optional 244*cdf0e10cSrcweir <type scope="com::sun::star::embed">XTransactedObject</type> 245*cdf0e10cSrcweir property which makes it possible to commit a root storage. 246*cdf0e10cSrcweir </li> 247*cdf0e10cSrcweir </ul> 248*cdf0e10cSrcweir */ 249*cdf0e10cSrcweir interface ::com::sun::star::lang::XInitialization; 250*cdf0e10cSrcweir}; 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir//============================================================================= 253*cdf0e10cSrcweir 254*cdf0e10cSrcweir}; }; }; }; 255*cdf0e10cSrcweir 256*cdf0e10cSrcweir#endif 257