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