Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / form / binding / BindableDatabaseCheckBox.idl
blob278d05972ad78b9cde7b241c9b1ba86b321bc340
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: BindableDatabaseCheckBox.idl,v $
10 * $Revision: 1.5 $
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_BindableDatabaseCheckBox_idl__
32 #define __com_sun_star_form_binding_BindableDatabaseCheckBox_idl__
34 #ifndef __com_sun_star_form_component_DatabaseCheckBox_idl__
35 #include <com/sun/star/form/component/DatabaseCheckBox.idl>
36 #endif
38 #ifndef __com_sun_star_form_binding_BindableDataAwareControlModel_idl__
39 #include <com/sun/star/form/binding/BindableDataAwareControlModel.idl>
40 #endif
42 //=============================================================================
44 module com { module sun { module star { module form { module binding {
46 //=============================================================================
48 /** This service specifies a check box which is data-aware and thus can be bound to a
49 database field, and additionally supports binding to arbitrary external values.
51 <p>The <type scope="com::sun::star::form::binding">XValueBinding</type> instance which
52 can be associated with a <type>BindableDatabaseCheckBox</type> must support exchanging
53 boolean values. The following mapping between external values and control states apply:
54 <ul><li><TRUE/> will be mapped to the box being checked, and vice versa</li>
55 <li><FALSE/> will be mapped to it being unchecked, and vice versa</li>
56 <li><NULL/> will be mapped to it being in indetermined state, if the box currently supports
57 this, or being unchecked else. The indetermined of the check box will always be
58 mapped to <NULL/> when writing the external value.</li>
59 </ul></p>
61 <p>If the value binding associated with a <type>BindableDatabaseCheckBox</type>
62 supports exchanging string values, <em>and</em> the <member scope="com::sun::star::form::component">CheckBox::RefValue</member>
63 is <em>not</em> empty, then the radio button will exchange it's value as string:
64 <ul><li>A string equal to the reference value will be mapped to the button being checked, and vice versa</li>
65 <li>A string not equal to the reference value will be mapped to the button being unchecked, and vice versa</li>
66 <li><NULL/> will be mapped to it being in indetermined state</li>
67 </ul></p>
69 @see com::sun::star::form::binding::XValueBinding::supportsType
70 @see com::sun::star::awt::UnoControlCheckBoxModel::State
71 @see com::sun::star::awt::UnoControlCheckBoxModel::TriState
72 @see com::sun::star::form::component::CheckBox::RefValue
74 service BindableDatabaseCheckBox
76 service com::sun::star::form::component::DatabaseCheckBox;
78 /** specifies the interaction between an internal binding to a database column,
79 and an external value binding.</p>
81 service com::sun::star::form::binding::BindableDataAwareControlModel;
83 /** specifies a value which is to be associated with the control when it's <em>not</em>
84 checked.
86 <p><member scope="com::sun::star::form::component">CheckBox::RefValue</member> is transferred to
87 possible external value bindings as soon as the check box is checked. With the member
88 <member>SecondaryRefValue</member>, clients of the check box can also associate a value with
89 the <em>not checked</em> state of the control.</p>
91 [property] string SecondaryRefValue;
94 //=============================================================================
96 }; }; }; }; };
98 #endif