update dev300-m58
[ooovba.git] / udkapi / com / sun / star / beans / XPropertyWithState.idl
blob70acc41dc055700687b11025b0c21baa7fc14279
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: XPropertyWithState.idl,v $
10 * $Revision: 1.12 $
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 ************************************************************************/
30 #ifndef __com_sun_star_beans_XPropertyWithState_idl__
31 #define __com_sun_star_beans_XPropertyWithState_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_beans_PropertyState_idl__
38 #include <com/sun/star/beans/PropertyState.idl>
39 #endif
41 #ifndef __com_sun_star_lang_WrappedTargetException_idl__
42 #include <com/sun/star/lang/WrappedTargetException.idl>
43 #endif
45 //=============================================================================
47 module com { module sun { module star { module beans {
49 //=============================================================================
51 /** makes it possible to query information about the state of
52 this object, seen as a property contained in a property set.
54 <p> This interface provides direct access to operations
55 that are available if the containing property set
56 implements <type>XPropertyState</type>.
57 </p>
59 <p>The state contains the information if:</p>
60 <ul>
61 <li>a value is available or void</li>
62 <li>the value is stored in the object itself, or if a default value is being used</li>
63 <li>or if the value cannot be determined, due to ambiguity
64 (multi selection with multiple values).</li>
65 </ul>
67 <p> Generally objects that implement this interface
68 also implement <type>XProperty</type>.
69 </p>
71 published interface XPropertyWithState: com::sun::star::uno::XInterface
73 //-------------------------------------------------------------------------
75 /** @returns
76 the state of this as a property.
78 com::sun::star::beans::PropertyState getStateAsProperty( );
80 //-------------------------------------------------------------------------
82 /** sets this to its default value.
84 <p> The value depends on the implementation of this interface.
85 If this is a bound property, the value changes before
86 the change events are fired. If this is a constrained property,
87 the vetoable event is fired before the property value changes.
88 </p>
90 @throws com::sun::star::lang::WrappedTargetException
91 if the implementation has an internal reason for the exception.
92 In this case the original exception is wrapped into that
93 <type scope="com::sun::star::lang">WrappedTargetException</type>.
95 void setToDefaultAsProperty( )
96 raises( com::sun::star::lang::WrappedTargetException );
98 //-------------------------------------------------------------------------
100 /** @returns
101 an object representing the default state of this object (as a property).
103 <p> If no default exists, is not known or is void,
104 then the return value is <NULL/>.
105 </p>
107 @throws com::sun::star::lang::WrappedTargetException
108 if the implementation has an internal reason for the exception.
109 In this case the original exception is wrapped into that
110 <type scope="com::sun::star::lang">WrappedTargetException</type>.
112 com::sun::star::uno::XInterface getDefaultAsProperty( )
113 raises( com::sun::star::lang::WrappedTargetException );
116 //=============================================================================
118 }; }; }; };
120 #endif