update dev300-m58
[ooovba.git] / offapi / com / sun / star / form / binding / BindableControlModel.idl
blobe5d68026151035bb71c86ddee78b9c2e4997e4b1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: BindableControlModel.idl,v $
10 * $Revision: 1.6 $
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_BindableControlModel_idl__
32 #define __com_sun_star_form_binding_BindableControlModel_idl__
34 #ifndef __com_sun_star_form_binding_XBindableValue_idl__
35 #include <com/sun/star/form/binding/XBindableValue.idl>
36 #endif
37 #ifndef __com_sun_star_form_FormControlModel_idl__
38 #include <com/sun/star/form/FormControlModel.idl>
39 #endif
41 //=============================================================================
43 module com { module sun { module star { module form { module binding {
45 /** specifies the model of a form control which supports binding to an external
46 value supplier.
48 service BindableControlModel
50 /** specifies the basic functionality for a form control model
52 <p>Via this service, bindable control models inherit the
53 <type scope="com::sun::star::util">XCloneable</type> interface.<br/>
54 If an bindable control model, at which a binding has been established (via
55 <member>XBindableValue::setValueBinding</member>), is being cloned, then the
56 binding is also established at the clone. Effectively, this means that
57 both control model instances share the same binding instance.</p>
59 service com::sun::star::form::FormControlModel;
61 /** specifies support for being bound to an external value
63 <p>When a <type>BindableControlModel</type> is bound to an external value,
64 then every change in the control model's value is <em>immediately</em> reflected
65 in the external binding.</p>
67 <p>If the binding set via this interface supports the <member>ValueBinding::ReadOnly</member>
68 and <member>ValueBinding::Relevant</member> properties, they're respected by the control model:
69 <ul><li>The control model's own <code>ReadOnly</code> property (if present) is kept in sync with the
70 binding's <code>ReadOnly</code> property. That is, any control using the value
71 binding is read-only as long as the binding is.</li>
72 <li>The control model's own <code>Enabled</code> property (if present) is kept in sync
73 with the binding's <code>Relevant</code> property. That is, any control using
74 the value binding is disabled as long as the binding is not relevant.</li>
75 </ul>
76 </p>
78 <p>In both cases, explicit changes of the model's property are ignored if they would relax
79 the restriction imposed by the binding.<br/>
80 For instance, if the binding declares it's value to
81 be read-only (indicated by <member>ValueBinding::ReadOnly</member> being <TRUE/>), then
82 any attempt to set the <code>ReadOnly</code> property of the control model to <FALSE/> will
83 fail. However, if the binding's value is not read-only, then the <code>ReadOnly</code>
84 property at the control model can be freely set.<br/>
85 The very same holds for the binding's <member>ValueBinding::Relevant</member> and the control
86 model's <code>Enabled</code> properties.</p>
88 interface XBindableValue;
91 //=============================================================================
93 }; }; }; }; };
95 #endif