cid#1636693 COPY_INSTEAD_OF_MOVE
[LibreOffice.git] / offapi / com / sun / star / form / binding / ValueBinding.idl
blob3562e6d23240d31cb0de3dc9f85a44548052ce1a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 module com { module sun { module star { module form { module binding {
24 /** defines a component which allows access to a single value
26 <p>Read/Write access to the value represented by this component is supported,
27 as well as (optionally) active broadcasting of value changes</p>
29 service ValueBinding
31 /** determines whether the value is currently readonly
33 <p>For instance, you could imagine a ValueBinding which
34 represents a cell in a spreadsheet document, and whose value is readonly
35 as long as the spreadsheet is locked.</p>
37 <p>As long as this property is `TRUE`, the value binding should throw
38 an InvalidBindingStateException when its
39 XValueBinding::setValue() method is invoked.</p>
41 [optional, property, bound, readonly] boolean ReadOnly;
43 /** determines the relevance of the value represented by the binding
45 <p>In a more complex scenario, where different form controls are bound to different
46 values, which all are part of a larger data structure, some of the items in this
47 data structure may not be relevant currently. This is indicated by the
48 #Relevant property being `FALSE`.</p>
50 <p>XBindableValues which are bound to this binding may or may not
51 react in certain ways on the (ir)relevance of their bound value.</p>
53 <p>One possible reaction could be that user interface elements which are associated
54 with the XBindableValue are disabled as long as #Relevant
55 is `FALSE`.</p>
57 [optional, property, bound, readonly] boolean Relevant;
59 /** allows access to the properties of the binding
61 [optional] interface com::sun::star::beans::XPropertySet;
63 /** allows read and write access to the value represented by this binding
65 interface XValueBinding;
67 /** allows other components to be notified when the value represented
68 by the ValueBinding instance changes.
70 <p>This interface is optional, since a binding may not support
71 actively notifying changes in its value. Note, however, that in case
72 this interface is not supported, the bound component cannot react
73 on value changes, and will thus override any values which are
74 set by an instance other than itself.</p>
76 [optional] interface com::sun::star::util::XModifyBroadcaster;
78 /** allows life time control for the component
80 <p>A ValueBinding may be known to one or more components
81 supporting the XBindableValue interface, which all work with
82 this binding. However, they will not <em>own</em> the ValueBinding.
83 The ownership is with another instance, which may also decide to obsolete
84 the ValueBinding for whatever reasons (e.g. because the data model
85 which the binding reflected died). For this reason, a ValueBinding
86 must offer a possibility to be obsoleted by its owner, and to notify this
87 obsoleteness to other interested parties, such as XBindableValues.</p>
89 interface com::sun::star::lang::XComponent;
93 }; }; }; }; };
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */