1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10d1766043SAndrew Rist *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12d1766043SAndrew Rist *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19d1766043SAndrew Rist *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __offapi_com_sun_star_view_XFormLayerAccess_idl__
25cdf0e10cSrcweir#define __offapi_com_sun_star_view_XFormLayerAccess_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_view_XControlAccess_idl__
28cdf0e10cSrcweir#include <com/sun/star/view/XControlAccess.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir#ifndef __com_sun_star_form_XForm_idl__
31cdf0e10cSrcweir#include <com/sun/star/form/XForm.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir#ifndef __com_sun_star_form_runtime_XFormController_idl__
34cdf0e10cSrcweir#include <com/sun/star/form/runtime/XFormController.idl>
35cdf0e10cSrcweir#endif
36cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
37cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
38cdf0e10cSrcweir#endif
39cdf0e10cSrcweir
40cdf0e10cSrcweir//=============================================================================
41cdf0e10cSrcweir
42cdf0e10cSrcweirmodule com { module sun { module star { module view {
43cdf0e10cSrcweir
44cdf0e10cSrcweir//=============================================================================
45cdf0e10cSrcweir
46cdf0e10cSrcweir/** provides access to the form layer elements in a view
47cdf0e10cSrcweir
48*34c958abSJürgen Schmidt    @since OpenOffice 2.3
49cdf0e10cSrcweir */
50cdf0e10cSrcweirinterface XFormLayerAccess
51cdf0e10cSrcweir{
52cdf0e10cSrcweir    /// provides access to form controls contained in the view
53cdf0e10cSrcweir    interface XControlAccess;
54cdf0e10cSrcweir
55cdf0e10cSrcweir    /** returns the <type scope="com::sun::star::form">FormController</type>
56cdf0e10cSrcweir        instance which operates on a given form.
57cdf0e10cSrcweir
58cdf0e10cSrcweir        <p>A form controller is a component which controls the user interaction
59cdf0e10cSrcweir        with the form layer, as long as the form is not in design mode.</p>
60cdf0e10cSrcweir
61cdf0e10cSrcweir        @return
62cdf0e10cSrcweir            the requested form controller, or <NULL/> if the view's
63cdf0e10cSrcweir            form layer is currently in design mode. Note that the returned
64cdf0e10cSrcweir            instance becomes non-functional as soon as the form layer is switched
65cdf0e10cSrcweir            to design mode.
66cdf0e10cSrcweir
67cdf0e10cSrcweir        @see isDesignMode
68cdf0e10cSrcweir        @see setDesignMode
69cdf0e10cSrcweir        @see ::com::sun::star::form::runtime::FormController
70cdf0e10cSrcweir        @see ::com::sun::star::form::runtime::FormOperations
71cdf0e10cSrcweir    */
72cdf0e10cSrcweir    ::com::sun::star::form::runtime::XFormController
73cdf0e10cSrcweir        getFormController(
74cdf0e10cSrcweir            [in] ::com::sun::star::form::XForm Form
75cdf0e10cSrcweir        );
76cdf0e10cSrcweir
77cdf0e10cSrcweir    /** determines whether the view's form layer is currently in design
78cdf0e10cSrcweir        or alive mode
79cdf0e10cSrcweir
80cdf0e10cSrcweir        <p><em>Note</em>: This is a convenience method. In the user interface,
81cdf0e10cSrcweir        the design mode is coupled with the <code>.uno:SwitchControlDesignMode</code>
82cdf0e10cSrcweir        feature (see <type scope="com::sun::star::frame">XDispatchProvider</type>),
83cdf0e10cSrcweir        and asking for the current mode is the same as asking for the state of this
84cdf0e10cSrcweir        feature.</p>
85cdf0e10cSrcweir    */
86cdf0e10cSrcweir    boolean isFormDesignMode();
87cdf0e10cSrcweir
88cdf0e10cSrcweir    /** determines whether the view's form layer is currently in design
89cdf0e10cSrcweir        or alive mode
90cdf0e10cSrcweir
91cdf0e10cSrcweir        <p><em>Note</em>: This is a convenience method. In the user interface,
92cdf0e10cSrcweir        the design mode is coupled with the <code>.uno:SwitchControlDesignMode</code>
93cdf0e10cSrcweir        feature (see <type scope="com::sun::star::frame">XDispatchProvider</type>),
94cdf0e10cSrcweir        and changing the current mode is the same as dispatching this feature URL.</p>
95cdf0e10cSrcweir    */
96cdf0e10cSrcweir    void    setFormDesignMode( [in] boolean DesignMode );
97cdf0e10cSrcweir};
98cdf0e10cSrcweir
99cdf0e10cSrcweir//=============================================================================
100cdf0e10cSrcweir
101cdf0e10cSrcweir}; }; }; };
102cdf0e10cSrcweir
103cdf0e10cSrcweir//=============================================================================
104cdf0e10cSrcweir
105cdf0e10cSrcweir#endif
106