merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / form / binding / ValueBinding.idl
blobf7c99e8ca6af5df9056177bf4911e729b89d561b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_form_binding_ValueBinding_idl__
29 #define __com_sun_star_form_binding_ValueBinding_idl__
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
44 //=============================================================================
46 module com { module sun { module star { module form { module binding {
48 //=============================================================================
50 /** defines a component which allows access to a single value
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>
55 service ValueBinding
57 /** determines whether the value is currently readonly
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>
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>
67 [optional, property, bound, readonly] boolean ReadOnly;
69 /** determines the relevance of the value represented by the binding
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>
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>
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>
83 [optional, property, bound, readonly] boolean Relevant;
85 //-------------------------------------------------------------------------
86 /** allows access to the properties of the binding
88 [optional] interface com::sun::star::beans::XPropertySet;
90 //-------------------------------------------------------------------------
91 /** allows read and write access to the value represented by this binding
93 interface XValueBinding;
95 /** allows other components to be notified when the value represented
96 by the <type>ValueBinding</type> instance changes.
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>
104 [optional] interface com::sun::star::util::XModifyBroadcaster;
106 /** allows life time control for the component
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>
117 interface com::sun::star::lang::XComponent;
120 //=============================================================================
122 }; }; }; }; };
124 #endif