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_BindableControlModel_idl__ 25#define __com_sun_star_form_binding_BindableControlModel_idl__ 26 27#ifndef __com_sun_star_form_binding_XBindableValue_idl__ 28#include <com/sun/star/form/binding/XBindableValue.idl> 29#endif 30#ifndef __com_sun_star_form_FormControlModel_idl__ 31#include <com/sun/star/form/FormControlModel.idl> 32#endif 33 34//============================================================================= 35 36module com { module sun { module star { module form { module binding { 37 38/** specifies the model of a form control which supports binding to an external 39 value supplier. 40*/ 41service BindableControlModel 42{ 43 /** specifies the basic functionality for a form control model 44 45 <p>Via this service, bindable control models inherit the 46 <type scope="com::sun::star::util">XCloneable</type> interface.<br/> 47 If an bindable control model, at which a binding has been established (via 48 <member>XBindableValue::setValueBinding</member>), is being cloned, then the 49 binding is also established at the clone. Effectively, this means that 50 both control model instances share the same binding instance.</p> 51 */ 52 service com::sun::star::form::FormControlModel; 53 54 /** specifies support for being bound to an external value 55 56 <p>When a <type>BindableControlModel</type> is bound to an external value, 57 then every change in the control model's value is <em>immediately</em> reflected 58 in the external binding.</p> 59 60 <p>If the binding set via this interface supports the <member>ValueBinding::ReadOnly</member> 61 and <member>ValueBinding::Relevant</member> properties, they're respected by the control model: 62 <ul><li>The control model's own <code>ReadOnly</code> property (if present) is kept in sync with the 63 binding's <code>ReadOnly</code> property. That is, any control using the value 64 binding is read-only as long as the binding is.</li> 65 <li>The control model's own <code>Enabled</code> property (if present) is kept in sync 66 with the binding's <code>Relevant</code> property. That is, any control using 67 the value binding is disabled as long as the binding is not relevant.</li> 68 </ul> 69 </p> 70 71 <p>In both cases, explicit changes of the model's property are ignored if they would relax 72 the restriction imposed by the binding.<br/> 73 For instance, if the binding declares it's value to 74 be read-only (indicated by <member>ValueBinding::ReadOnly</member> being <TRUE/>), then 75 any attempt to set the <code>ReadOnly</code> property of the control model to <FALSE/> will 76 fail. However, if the binding's value is not read-only, then the <code>ReadOnly</code> 77 property at the control model can be freely set.<br/> 78 The very same holds for the binding's <member>ValueBinding::Relevant</member> and the control 79 model's <code>Enabled</code> properties.</p> 80 */ 81 interface XBindableValue; 82}; 83 84//============================================================================= 85 86}; }; }; }; }; 87 88#endif 89