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