1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_beans_XPropertyWithState_idl__
24#define __com_sun_star_beans_XPropertyWithState_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_beans_PropertyState_idl__
31#include <com/sun/star/beans/PropertyState.idl>
32#endif
33
34#ifndef __com_sun_star_lang_WrappedTargetException_idl__
35#include <com/sun/star/lang/WrappedTargetException.idl>
36#endif
37
38//=============================================================================
39
40module com {  module sun {  module star {  module beans {
41
42//=============================================================================
43
44/** makes it possible to query information about the state of
45	this object, seen as a property contained in a property set.
46
47	<p> This interface provides direct access to operations
48		that are available if the containing property set
49		implements <type>XPropertyState</type>.
50	</p>
51
52	<p>The state contains the information if:</p>
53	<ul>
54		<li>a value is available or void</li>
55		<li>the value is stored in the object itself, or if a default value is being used</li>
56		<li>or if the value cannot be determined, due to ambiguity
57			(multi selection with multiple values).</li>
58	</ul>
59
60	<p>	Generally objects that implement this interface
61		also implement <type>XProperty</type>.
62	</p>
63 */
64published interface XPropertyWithState: com::sun::star::uno::XInterface
65{
66	//-------------------------------------------------------------------------
67
68	/** @returns
69				the state of this as a property.
70	 */
71	com::sun::star::beans::PropertyState getStateAsProperty( );
72
73	//-------------------------------------------------------------------------
74
75	/** sets this to its default value.
76
77		<p>	The value depends on the implementation of this interface.
78			If this is a bound property, the value changes before
79			the change events are fired.  If this is a constrained property,
80			the vetoable event is fired before the property value changes.
81		</p>
82
83			@throws  com::sun::star::lang::WrappedTargetException
84				if the implementation has an internal reason for the exception.
85				In this case the original exception is wrapped into that
86				<type scope="com::sun::star::lang">WrappedTargetException</type>.
87	 */
88	void setToDefaultAsProperty( )
89			raises( com::sun::star::lang::WrappedTargetException );
90
91	//-------------------------------------------------------------------------
92
93	/**		@returns
94				an object representing the default state of this object (as a property).
95
96			<p>	If no default exists, is not known or is void,
97				then the return value is <NULL/>.
98			</p>
99
100			@throws  com::sun::star::lang::WrappedTargetException
101				if the implementation has an internal reason for the exception.
102				In this case the original exception is wrapped into that
103				<type scope="com::sun::star::lang">WrappedTargetException</type>.
104	 */
105	com::sun::star::uno::XInterface getDefaultAsProperty( )
106			raises( com::sun::star::lang::WrappedTargetException );
107};
108
109//=============================================================================
110
111}; }; }; };
112
113#endif
114