xref: /trunk/main/offapi/com/sun/star/form/PropertyBrowserController.idl (revision 0c85547751d28076cc4afd0024c8fad5cb6b3da1)
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
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
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.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_form_PropertyBrowserController_idl__
24cdf0e10cSrcweir#define __com_sun_star_form_PropertyBrowserController_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_frame_XController_idl__
27cdf0e10cSrcweir#include <com/sun/star/frame/XController.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__
31cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_beans_XFastPropertySet_idl__
35cdf0e10cSrcweir#include <com/sun/star/beans/XFastPropertySet.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_beans_XMultiPropertySet_idl__
39cdf0e10cSrcweir#include <com/sun/star/beans/XMultiPropertySet.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir//=============================================================================
43cdf0e10cSrcweir
44cdf0e10cSrcweir module com { module sun { module star { module form {
45cdf0e10cSrcweir
46cdf0e10cSrcweir//=============================================================================
47cdf0e10cSrcweir
48cdf0e10cSrcweir/** describes a controller which can be used to browse and modify properties of form controls.
49cdf0e10cSrcweir
50cdf0e10cSrcweir    <p>The controller can be plugged into an <type scope="com::sun::star::frame">XFrame</type>, and will
51cdf0e10cSrcweir    provide a visual component for inspecting control properties. This means it allows to interactively control
52*0c855477Smseidel    several aspects of a <type>FormControlModel</type> or <type>DataAwareControlModel</type>, such as its
53*0c855477Smseidel    data binding, its layout, and its event binding</p>
54cdf0e10cSrcweir
55cdf0e10cSrcweir    <p>For using a PropertyBrowserController, you need to
56*0c855477Smseidel    <ul><li>instantiate it at a service factory of your choice</li>
57cdf0e10cSrcweir        <li>attach it to an empty frame of your choice</li>
58cdf0e10cSrcweir        <li>set the IntrospectedObject property to the control model which you wish to analyze</li>
59cdf0e10cSrcweir    </ul>
60cdf0e10cSrcweir    </p>
61cdf0e10cSrcweir
62cdf0e10cSrcweir    @example Java
63cdf0e10cSrcweir    <listing>
64cdf0e10cSrcweir        XFrame xFrame = getNewEmptyFrame();
65cdf0e10cSrcweir        XMultiServiceFactory xORB = getORB();
66cdf0e10cSrcweir        XPropertySet xControlModel = getMyControlModel();
67cdf0e10cSrcweir
68cdf0e10cSrcweir        // instantiate the controller
69cdf0e10cSrcweir        XController xController = (XController)UnoRuntime.queryInterface( XController.class,
70cdf0e10cSrcweir            xORB.createInstance( "com.sun.star.form.PropertyBrowserController" ) );
71cdf0e10cSrcweir
72cdf0e10cSrcweir        // marry the controller and the frame. This will cause the controller
73cdf0e10cSrcweir        // to create a visual component within the frame to inspect our object
74cdf0e10cSrcweir        xController.attachFrame( xFrame )
75cdf0e10cSrcweir
76cdf0e10cSrcweir        // tell the controller which object to inspect
77cdf0e10cSrcweir        XPropertySet xControllerProps = (XPropertySet)UnoRuntime.queryInterface(
78cdf0e10cSrcweir            XPropertySet.class, xController );
79cdf0e10cSrcweir
80cdf0e10cSrcweir        xControllerProps.setPropertyValue( "IntrospectedObject", xControlModel );
81cdf0e10cSrcweir    </listing>
82cdf0e10cSrcweir
83cdf0e10cSrcweir    @see com::sun::star::frame::XController
84cdf0e10cSrcweir
85cdf0e10cSrcweir    @deprecated
86cdf0e10cSrcweir        <p>Note that nowadays, this service is only a legacy wrapper using the
87cdf0e10cSrcweir        <type scope="com::sun::star::inspection">ObjectInspector</type> and the
88cdf0e10cSrcweir        <type scope="com::sun::star::form::inspection">DefaultFormComponentInspectorModel</type> services, and knitting them together.</p>
89cdf0e10cSrcweir
90cdf0e10cSrcweir*/
91cdf0e10cSrcweirpublished service PropertyBrowserController
92cdf0e10cSrcweir{
93cdf0e10cSrcweir    /** contains the object to inspect.
94cdf0e10cSrcweir
95*0c855477Smseidel        <p>Changing this property from outside causes the controller to update its view
96cdf0e10cSrcweir        with the data of the new object</p>
97cdf0e10cSrcweir    */
98cdf0e10cSrcweir    [property] com::sun::star::beans::XPropertySet IntrospectedObject;
99cdf0e10cSrcweir
100cdf0e10cSrcweir    /** controls the actually visible page.
101cdf0e10cSrcweir
102cdf0e10cSrcweir        <p>The aspects of a <type>DataAwareControlModel</type> which can be browsed and modified
103cdf0e10cSrcweir        using this controller can be separated into 3 groups: common aspects, data-awareness
104cdf0e10cSrcweir        related aspects, and bound events.</br>
105cdf0e10cSrcweir        The appearance of the visual component created by the controller is that 3 tab pages, one for
106cdf0e10cSrcweir        each group, are displayed (of course if the control does not support any aspects of a given group,
107cdf0e10cSrcweir        the group is omitted).<br/>
108*0c855477Smseidel        With this property, it can be controller which page is currently active.</p>
109cdf0e10cSrcweir
110cdf0e10cSrcweir        <p>Valid values are (this list may be extended in the future):
111cdf0e10cSrcweir        <ul><li>Generic</li>
112cdf0e10cSrcweir            <li>Data</li>
113cdf0e10cSrcweir            <li>Events</li>
114cdf0e10cSrcweir        <ul></p>
115cdf0e10cSrcweir    */
116cdf0e10cSrcweir    [property] string CurrentPage;
117cdf0e10cSrcweir
118cdf0e10cSrcweir    /** ensures the basic functionality for a controller.
119cdf0e10cSrcweir
120cdf0e10cSrcweir        <p>With supporting this interface, the component is able to operate in (and provide content
121cdf0e10cSrcweir        for) an <type scope="com::sun::star::frame">XFrame</type>.</p>
122cdf0e10cSrcweir    */
123cdf0e10cSrcweir    interface com::sun::star::frame::XController;
124cdf0e10cSrcweir
125cdf0e10cSrcweir    /** allows to access the properties of the object
126cdf0e10cSrcweir    */
127cdf0e10cSrcweir    interface com::sun::star::beans::XPropertySet;
128cdf0e10cSrcweir
129a893be29SPedro Giffuni    /** allows to access the properties via indices
130cdf0e10cSrcweir    */
131cdf0e10cSrcweir    interface com::sun::star::beans::XFastPropertySet;
132cdf0e10cSrcweir
133cdf0e10cSrcweir    /** allows to access more than one property of the object at the same time
134cdf0e10cSrcweir    */
135cdf0e10cSrcweir    interface com::sun::star::beans::XMultiPropertySet;
136cdf0e10cSrcweir};
137cdf0e10cSrcweir
138cdf0e10cSrcweir//=============================================================================
139cdf0e10cSrcweir
140cdf0e10cSrcweir}; }; }; };
141cdf0e10cSrcweir
142cdf0e10cSrcweir#endif
143