1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir#ifndef __com_sun_star_form_validation_ValidatableControlModel_idl__
25cdf0e10cSrcweir#define __com_sun_star_form_validation_ValidatableControlModel_idl__
26cdf0e10cSrcweir
27cdf0e10cSrcweir#ifndef __com_sun_star_form_FormControlModel_idl__
28cdf0e10cSrcweir#include <com/sun/star/form/FormControlModel.idl>
29cdf0e10cSrcweir#endif
30cdf0e10cSrcweir
31cdf0e10cSrcweir#ifndef __com_sun_star_form_validation_XValidatableFormComponent_idl__
32cdf0e10cSrcweir#include <com/sun/star/form/validation/XValidatableFormComponent.idl>
33cdf0e10cSrcweir#endif
34cdf0e10cSrcweir
35cdf0e10cSrcweir#ifndef __com_sun_star_form_validation_XValidityConstraintListener_idl__
36cdf0e10cSrcweir#include <com/sun/star/form/validation/XValidityConstraintListener.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir
39cdf0e10cSrcweir//=============================================================================
40cdf0e10cSrcweir
41cdf0e10cSrcweirmodule com {  module sun {  module star {  module form { module validation {
42cdf0e10cSrcweir
43cdf0e10cSrcweir/** specifies the model of a form control which supports live validation of its
44cdf0e10cSrcweir    input.
45cdf0e10cSrcweir
46cdf0e10cSrcweir    <p>Validatable control models support setting a validator with dynamic
47cdf0e10cSrcweir    validity constraints, and broadcasting changes in their value as well as the
48cdf0e10cSrcweir    validity of their value.</p>
49cdf0e10cSrcweir*/
50cdf0e10cSrcweirservice ValidatableControlModel
51cdf0e10cSrcweir{
52cdf0e10cSrcweir    /** specifies the basic functionality for a form control model
53cdf0e10cSrcweir
54cdf0e10cSrcweir        <p>Via this service, validatable control models inherit the
55cdf0e10cSrcweir        <type scope="com::sun::star::util">XCloneable</type> interface.<br/>
56cdf0e10cSrcweir        If an validatable control model, at which a validator has been set (via
57cdf0e10cSrcweir        <member>XValidatable::setValidator</member>), is being cloned, then the
58cdf0e10cSrcweir        validator is also set at the clone. Effectively, this means that
59cdf0e10cSrcweir        both control model instances share the same validator instance.</p>
60cdf0e10cSrcweir    */
61cdf0e10cSrcweir    service com::sun::star::form::FormControlModel;
62cdf0e10cSrcweir
63cdf0e10cSrcweir    /** enables support for validating the value of the control model
64cdf0e10cSrcweir
65cdf0e10cSrcweir        <p>Setting an retrieving the current validator of the control model is
66cdf0e10cSrcweir        possible via the <type>XValidatable</type> interface (which
67cdf0e10cSrcweir        <type>XValidatableFormComponent</type> is derived from).</p>
68cdf0e10cSrcweir
69cdf0e10cSrcweir        <p>Easy access to the current value of the control, as well as it's validity
70cdf0e10cSrcweir        (relative to the active validator), is provided by the methods <member>XValidatableFormComponent::isValid</member>
71cdf0e10cSrcweir        and <member>XValidatableFormComponent::getCurrentValue</member>.</p>
72cdf0e10cSrcweir
73cdf0e10cSrcweir        <p>Note that the type of the value provided by <member>XValidatableFormComponent::getCurrentValue</member>
74cdf0e10cSrcweir        is not specified here, but depends on the concrete control type.</p>
75cdf0e10cSrcweir    */
76cdf0e10cSrcweir    interface XValidatableFormComponent;
77cdf0e10cSrcweir
78cdf0e10cSrcweir    /** enables support for validators with dynamic validity constraints.
79cdf0e10cSrcweir
80cdf0e10cSrcweir        <p>As soon as a validator is set via <member>XValidatable::setValidator</member>, the validatable
81cdf0e10cSrcweir        control model registers itself as listener. If the validity constraint of the validator
82cdf0e10cSrcweir        changes, the <type>ValidatableControlModel</type> re-validates it's current valid, and
83cdf0e10cSrcweir        broadcasts any resuling changes to all its <type>XFormComponentValidityListener</type>, if
84cdf0e10cSrcweir        necessary.</p>
85cdf0e10cSrcweir    */
86cdf0e10cSrcweir    interface XValidityConstraintListener;
87cdf0e10cSrcweir};
88cdf0e10cSrcweir
89cdf0e10cSrcweir//=============================================================================
90cdf0e10cSrcweir
91cdf0e10cSrcweir}; }; }; }; };
92cdf0e10cSrcweir
93cdf0e10cSrcweir#endif
94