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