Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / form / XFormsSupplier.idl
blob11ba114f53a7f46d763c2ac0b31519a741e44c6e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_XFormsSupplier_idl__
20 #define __com_sun_star_form_XFormsSupplier_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/container/XNameContainer.idl>
28 module com { module sun { module star { module form {
31 /** provides the access to a collection of forms.
33 published interface XFormsSupplier: com::sun::star::uno::XInterface
36 /** accesses the forms.
38 @code{.bas}
39 REM ***** BASIC *****
41 Sub createColorSelectionBox
42 ' create a new shape
43 xShape = thisComponent.createInstance( "com.sun.star.drawing.ControlShape" )
44 Dim aPos as new com.sun.star.awt.Point
45 aPos.X = 200
46 aPos.Y = 100
47 xShape.Position = aPos
48 Erase aPos
49 Dim aSize as new com.sun.star.awt.Size
50 aSize.Width = 2500
51 aSize.Height = 5000
52 xShape.Size = aSize
53 Erase aSize
55 ' create a combo box model
56 xControlModel = thisComponent.createInstance( "com.sun.star.form.component.ComboBox" )
57 xControlModel.Name = "ColorSelection"
58 xControlModel.Text = "red"
60 ' marry the shape and the model
61 xShape.Control = xControlModel
63 if ( 0 = thisComponent.DrawPage.Forms.getCount() ) Then
64 xForm = thisComponent.createInstance( "com.sun.star.form.component.DataForm" )
65 xForm.Name = "SampleForm"
66 thisComponent.DrawPage.Forms.insertByIndex( 0, xForm )
67 End If
68 ' insert the control model into the first form of the forms collection of the
69 ' draw page of the document
70 thisComponent.DrawPage.Forms.getByIndex(0).insertByIndex( 0, xControlModel )
71 thisComponent.DrawPage.add( xShape )
72 End Sub
73 @endcode
75 @returns
76 the container of all the top-level forms belonging to the component.
78 com::sun::star::container::XNameContainer getForms();
83 }; }; }; };
85 #endif
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */