1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_form_validation_ValidatableControlModel_idl__ 29#define __com_sun_star_form_validation_ValidatableControlModel_idl__ 30 31#ifndef __com_sun_star_form_FormControlModel_idl__ 32#include <com/sun/star/form/FormControlModel.idl> 33#endif 34 35#ifndef __com_sun_star_form_validation_XValidatableFormComponent_idl__ 36#include <com/sun/star/form/validation/XValidatableFormComponent.idl> 37#endif 38 39#ifndef __com_sun_star_form_validation_XValidityConstraintListener_idl__ 40#include <com/sun/star/form/validation/XValidityConstraintListener.idl> 41#endif 42 43//============================================================================= 44 45module com { module sun { module star { module form { module validation { 46 47/** specifies the model of a form control which supports live validation of its 48 input. 49 50 <p>Validatable control models support setting a validator with dynamic 51 validity constraints, and broadcasting changes in their value as well as the 52 validity of their value.</p> 53*/ 54service ValidatableControlModel 55{ 56 /** specifies the basic functionality for a form control model 57 58 <p>Via this service, validatable control models inherit the 59 <type scope="com::sun::star::util">XCloneable</type> interface.<br/> 60 If an validatable control model, at which a validator has been set (via 61 <member>XValidatable::setValidator</member>), is being cloned, then the 62 validator is also set at the clone. Effectively, this means that 63 both control model instances share the same validator instance.</p> 64 */ 65 service com::sun::star::form::FormControlModel; 66 67 /** enables support for validating the value of the control model 68 69 <p>Setting an retrieving the current validator of the control model is 70 possible via the <type>XValidatable</type> interface (which 71 <type>XValidatableFormComponent</type> is derived from).</p> 72 73 <p>Easy access to the current value of the control, as well as it's validity 74 (relative to the active validator), is provided by the methods <member>XValidatableFormComponent::isValid</member> 75 and <member>XValidatableFormComponent::getCurrentValue</member>.</p> 76 77 <p>Note that the type of the value provided by <member>XValidatableFormComponent::getCurrentValue</member> 78 is not specified here, but depends on the concrete control type.</p> 79 */ 80 interface XValidatableFormComponent; 81 82 /** enables support for validators with dynamic validity constraints. 83 84 <p>As soon as a validator is set via <member>XValidatable::setValidator</member>, the validatable 85 control model registers itself as listener. If the validity constraint of the validator 86 changes, the <type>ValidatableControlModel</type> re-validates it's current valid, and 87 broadcasts any resuling changes to all its <type>XFormComponentValidityListener</type>, if 88 necessary.</p> 89 */ 90 interface XValidityConstraintListener; 91}; 92 93//============================================================================= 94 95}; }; }; }; }; 96 97#endif 98