1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_form_PropertyBrowserController_idl__
21 #define __com_sun_star_form_PropertyBrowserController_idl__
23 #include
<com
/sun
/star
/frame
/XController.idl
>
24 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
25 #include
<com
/sun
/star
/beans
/XFastPropertySet.idl
>
26 #include
<com
/sun
/star
/beans
/XMultiPropertySet.idl
>
29 module com
{ module sun
{ module star
{ module form
{
32 /** describes a controller which can be used to browse and modify properties of form controls.
34 <p>The controller can be plugged into an com::sun::star::frame::XFrame, and will
35 provide a visual component for inspecting control properties. This means it allows to interactively control
36 several aspects of a FormControlModel or DataAwareControlModel, such as it's
37 data binding, it's layout, and it's event binding</p>
39 <p>For using a PropertyBrowserController, you need to
40 <ul><li>instantiate it at a service factory of your choice</li>
41 <li>attach it to an empty frame of your choice</li>
42 <li>set the IntrospectedObject property to the control model which you wish to analyze</li>
47 XFrame xFrame = getNewEmptyFrame();
48 XMultiServiceFactory xORB = getORB();
49 XPropertySet xControlModel = getMyControlModel();
51 // instantiate the controller
52 XController xController = (XController)UnoRuntime.queryInterface( XController.class,
53 xORB.createInstance( "com.sun.star.form.PropertyBrowserController" ) );
55 // marry the controller and the frame. This will cause the controller
56 // to create a visual component within the frame to inspect our object
57 xController.attachFrame( xFrame )
59 // tell the controller which object to inspect
60 XPropertySet xControllerProps = (XPropertySet)UnoRuntime.queryInterface(
61 XPropertySet.class, xController );
63 xControllerProps.setPropertyValue( "IntrospectedObject", xControlModel );
66 @see com::sun::star::frame::XController
69 <p>Note that nowadays, this service is only a legacy wrapper using the
70 com::sun::star::inspection::ObjectInspector and the
71 com::sun::star::form::inspection::DefaultFormComponentInspectorModel services, and knitting them together.</p>
74 published service PropertyBrowserController
76 /** contains the object to inspect.
78 <p>Changing this property from outside causes the controller to update its view
79 with the data of the new object</p>
81 [property
] com
::sun
::star
::beans
::XPropertySet IntrospectedObject
;
83 /** controls the actually visible page.
85 <p>The aspects of a DataAwareControlModel which can be browsed and modified
86 using this controller can be separated into 3 groups: common aspects, data-awareness
87 related aspects, and bound events.<br>
88 The appearance of the visual component created by the controller is that 3 tab pages, one for
89 each group, are displayed (of course if the control does not support any aspects of a given group,
90 the group is omitted).<br/>
91 With this property, it can be controller which page is currently active.</p>
93 <p>Valid values are (this list may be extended in the future):
99 [property
] string CurrentPage
;
101 /** ensures the basic functionality for a controller.
103 <p>With supporting this interface, the component is able to operate in (and provide content
104 for) an com::sun::star::frame::XFrame.</p>
106 interface com
::sun
::star
::frame
::XController
;
108 /** allows to access the properties of the object
110 interface com
::sun
::star
::beans
::XPropertySet
;
112 /** allows to access the properties via indices
114 interface com
::sun
::star
::beans
::XFastPropertySet
;
116 /** allows to access more than one property of the object at the same time
118 interface com
::sun
::star
::beans
::XMultiPropertySet
;
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */