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