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