1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_form_FormComponents_idl__
20 #define __com_sun_star_form_FormComponents_idl__
22 #include
<com
/sun
/star
/container
/XNameContainer.idl
>
23 #include
<com
/sun
/star
/container
/XIndexContainer.idl
>
24 #include
<com
/sun
/star
/container
/XEnumerationAccess.idl
>
25 #include
<com
/sun
/star
/container
/XContainer.idl
>
26 #include
<com
/sun
/star
/script
/XEventAttacherManager.idl
>
29 module com
{ module sun
{ module star
{ module form
{
32 /** specifies the capabilities of a collection of FormComponents.
34 <p>The collection must provide the possibility of adding and removing
35 components by name and by index. The name of a component is not
36 necessarily unique, so the collection must be able to handle duplicate
41 published service FormComponents
43 /** allows to register listeners to be notified of changes in the container.
45 interface com
::sun
::star
::container
::XContainer
;
47 /** allows to add/remove elements by name.
49 interface com
::sun
::star
::container
::XNameContainer
;
51 /** gives access to the elements by index.
53 interface com
::sun
::star
::container
::XIndexContainer
;
55 /** creates an enumeration of the elements.
57 interface com
::sun
::star
::container
::XEnumerationAccess
;
59 /** This interface has to be implemented to supply the scripting environment
60 for the contained components.
62 <p>The interface allows managing of scripts associated with dependent components, accessed by index.
63 However, as a client of the FormComponents service, there's no need to bother with
64 the container aspect of the com::sun::star::script::XEventAttacherManager
65 directly. A FormComponents container will automatically synchronize the elements
66 you put into it with the scripting information obtained at the
67 com::sun::star::script::XEventAttacherManager interface.</p>
69 <p>For instance, at any time you can obtain the events associated with
70 the <code>n</code><sup>th</sup>
71 element in the form components by calling
72 com::sun::star::script::XEventAttacherManager::getScriptEvents()
73 with parameter <code>n</code>. In particular, this invariant is always met, even after you
74 inserted/removed elements into/from the container.</p>
76 interface com
::sun
::star
::script
::XEventAttacherManager
;
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */