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 24#ifndef __com_sun_star_form_binding_ValueBinding_idl__ 25#define __com_sun_star_form_binding_ValueBinding_idl__ 26 27#ifndef __com_sun_star_util_XValueBinding_idl__ 28#include <com/sun/star/form/binding/XValueBinding.idl> 29#endif 30#ifndef __com_sun_star_beans_XPropertySet_idl__ 31#include <com/sun/star/beans/XPropertySet.idl> 32#endif 33#ifndef __com_sun_star_lang_XComponent_idl__ 34#include <com/sun/star/lang/XComponent.idl> 35#endif 36#ifndef __com_sun_star_util_XModifyBroadcaster_idl__ 37#include <com/sun/star/util/XModifyBroadcaster.idl> 38#endif 39 40//============================================================================= 41 42module com { module sun { module star { module form { module binding { 43 44//============================================================================= 45 46/** defines a component which allows access to a single value 47 48 <p>Read/Write access to the value represented by this component is supported, 49 as well as (optionally) active broadcasting of value changes</p> 50*/ 51service ValueBinding 52{ 53 /** determines whether the value is currently readonly 54 55 <p>For instance, you could imagine a <type>ValueBinding</type> which 56 represents a cell in a spreadsheet document, and whose value is readonly 57 as long as the spreadsheet is locked.</p> 58 59 <p>As long as this property is <TRUE/>, the value binding should throw 60 a <type>InvalidBindingStateException</type> when its 61 <member>XValueBinding::setValue</member> method is invoked.</p> 62 */ 63 [optional, property, bound, readonly] boolean ReadOnly; 64 65 /** determines the relevance of the value represented by the binding 66 67 <p>In a more complex scenario, where different form controls are bound to different 68 values, which all are part of a larger data structure, some of the items in this 69 data structure may not be relevant currently. This is indicated by the 70 <member>Relevant</member> property being <FALSE/>.</p> 71 72 <p><type>XBindableValue</type>s which are bound to this binding may or may not 73 react in certain ways on the (ir)relevance of their bound value.</p> 74 75 <p>One possible reaction could be that user interface elements which are associated 76 with the <type>XBindableValue</type> are disabled as long as <member>Relevant</member> 77 is <FALSE/>.</p> 78 */ 79 [optional, property, bound, readonly] boolean Relevant; 80 81 //------------------------------------------------------------------------- 82 /** allows access to the properties of the binding 83 */ 84 [optional] interface com::sun::star::beans::XPropertySet; 85 86 //------------------------------------------------------------------------- 87 /** allows read and write access to the value represented by this binding 88 */ 89 interface XValueBinding; 90 91 /** allows other components to be notified when the value represented 92 by the <type>ValueBinding</type> instance changes. 93 94 <p>This interface is optional, since a binding may not support 95 actively notifying changes in it's value. Note, however, that in case 96 this interface is not supported, the bound component cannot react 97 on value changes, and will thus override any values which are 98 set by an instance other than itself.</p> 99 */ 100 [optional] interface com::sun::star::util::XModifyBroadcaster; 101 102 /** allows life time control for the component 103 104 <p>An <type>ValueBinding</type> may be known to one ore more components 105 supporting the <type>XBindableValue</type> interface, which all work with 106 this binding. However, they will not <em>own</em> the <type>ValueBinding</type>. 107 The ownership is with another instance, which may also decide to obsolete 108 the <type>ValueBinding</type> for whatever reasons (e.g. because the data model 109 which the binding reflected died). For this reason, a <type>ValueBinding</type> 110 must offer a possibility to be obsoleted by it's owner, and to notify this 111 obsoletion to other interested parties, such as <type>XBindableValue</type>s.</p> 112 */ 113 interface com::sun::star::lang::XComponent; 114}; 115 116//============================================================================= 117 118}; }; }; }; }; 119 120#endif 121