1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_form_PropertyBrowserController_idl__
29#define __com_sun_star_form_PropertyBrowserController_idl__
30
31#ifndef __com_sun_star_frame_XController_idl__
32#include <com/sun/star/frame/XController.idl>
33#endif
34
35#ifndef __com_sun_star_beans_XPropertySet_idl__
36#include <com/sun/star/beans/XPropertySet.idl>
37#endif
38
39#ifndef __com_sun_star_beans_XFastPropertySet_idl__
40#include <com/sun/star/beans/XFastPropertySet.idl>
41#endif
42
43#ifndef __com_sun_star_beans_XMultiPropertySet_idl__
44#include <com/sun/star/beans/XMultiPropertySet.idl>
45#endif
46
47//=============================================================================
48
49 module com {  module sun {  module star {  module form {
50
51//=============================================================================
52
53/** describes a controller which can be used to browse and modify properties of form controls.
54
55	<p>The controller can be plugged into an <type scope="com::sun::star::frame">XFrame</type>, and will
56	provide a visual component for inspecting control properties. This means it allows to interactively control
57	several aspects of a <type>FormControlModel</type> or <type>DataAwareControlModel</type>, such as it's
58	data binding, it's layout, and it's event binding</p>
59
60	<p>For using a PropertyBrowserController, you need to
61	<ul><li>instatiate it at a service factory of your choice</li>
62		<li>attach it to an empty frame of your choice</li>
63		<li>set the IntrospectedObject property to the control model which you wish to analyze</li>
64	</ul>
65	</p>
66
67	@example Java
68	<listing>
69		XFrame xFrame = getNewEmptyFrame();
70		XMultiServiceFactory xORB = getORB();
71		XPropertySet xControlModel = getMyControlModel();
72
73		// instantiate the controller
74		XController xController = (XController)UnoRuntime.queryInterface( XController.class,
75			xORB.createInstance( "com.sun.star.form.PropertyBrowserController" ) );
76
77		// marry the controller and the frame. This will cause the controller
78		// to create a visual component within the frame to inspect our object
79		xController.attachFrame( xFrame )
80
81		// tell the controller which object to inspect
82		XPropertySet xControllerProps = (XPropertySet)UnoRuntime.queryInterface(
83			XPropertySet.class, xController );
84
85		xControllerProps.setPropertyValue( "IntrospectedObject", xControlModel );
86	</listing>
87
88	@see com::sun::star::frame::XController
89
90    @deprecated
91        <p>Note that nowadays, this service is only a legacy wrapper using the
92        <type scope="com::sun::star::inspection">ObjectInspector</type> and the
93        <type scope="com::sun::star::form::inspection">DefaultFormComponentInspectorModel</type> services, and knitting them together.</p>
94
95*/
96published service PropertyBrowserController
97{
98	/** contains the object to inspect.
99
100		<p>Changing this property from outside causes the controller to update it's view
101		with the data of the new object</p>
102	*/
103	[property] com::sun::star::beans::XPropertySet IntrospectedObject;
104
105	/** controls the actually visible page.
106
107		<p>The aspects of a <type>DataAwareControlModel</type> which can be browsed and modified
108		using this controller can be separated into 3 groups: common aspects, data-awareness
109		related aspects, and bound events.</br>
110		The appearance of the visual component created by the controller is that 3 tab pages, one for
111		each group, are displayed (of course if the control does not support any aspects of a given group,
112		the group is omitted).<br/>
113		With this property, it can be controller which page is currently acticve.</p>
114
115		<p>Valid values are (this list may be extended in the future):
116		<ul><li>Generic</li>
117			<li>Data</li>
118			<li>Events</li>
119		<ul></p>
120	*/
121	[property] string CurrentPage;
122
123	/** ensures the basic functionality for a controller.
124
125		<p>With supporting this interface, the component is able to operate in (and provide content
126		for) an <type scope="com::sun::star::frame">XFrame</type>.</p>
127	*/
128	interface com::sun::star::frame::XController;
129
130	/** allows to access the properties of the object
131	*/
132	interface com::sun::star::beans::XPropertySet;
133
134	/** allows to access the properties via indicies
135	*/
136	interface com::sun::star::beans::XFastPropertySet;
137
138	/** allows to access more than one property of the object at the same time
139	*/
140	interface com::sun::star::beans::XMultiPropertySet;
141};
142
143//=============================================================================
144
145}; }; }; };
146
147#endif
148