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
24#ifndef __com_sun_star_task_XStatusIndicator_idl__
25#define __com_sun_star_task_XStatusIndicator_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31//=============================================================================
32
33 module com { module sun { module star { module task {
34
35//=============================================================================
36/** controls a status indicator which displays progress of
37	longer actions to the user
38
39	<p>
40	Such objects are provided by a <type>XStatusIndicatorFactory</type>.
41	</p>
42
43	@see XStatusIndicatorFactory
44 */
45published interface XStatusIndicator: com::sun::star::uno::XInterface
46{
47	//-------------------------------------------------------------------------
48	/** initialize and start the progress
49
50		<p>
51		It activates a new created or reactivate an already used indicator
52		(must be finished by calling <member>XStatusIndicator::end()</member>
53		before!). By the way it's possible to set first progress description
54		and the possible range of progress value. That means that a progress
55		can runs from 0 to <var>Range</var>.
56		</p>
57
58		@param Text
59			initial value for progress description for showing
60			Value can be updated by calling <member>XStatusIndicator::setText()</member>.
61
62		@param Range
63			means the maximum value of the progress which can be set by
64			calling <member>XStatusIndicator::setValue()</member>.
65	 */
66	[oneway] void start(
67		[in] string Text,
68		[in] long Range);
69
70	//-------------------------------------------------------------------------
71	/** stop the progress
72
73		<p>
74		Further calls of <member>XStatusIndicator::setText()</member>,
75		<member>XStatusIndicator::setValue()</member> or
76		<member>XStatusIndicator::reset()</member> must be ignored.
77		Only <member>XStatusIndicator::start()</member> can reactivate this
78		indicator.
79		It's not allowed to destruct the indicator inside this method.
80		The instance must be gone by using ref count or disposing.
81		</p>
82	*/
83	[oneway] void end();
84
85	//-------------------------------------------------------------------------
86	/** update progress description
87
88		<p>
89		Initial value can be set during starting of the progress by calling
90		<member>XStatusIndicator::start()</member>.
91		Stopped indicators must ignore this call.
92		</p>
93
94		@param Text
95			new value for progress description which should be shown now
96	 */
97	[oneway] void setText( [in] string Text );
98
99	//-------------------------------------------------------------------------
100	/** update progress value
101
102		<p>
103		Wrong values must be ignored and stopped indicators must ignore this
104		call generally.
105		</p>
106
107		@param Value
108			new value for progress which should be shown now
109			Must fit the range [0..Range] which was set during
110			<member>XStatusIndicator::start()</member>.
111	 */
112	[oneway] void setValue( [in] long Value );
113
114	//-------------------------------------------------------------------------
115	/** clear progress value and description
116
117		<p>
118		Calling of setValue(0) and setText("") should do the same.
119		Stopped indicators must ignore this call.
120		</p>
121	 */
122	[oneway] void reset();
123};
124
125}; }; }; };
126
127#endif
128