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
24#ifndef __offapi_com_sun_star_view_XFormLayerAccess_idl__
25#define __offapi_com_sun_star_view_XFormLayerAccess_idl__
26
27#ifndef __com_sun_star_view_XControlAccess_idl__
28#include <com/sun/star/view/XControlAccess.idl>
29#endif
30#ifndef __com_sun_star_form_XForm_idl__
31#include <com/sun/star/form/XForm.idl>
32#endif
33#ifndef __com_sun_star_form_runtime_XFormController_idl__
34#include <com/sun/star/form/runtime/XFormController.idl>
35#endif
36#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
37#include <com/sun/star/lang/IllegalArgumentException.idl>
38#endif
39
40//=============================================================================
41
42module com { module sun { module star { module view {
43
44//=============================================================================
45
46/** provides access to the form layer elements in a view
47
48    @since OpenOffice 2.3
49 */
50interface XFormLayerAccess
51{
52    /// provides access to form controls contained in the view
53    interface XControlAccess;
54
55    /** returns the <type scope="com::sun::star::form">FormController</type>
56        instance which operates on a given form.
57
58        <p>A form controller is a component which controls the user interaction
59        with the form layer, as long as the form is not in design mode.</p>
60
61        @return
62            the requested form controller, or <NULL/> if the view's
63            form layer is currently in design mode. Note that the returned
64            instance becomes non-functional as soon as the form layer is switched
65            to design mode.
66
67        @see isDesignMode
68        @see setDesignMode
69        @see ::com::sun::star::form::runtime::FormController
70        @see ::com::sun::star::form::runtime::FormOperations
71    */
72    ::com::sun::star::form::runtime::XFormController
73        getFormController(
74            [in] ::com::sun::star::form::XForm Form
75        );
76
77    /** determines whether the view's form layer is currently in design
78        or alive mode
79
80        <p><em>Note</em>: This is a convenience method. In the user interface,
81        the design mode is coupled with the <code>.uno:SwitchControlDesignMode</code>
82        feature (see <type scope="com::sun::star::frame">XDispatchProvider</type>),
83        and asking for the current mode is the same as asking for the state of this
84        feature.</p>
85    */
86    boolean isFormDesignMode();
87
88    /** determines whether the view's form layer is currently in design
89        or alive mode
90
91        <p><em>Note</em>: This is a convenience method. In the user interface,
92        the design mode is coupled with the <code>.uno:SwitchControlDesignMode</code>
93        feature (see <type scope="com::sun::star::frame">XDispatchProvider</type>),
94        and changing the current mode is the same as dispatching this feature URL.</p>
95    */
96    void    setFormDesignMode( [in] boolean DesignMode );
97};
98
99//=============================================================================
100
101}; }; }; };
102
103//=============================================================================
104
105#endif
106