1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_form_FormComponents_idl__ 28#define __com_sun_star_form_FormComponents_idl__ 29 30#ifndef __com_sun_star_container_XNameContainer_idl__ 31#include <com/sun/star/container/XNameContainer.idl> 32#endif 33 34#ifndef __com_sun_star_container_XIndexContainer_idl__ 35#include <com/sun/star/container/XIndexContainer.idl> 36#endif 37 38#ifndef __com_sun_star_container_XEnumerationAccess_idl__ 39#include <com/sun/star/container/XEnumerationAccess.idl> 40#endif 41 42#ifndef __com_sun_star_container_XContainer_idl__ 43#include <com/sun/star/container/XContainer.idl> 44#endif 45 46#include <com/sun/star/script/XEventAttacherManager.idl> 47 48//============================================================================= 49 50 module com { module sun { module star { module form { 51 52//============================================================================= 53 54/** specifies the capabilities of a collection of <type>FormComponent</type>s. 55 56 <p>The collection must provide the possibility of adding and removing 57 components by name and by index. The name of a component is not 58 necessarily unique, so the collection must be able to handle duplicate 59 entry names.</p> 60 61 @see FormComponent 62 */ 63published service FormComponents 64{ 65 /** allows to register listeners to be notified of changes in the container. 66 */ 67 interface com::sun::star::container::XContainer; 68 69 /** allows to add/remove elements by name. 70 */ 71 interface com::sun::star::container::XNameContainer; 72 73 /** gives access to the elements by index. 74 */ 75 interface com::sun::star::container::XIndexContainer; 76 77 /** creates an enumeration of the elements. 78 */ 79 interface com::sun::star::container::XEnumerationAccess; 80 81 /** This interface has to be implemented to supply the scripting environment 82 for the contained components. 83 84 <p>The interface allows managing of scripts associated with dependent components, accessed by index. 85 However, as a client of the <type>FormComponents</type> service, there's no need to bother with 86 the container aspect of the <type scope="com::sun::star::script">XEventAttacherManager</type> 87 directly. A <type>FormComponents</type> container will automatically synchronize the elements 88 you put into it with the scripting information obtained at the 89 <type scope="com::sun::star::script">XEventAttacherManager</type> interface.</p> 90 91 <p>For instance, at any time you can obtain the events associated with the <code>n</code><super>th</super> 92 element in the form components by calling 93 <member scope="com::sun::star::script">XEventAttacherManager::getScriptEvents</member> 94 with paramter <code>n</code>. In particular, this invariant is always met, even after you 95 inserted/removed elements into/from the container.</p> 96 */ 97 interface com::sun::star::script::XEventAttacherManager; 98}; 99 100//============================================================================= 101 102}; }; }; }; 103 104/*============================================================================= 105 106=============================================================================*/ 107#endif 108