1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ValueBinding.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_form_binding_ValueBinding_idl__
32 #define __com_sun_star_form_binding_ValueBinding_idl__
34 #ifndef __com_sun_star_util_XValueBinding_idl__
35 #include
<com
/sun
/star
/form
/binding
/XValueBinding.idl
>
37 #ifndef __com_sun_star_beans_XPropertySet_idl__
38 #include
<com
/sun
/star
/beans
/XPropertySet.idl
>
40 #ifndef __com_sun_star_lang_XComponent_idl__
41 #include
<com
/sun
/star
/lang
/XComponent.idl
>
43 #ifndef __com_sun_star_util_XModifyBroadcaster_idl__
44 #include
<com
/sun
/star
/util
/XModifyBroadcaster.idl
>
47 //=============================================================================
49 module com
{ module sun
{ module star
{ module form
{ module binding
{
51 //=============================================================================
53 /** defines a component which allows access to a single value
55 <p>Read/Write access to the value represented by this component is supported,
56 as well as (optionally) active broadcasting of value changes</p>
60 /** determines whether the value is currently readonly
62 <p>For instance, you could imagine a <type>ValueBinding</type> which
63 represents a cell in a spreadsheet document, and whose value is readonly
64 as long as the spreadsheet is locked.</p>
66 <p>As long as this property is <TRUE/>, the value binding should throw
67 a <type>InvalidBindingStateException</type> when its
68 <member>XValueBinding::setValue</member> method is invoked.</p>
70 [optional, property
, bound
, readonly] boolean ReadOnly;
72 /** determines the relevance of the value represented by the binding
74 <p>In a more complex scenario, where different form controls are bound to different
75 values, which all are part of a larger data structure, some of the items in this
76 data structure may not be relevant currently. This is indicated by the
77 <member>Relevant</member> property being <FALSE/>.</p>
79 <p><type>XBindableValue</type>s which are bound to this binding may or may not
80 react in certain ways on the (ir)relevance of their bound value.</p>
82 <p>One possible reaction could be that user interface elements which are associated
83 with the <type>XBindableValue</type> are disabled as long as <member>Relevant</member>
86 [optional, property
, bound
, readonly] boolean Relevant
;
88 //-------------------------------------------------------------------------
89 /** allows access to the properties of the binding
91 [optional] interface com
::sun
::star
::beans
::XPropertySet
;
93 //-------------------------------------------------------------------------
94 /** allows read and write access to the value represented by this binding
96 interface XValueBinding
;
98 /** allows other components to be notified when the value represented
99 by the <type>ValueBinding</type> instance changes.
101 <p>This interface is optional, since a binding may not support
102 actively notifying changes in it's value. Note, however, that in case
103 this interface is not supported, the bound component cannot react
104 on value changes, and will thus override any values which are
105 set by an instance other than itself.</p>
107 [optional] interface com
::sun
::star
::util
::XModifyBroadcaster
;
109 /** allows life time control for the component
111 <p>An <type>ValueBinding</type> may be known to one ore more components
112 supporting the <type>XBindableValue</type> interface, which all work with
113 this binding. However, they will not <em>own</em> the <type>ValueBinding</type>.
114 The ownership is with another instance, which may also decide to obsolete
115 the <type>ValueBinding</type> for whatever reasons (e.g. because the data model
116 which the binding reflected died). For this reason, a <type>ValueBinding</type>
117 must offer a possibility to be obsoleted by it's owner, and to notify this
118 obsoletion to other interested parties, such as <type>XBindableValue</type>s.</p>
120 interface com
::sun
::star
::lang
::XComponent
;
123 //=============================================================================