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