1*d1766043SAndrew Rist/************************************************************** 2*d1766043SAndrew Rist * 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#ifndef __com_sun_star_inspection_XPropertyHandler_idl__ 24cdf0e10cSrcweir#define __com_sun_star_inspection_XPropertyHandler_idl__ 25cdf0e10cSrcweir 26cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyState_idl__ 27cdf0e10cSrcweir#include <com/sun/star/beans/PropertyState.idl> 28cdf0e10cSrcweir#endif 29cdf0e10cSrcweir#ifndef __com_sun_star_beans_Property_idl__ 30cdf0e10cSrcweir#include <com/sun/star/beans/Property.idl> 31cdf0e10cSrcweir#endif 32cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertyChangeListener_idl__ 33cdf0e10cSrcweir#include <com/sun/star/beans/XPropertyChangeListener.idl> 34cdf0e10cSrcweir#endif 35cdf0e10cSrcweir#ifndef __com_sun_star_inspection_LineDescriptor_idl__ 36cdf0e10cSrcweir#include <com/sun/star/inspection/LineDescriptor.idl> 37cdf0e10cSrcweir#endif 38cdf0e10cSrcweir#ifndef __com_sun_star_lang_NullPointerException_idl__ 39cdf0e10cSrcweir#include <com/sun/star/lang/NullPointerException.idl> 40cdf0e10cSrcweir#endif 41cdf0e10cSrcweir#ifndef __com_sun_star_beans_UnknownPropertyException_idl__ 42cdf0e10cSrcweir#include <com/sun/star/beans/UnknownPropertyException.idl> 43cdf0e10cSrcweir#endif 44cdf0e10cSrcweir#ifndef __com_sun_star_lang_XComponent_idl__ 45cdf0e10cSrcweir#include <com/sun/star/lang/XComponent.idl> 46cdf0e10cSrcweir#endif 47cdf0e10cSrcweir#ifndef __com_sun_star_inspection_InteractiveSelectionResult_idl__ 48cdf0e10cSrcweir#include <com/sun/star/inspection/InteractiveSelectionResult.idl> 49cdf0e10cSrcweir#endif 50cdf0e10cSrcweir 51cdf0e10cSrcweir//============================================================================= 52cdf0e10cSrcweirmodule com { module sun { module star { module inspection { 53cdf0e10cSrcweir 54cdf0e10cSrcweirpublished interface XObjectInspectorUI; 55cdf0e10cSrcweirpublished interface XPropertyControlFactory; 56cdf0e10cSrcweir 57cdf0e10cSrcweir//----------------------------------------------------------------------------- 58cdf0e10cSrcweir/** is the basic interface for object inspection. 59cdf0e10cSrcweir 60cdf0e10cSrcweir <p>The <type>ObjectInspector</type> itself does not know anything about the object 61cdf0e10cSrcweir it is inspecting, all information is obtained via <type>XPropertyHandler</type>s. 62cdf0e10cSrcweir Also, property handlers are responsible for describing the user interface which should 63cdf0e10cSrcweir be used to interact with the user, with respect to a given aspect of the inspected 64cdf0e10cSrcweir component.</p> 65cdf0e10cSrcweir 66cdf0e10cSrcweir @see ObjectInspector 67cdf0e10cSrcweir @see LineDescriptor 68cdf0e10cSrcweir 69cdf0e10cSrcweir @since OOo 2.0.3 70cdf0e10cSrcweir*/ 71cdf0e10cSrcweirpublished interface XPropertyHandler 72cdf0e10cSrcweir{ 73cdf0e10cSrcweir /** used for controlling resources acquired by the handler 74cdf0e10cSrcweir 75cdf0e10cSrcweir <p><member scope="com::sun::star::lang">XComponent::dispose</member> is invoked when the property handler is not 76cdf0e10cSrcweir needed by the object inspector anymore. Handler implementations should clean up any 77cdf0e10cSrcweir resources here.</p> 78cdf0e10cSrcweir */ 79cdf0e10cSrcweir interface com::sun::star::lang::XComponent; 80cdf0e10cSrcweir 81cdf0e10cSrcweir /** binds the property handler to a new component 82cdf0e10cSrcweir @param Component 83cdf0e10cSrcweir the component to inspect. Must not be <NULL/> 84cdf0e10cSrcweir @throws com::sun::star::lang::NullPointerException 85cdf0e10cSrcweir if the component is <NULL/> 86cdf0e10cSrcweir */ 87cdf0e10cSrcweir void inspect( [in] com::sun::star::uno::XInterface Component ) 88cdf0e10cSrcweir raises( com::sun::star::lang::NullPointerException ); 89cdf0e10cSrcweir 90cdf0e10cSrcweir /** retrieves the current value of a property 91cdf0e10cSrcweir @param PropertyName 92cdf0e10cSrcweir the name of the property whose value is to be retrieved 93cdf0e10cSrcweir @throws com::sun::star::beans::UnknownPropertyException 94cdf0e10cSrcweir if the given property is not supported by the property handler 95cdf0e10cSrcweir */ 96cdf0e10cSrcweir any 97cdf0e10cSrcweir getPropertyValue( [in] string PropertyName ) 98cdf0e10cSrcweir raises (::com::sun::star::beans::UnknownPropertyException); 99cdf0e10cSrcweir 100cdf0e10cSrcweir /** sets the value of a property 101cdf0e10cSrcweir 102cdf0e10cSrcweir @param PropertyName 103cdf0e10cSrcweir the name of the property whose value is to be set 104cdf0e10cSrcweir @param Value 105cdf0e10cSrcweir the property value to set 106cdf0e10cSrcweir @throws com::sun::star::beans::UnknownPropertyException 107cdf0e10cSrcweir if the given property is not supported by the property handler 108cdf0e10cSrcweir */ 109cdf0e10cSrcweir void 110cdf0e10cSrcweir setPropertyValue( [in] string PropertyName, [in] any Value ) 111cdf0e10cSrcweir raises (::com::sun::star::beans::UnknownPropertyException); 112cdf0e10cSrcweir 113cdf0e10cSrcweir /** returns the state of a property 114cdf0e10cSrcweir 115cdf0e10cSrcweir @param PropertyName 116cdf0e10cSrcweir the name of the property whose state is to be retrieved 117cdf0e10cSrcweir @throws com::sun::star::beans::UnknownPropertyException 118cdf0e10cSrcweir if the given property is not supported by the property handler 119cdf0e10cSrcweir */ 120cdf0e10cSrcweir com::sun::star::beans::PropertyState 121cdf0e10cSrcweir getPropertyState( [in] string PropertyName ) 122cdf0e10cSrcweir raises (::com::sun::star::beans::UnknownPropertyException); 123cdf0e10cSrcweir 124cdf0e10cSrcweir /** describes the UI to be used to represent the property 125cdf0e10cSrcweir @param PropertyName 126cdf0e10cSrcweir the name of the property whose user interface is to be described 127cdf0e10cSrcweir implementation 128cdf0e10cSrcweir @param ControlFactory 129cdf0e10cSrcweir a factory for creating <type>XPropertyControl</type> instances. Must not be <NULL/>. 130cdf0e10cSrcweir @return 131cdf0e10cSrcweir the descriptor of the property line. 132cdf0e10cSrcweir @throws com::sun::star::beans::UnknownPropertyException 133cdf0e10cSrcweir if the given property is not supported by this handler 134cdf0e10cSrcweir @throws com::sun::star::lang::NullPointerException 135cdf0e10cSrcweir if <arg>ControlFactory</arg> is <NULL/>. 136cdf0e10cSrcweir @see PropertyControlType 137cdf0e10cSrcweir @see LineDescriptor 138cdf0e10cSrcweir */ 139cdf0e10cSrcweir LineDescriptor 140cdf0e10cSrcweir describePropertyLine( 141cdf0e10cSrcweir [in] string PropertyName, 142cdf0e10cSrcweir [in] XPropertyControlFactory ControlFactory 143cdf0e10cSrcweir ) 144cdf0e10cSrcweir raises (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException); 145cdf0e10cSrcweir 146cdf0e10cSrcweir /** converts a given control-compatible value to a property value 147cdf0e10cSrcweir 148cdf0e10cSrcweir <p>In <member>describePropertyLine</member>, a property handler declared which type of control 149cdf0e10cSrcweir should be used to display the value of a certain property. To allow to use the same control 150cdf0e10cSrcweir type for different properties, and in particular, for properties of different type, 151cdf0e10cSrcweir conversions between controls values and property values are needed.</p> 152cdf0e10cSrcweir 153cdf0e10cSrcweir <p>This method converts a control value into a property value, which subsequently can be used 154cdf0e10cSrcweir in conjunction with <member>setPropertyValue</member>.</p> 155cdf0e10cSrcweir 156cdf0e10cSrcweir @param PropertyName 157cdf0e10cSrcweir The name of the conversion's target property. 158cdf0e10cSrcweir @param ControlValue 159cdf0e10cSrcweir The to-be-converted control value. This value has been obtained from an <type>XPropertyControl</type>, 160cdf0e10cSrcweir using its <member>Value</member> attribute. 161cdf0e10cSrcweir 162cdf0e10cSrcweir @throws com::sun::star::beans::UnknownPropertyException 163cdf0e10cSrcweir if the given property is not supported by the property handler 164cdf0e10cSrcweir 165cdf0e10cSrcweir @see convertToControlValue 166cdf0e10cSrcweir @see describePropertyLine 167cdf0e10cSrcweir @see XPropertyControl 168cdf0e10cSrcweir @see getPropertyValue 169cdf0e10cSrcweir */ 170cdf0e10cSrcweir any 171cdf0e10cSrcweir convertToPropertyValue( 172cdf0e10cSrcweir [in] string PropertyName, 173cdf0e10cSrcweir [in] any ControlValue 174cdf0e10cSrcweir ) 175cdf0e10cSrcweir raises (::com::sun::star::beans::UnknownPropertyException); 176cdf0e10cSrcweir 177cdf0e10cSrcweir /** converts a given property value to a control-compatible value 178cdf0e10cSrcweir 179cdf0e10cSrcweir <p>In <member>describePropertyLine</member>, a property handler declared which type of control 180cdf0e10cSrcweir should be used to display the value of a certain property. To allow to use the same control 181cdf0e10cSrcweir type for different properties, and in particular, for properties of different type, 182cdf0e10cSrcweir conversions between controls values and property values are needed.</p> 183cdf0e10cSrcweir 184cdf0e10cSrcweir <p>This method converts a property value, which has previously been obtained using 185cdf0e10cSrcweir <member>getPropertyValue</member>, into a control-compatible value, which can be used 186cdf0e10cSrcweir with <type>XPropertyControl</type>'s <member>XPropertyControl::Value</member> attribute.</p> 187cdf0e10cSrcweir 188cdf0e10cSrcweir <p>A usual application of this method are list boxes: There is a generic list box implementation, 189cdf0e10cSrcweir which is able to display a simple list of strings. Usually, every string represents one 190cdf0e10cSrcweir possible property value. To translate between those property values and the displayed strings, 191cdf0e10cSrcweir <member>convertToControlValue</member> and <member>convertToPropertyValue</member> are used.</p> 192cdf0e10cSrcweir 193cdf0e10cSrcweir <p>The method is not invoked if the control's value type (<member>XPropertyControl::ValueType</member> 194cdf0e10cSrcweir equals the property's value type.</p> 195cdf0e10cSrcweir 196cdf0e10cSrcweir @param PropertyName 197cdf0e10cSrcweir The name of the property whose value is to be converted. 198cdf0e10cSrcweir @param PropertyValue 199cdf0e10cSrcweir The to-be-converted property value. 200cdf0e10cSrcweir @param ControlValueType 201cdf0e10cSrcweir The target type of the conversion. This type is determined by the control which 202cdf0e10cSrcweir is used to display the property, which in turn is determined by the handler itself 203cdf0e10cSrcweir in <member>describePropertyLine</member>.<br/> 204cdf0e10cSrcweir Speaking strictly, this is passed for convenience only, since every <type>XPropertyHandler</type> 205cdf0e10cSrcweir implementation should know exactly which type to expect, since it implicitly determined this type 206cdf0e10cSrcweir in <member>describePropertyLine</member> by creating an appropriate <type>XPropertyControl</type>. 207cdf0e10cSrcweir 208cdf0e10cSrcweir @throws com::sun::star::beans::UnknownPropertyException 209cdf0e10cSrcweir if the given property is not supported by the property handler 210cdf0e10cSrcweir 211cdf0e10cSrcweir @see convertToPropertyValue 212cdf0e10cSrcweir @see describePropertyLine 213cdf0e10cSrcweir @see XPropertyControl 214cdf0e10cSrcweir @see getPropertyValue 215cdf0e10cSrcweir */ 216cdf0e10cSrcweir any 217cdf0e10cSrcweir convertToControlValue( 218cdf0e10cSrcweir [in] string PropertyName, 219cdf0e10cSrcweir [in] any PropertyValue, 220cdf0e10cSrcweir [in] type ControlValueType 221cdf0e10cSrcweir ) 222cdf0e10cSrcweir raises (::com::sun::star::beans::UnknownPropertyException); 223cdf0e10cSrcweir 224cdf0e10cSrcweir /** registers a listener for notification about property value changes 225cdf0e10cSrcweir 226cdf0e10cSrcweir <p>An <type>XPropertyHandler</type> implementation might decide to ignore this call. 227cdf0e10cSrcweir However, in this case property value changes made by third party components are not 228cdf0e10cSrcweir reflected in the object inspector.</p> 229cdf0e10cSrcweir 230cdf0e10cSrcweir <p>If a handler implementation supports property change listeners, it must be able to cope 231cdf0e10cSrcweir with a call to <member>addPropertyChangeListener</member> even if currently no component is 232cdf0e10cSrcweir being inspected. In this case, the listener must become active as soon as a new introspectee 233cdf0e10cSrcweir is set in the next <member>inspect</member> call.</p> 234cdf0e10cSrcweir 235cdf0e10cSrcweir @param Listener 236cdf0e10cSrcweir the listener to notify about property changes 237cdf0e10cSrcweir @throws com::sun::star::lang::NullPointerException 238cdf0e10cSrcweir if the listener is <NULL/> 239cdf0e10cSrcweir @see removePropertyChangeListener 240cdf0e10cSrcweir */ 241cdf0e10cSrcweir void 242cdf0e10cSrcweir addPropertyChangeListener( [in] com::sun::star::beans::XPropertyChangeListener Listener ) 243cdf0e10cSrcweir raises ( com::sun::star::lang::NullPointerException ); 244cdf0e10cSrcweir 245cdf0e10cSrcweir /** revokes a listener for notification about property value changes 246cdf0e10cSrcweir @see addPropertyChangeListener 247cdf0e10cSrcweir */ 248cdf0e10cSrcweir void 249cdf0e10cSrcweir removePropertyChangeListener( [in] com::sun::star::beans::XPropertyChangeListener Listener ); 250cdf0e10cSrcweir 251cdf0e10cSrcweir /** returns the properties which the handler can handle 252cdf0e10cSrcweir 253cdf0e10cSrcweir <p>A handler is allowed to return an empty sequence here, indicating that for 254cdf0e10cSrcweir the given introspectee, no properties handling can be provided. This might happen 255cdf0e10cSrcweir when a fixed set of property handlers is used for a variety of components to inspect, 256cdf0e10cSrcweir where not all handlers can really cope with all components.</p> 257cdf0e10cSrcweir 258cdf0e10cSrcweir <p>In the case of returning an empty sequence here, the property handler is ignored 259cdf0e10cSrcweir by all further processing in the object inspector.</p> 260cdf0e10cSrcweir */ 261cdf0e10cSrcweir sequence< com::sun::star::beans::Property > 262cdf0e10cSrcweir getSupportedProperties(); 263cdf0e10cSrcweir 264cdf0e10cSrcweir /** returns the properties which are to be superseded by this handler 265cdf0e10cSrcweir 266cdf0e10cSrcweir <p>Besides defining an own set of properties (see <member>getSupportedProperties</member>), 267cdf0e10cSrcweir a property handler can also declare that foreign properties (which it is 268cdf0e10cSrcweir <em>not</em> responsible for) are superseded by its own properties.</p> 269cdf0e10cSrcweir 270cdf0e10cSrcweir <p>This is usually used if your handler is used with another, more generic one, which 271cdf0e10cSrcweir should continue to be responsible for all properties, except a few which your 272cdf0e10cSrcweir handler handles more elegantly.</p> 273cdf0e10cSrcweir 274cdf0e10cSrcweir <p>In such a case, simply return those properties here.</p> 275cdf0e10cSrcweir 276cdf0e10cSrcweir <p>There is a precedence in the property handlers used by an <type>ObjectInspector</type>, 277cdf0e10cSrcweir which also is important for the superseded properties. This precendence is implied by the 278cdf0e10cSrcweir precendence of factories to create the property handlers, as denoted in the 279cdf0e10cSrcweir <member>XObjectInspectorModel::HandlerFactories</member> attribute.</p> 280cdf0e10cSrcweir 281cdf0e10cSrcweir <p>With this in mind, property handlers can only supersede properties which are supported 282cdf0e10cSrcweir by a handler preceding them, but not properties of handlers succeeding them.</p> 283cdf0e10cSrcweir 284cdf0e10cSrcweir <p>For instance, imaging an <type>XObjectInspectorModel</type> which provides three 285cdf0e10cSrcweir factories, for handler <code>A</code>, <code>B</code>, and <code>C</code> - in this order. 286cdf0e10cSrcweir Now if <code>A</code> supports the property <code>Foo</code>, <code>C</code> supports 287cdf0e10cSrcweir <code>Bar</code>, and <code>B</code> supersedes both <code>Foo</code> and <code>Bar</code>, 288cdf0e10cSrcweir them the result is <code>Bar</code> is still present. This is because <code>B</code> precedes 289cdf0e10cSrcweir <code>C</code>, so it cannot, by definition, supersede properties which are supported by 290cdf0e10cSrcweir <code>C</code>.</p> 291cdf0e10cSrcweir 292cdf0e10cSrcweir <p>If <member>getSupportedProperties</member> returned an empty sequence, this method will 293cdf0e10cSrcweir not be called.</p> 294cdf0e10cSrcweir 295cdf0e10cSrcweir @see XObjectInspectorModel::HandlerFactories 296cdf0e10cSrcweir */ 297cdf0e10cSrcweir sequence< string > 298cdf0e10cSrcweir getSupersededProperties( ); 299cdf0e10cSrcweir 300cdf0e10cSrcweir /** retrieve the actuating properties which this handler is interested in 301cdf0e10cSrcweir 302cdf0e10cSrcweir <p>In general, properties can be declared as "actuating", that is, when their value 303cdf0e10cSrcweir changes, the UI for other properties needs to be updated (e.g. enabled or disabled).</p> 304cdf0e10cSrcweir 305cdf0e10cSrcweir <p>With this method, a handler can declare that it feels responsible for some/all 306cdf0e10cSrcweir of the depending properties of certain actuating properties.</p> 307cdf0e10cSrcweir 308cdf0e10cSrcweir <p>Whenever the value of an actuating property changes, all handlers which expressed 309cdf0e10cSrcweir their interest in this particular actuating properties are called with their 310cdf0e10cSrcweir <member>actuatingPropertyChanged</member> method.</p> 311cdf0e10cSrcweir 312cdf0e10cSrcweir <p>If <member>getSupportedProperties</member> returned an empty sequence, this method will 313cdf0e10cSrcweir not be called</p> 314cdf0e10cSrcweir */ 315cdf0e10cSrcweir sequence< string > 316cdf0e10cSrcweir getActuatingProperties( ); 317cdf0e10cSrcweir 318cdf0e10cSrcweir /** determines whether a given property, which the handler is responsible for, is composable. 319cdf0e10cSrcweir 320cdf0e10cSrcweir <p>An object inspector can inspect multiple components at once, displaying the <em>intersection</em> 321cdf0e10cSrcweir of their properties. For this, all components are examined for their properties, and all properties 322cdf0e10cSrcweir which exist for all components, <em>and</em> are declared to be composable by their respective handler, 323cdf0e10cSrcweir are displayed in the inspector UI.</p> 324cdf0e10cSrcweir 325cdf0e10cSrcweir @param PropertyName 326cdf0e10cSrcweir the name of the property whose composability is to be determined 327cdf0e10cSrcweir @throws com::sun::star::beans::UnknownPropertyException 328cdf0e10cSrcweir if the given property is not supported by the property handler 329cdf0e10cSrcweir */ 330cdf0e10cSrcweir boolean isComposable( [in] string PropertyName ) 331cdf0e10cSrcweir raises (::com::sun::star::beans::UnknownPropertyException); 332cdf0e10cSrcweir 333cdf0e10cSrcweir /** called when a browse button belonging to a property UI represenation has been clicked 334cdf0e10cSrcweir 335cdf0e10cSrcweir <p>Property handlers can raise a dedicated UI for entering or somehow changing a property value. 336cdf0e10cSrcweir Usually, this will be a modal dialog, but it can also be a non-modal user interface component.</p> 337cdf0e10cSrcweir 338cdf0e10cSrcweir <p>Availability of this feature is indicated by the <member>LineDescriptor::HasPrimaryButton</member> 339cdf0e10cSrcweir and <member>LineDescriptor::HasSecondaryButton</member> members of a <type>LineDescriptor</type>, 340cdf0e10cSrcweir which the <type>XPropertyHandler</type> fills in its <member>describePropertyLine</member> method.</p> 341cdf0e10cSrcweir 342cdf0e10cSrcweir <p>When this method is called, the property handler should raise the UI needed to enter the 343cdf0e10cSrcweir property value, and return the result of this (see <type>InteractiveSelectionResult</type>).</p> 344cdf0e10cSrcweir 345cdf0e10cSrcweir <p>It is recommended that property handlers do not directly set the property value which has 346cdf0e10cSrcweir been obatined from the user, but store it in the output-parameter Data, and return 347cdf0e10cSrcweir <member>InteractiveSelectionResult::ObtainedValue</member>.</p> 348cdf0e10cSrcweir 349cdf0e10cSrcweir <p>If a handler sets the new property value directly, and returns 350cdf0e10cSrcweir <member>InteractiveSelectionResult::ObtainedValue</member>, this implies that the property 351cdf0e10cSrcweir cannot properly be handled in case the object inspector is inspecting an intersection of 352cdf0e10cSrcweir multiple components, since in this case <member>onInteractivePropertySelection</member> 353cdf0e10cSrcweir will be called at one handler only, however the new property would have to be forwarded to 354cdf0e10cSrcweir all handlers.</p> 355cdf0e10cSrcweir 356cdf0e10cSrcweir <p>If a property is not composeable, directly setting the new property value does not yield any problem, 357cdf0e10cSrcweir as long as property listeners are properly notified of the change.</p> 358cdf0e10cSrcweir 359cdf0e10cSrcweir @param PropertyName 360cdf0e10cSrcweir The name of the property whose browse button has been clicked 361cdf0e10cSrcweir 362cdf0e10cSrcweir @param Primary 363cdf0e10cSrcweir <TRUE/> if and only if the primary button has been clicked, <FALSE/> otherwise 364cdf0e10cSrcweir 365cdf0e10cSrcweir @param out_Data 366cdf0e10cSrcweir If the method returns <member>InteractiveSelectionResult::ObtainedValue</member>, 367cdf0e10cSrcweir then <arg>out_Data</arg> contains the value which has been interactively obtained 368cdf0e10cSrcweir from the user, and which still needs to be set at the inspected component. 369cdf0e10cSrcweir 370cdf0e10cSrcweir @param InspectorUI 371cdf0e10cSrcweir provides access to the object inspector UI. Implementations should use this if 372cdf0e10cSrcweir the property selection requires non-modal user input. In those cases, 373cdf0e10cSrcweir <member>onInteractivePropertySelection</member> should return <member>InteractiveSelectionResult::Pending</member>, 374cdf0e10cSrcweir and the UI for (at least) the property whose input is still pending should be disabled. 375cdf0e10cSrcweir 376cdf0e10cSrcweir @return 377cdf0e10cSrcweir the result of the interactive property value selection. 378cdf0e10cSrcweir 379cdf0e10cSrcweir @throws com::sun::star::beans::UnknownPropertyException 380cdf0e10cSrcweir if the given property is not supported by the property handler 381cdf0e10cSrcweir @throws com::sun::star::lang::NullPointerException 382cdf0e10cSrcweir if <arg>InspectorUI</arg> is <NULL/> 383cdf0e10cSrcweir 384cdf0e10cSrcweir @see describePropertyLine 385cdf0e10cSrcweir @see addPropertyChangeListener 386cdf0e10cSrcweir @see isComposable 387cdf0e10cSrcweir */ 388cdf0e10cSrcweir ::com::sun::star::inspection::InteractiveSelectionResult 389cdf0e10cSrcweir onInteractivePropertySelection( 390cdf0e10cSrcweir [in] string PropertyName, 391cdf0e10cSrcweir [in] boolean Primary, 392cdf0e10cSrcweir [out] any out_Data, 393cdf0e10cSrcweir [in] XObjectInspectorUI InspectorUI 394cdf0e10cSrcweir ) 395cdf0e10cSrcweir raises (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException); 396cdf0e10cSrcweir 397cdf0e10cSrcweir /** updates the UI of dependent properties when the value of a certain actuating property changed 398cdf0e10cSrcweir 399cdf0e10cSrcweir <p>This method is called whenever a property value changes, limited to those properties 400cdf0e10cSrcweir whose changes the handler expressed interest in (see <member>getActuatingProperties</member>).</p> 401cdf0e10cSrcweir 402cdf0e10cSrcweir @param ActuatingPropertyName 403cdf0e10cSrcweir the id of the actuating property. 404cdf0e10cSrcweir @param NewValue 405cdf0e10cSrcweir the new value of the property 406cdf0e10cSrcweir @param OldValue 407cdf0e10cSrcweir the old value of the property 408cdf0e10cSrcweir @param InspectorUI 409cdf0e10cSrcweir a callback for updating the object inspector UI 410cdf0e10cSrcweir @param FirstTimeInit 411cdf0e10cSrcweir If <TRUE/>, the method is called for the first-time update of the respective property, that 412cdf0e10cSrcweir is, when the property browser is just initializing with the properties of the introspected 413cdf0e10cSrcweir object.<br/> 414cdf0e10cSrcweir If <FALSE/>, there was a real <member scope="com::sun::star::beans">XPropertyChangeListener::propertyChange</member> 415cdf0e10cSrcweir event which triggered the call.<br/> 416cdf0e10cSrcweir <br/> 417cdf0e10cSrcweir In some cases it may be necessary to differentiate between both situations. For instance, 418cdf0e10cSrcweir if you want to set the value of another property when an actuating property's value changed, 419cdf0e10cSrcweir you should definately not do this when <arg>FirstTimeInit</arg> is <TRUE/>. 420cdf0e10cSrcweir @throws com::sun::star::lang::NullPointerException 421cdf0e10cSrcweir if <arg>InspectorUI</arg> is <NULL/> 422cdf0e10cSrcweir */ 423cdf0e10cSrcweir void 424cdf0e10cSrcweir actuatingPropertyChanged( 425cdf0e10cSrcweir [in] string ActuatingPropertyName, 426cdf0e10cSrcweir [in] any NewValue, 427cdf0e10cSrcweir [in] any OldValue, 428cdf0e10cSrcweir [in] XObjectInspectorUI InspectorUI, 429cdf0e10cSrcweir [in] boolean FirstTimeInit 430cdf0e10cSrcweir ) 431cdf0e10cSrcweir raises (::com::sun::star::lang::NullPointerException); 432cdf0e10cSrcweir 433cdf0e10cSrcweir /** suspends the handler 434cdf0e10cSrcweir 435cdf0e10cSrcweir <p>A <type>XPropertyHandler</type> is used by a <type>XObjectInspector</type> instance, 436cdf0e10cSrcweir which implements the XController interface. By definition, a XObjectInspector always forwards 437cdf0e10cSrcweir all suspend requests (<member scope="com::sun::star::frame">XController::suspend</member>) to 438cdf0e10cSrcweir all it's handlers.</p> 439cdf0e10cSrcweir 440cdf0e10cSrcweir <p>The usual use case for this method are non-modal user interface components used 441cdf0e10cSrcweir for property value input. Such a component might have been opened during 442cdf0e10cSrcweir <member>onInteractivePropertySelection</member>. If a property handler receives a 443cdf0e10cSrcweir <member>suspend</member> call, it should forward the suspension request to the UI 444cdf0e10cSrcweir component, and veto suspension of the <type>XObjectInspector</type> as appropriate.</p> 445cdf0e10cSrcweir 446cdf0e10cSrcweir <p>If suspension is not to be vetoed, then all non-modal UI components opened 447cdf0e10cSrcweir by the handler should have been closed when it returns from the <member>suspend</member> call.</p> 448cdf0e10cSrcweir 449cdf0e10cSrcweir @param Suspend 450cdf0e10cSrcweir Whether the handler is to be suspended <TRUE/> or reactivated (<FALSE/>). The 451cdf0e10cSrcweir latter happens if a handler was successfully suspended, but an external instance 452cdf0e10cSrcweir vetoed the whole suspension process. 453cdf0e10cSrcweir 454cdf0e10cSrcweir @return 455cdf0e10cSrcweir <TRUE/> if the handler does allow suspension, <FALSE/> if it vetoes it. 456cdf0e10cSrcweir */ 457cdf0e10cSrcweir boolean suspend( [in] boolean Suspend ); 458cdf0e10cSrcweir}; 459cdf0e10cSrcweir 460cdf0e10cSrcweir//============================================================================= 461cdf0e10cSrcweir 462cdf0e10cSrcweir}; }; }; }; 463cdf0e10cSrcweir 464cdf0e10cSrcweir#endif 465cdf0e10cSrcweir 466cdf0e10cSrcweir 467cdf0e10cSrcweir 468