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