1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_task_XStatusIndicator_idl__
24*b1cdbd2cSJim Jagielski#define __com_sun_star_task_XStatusIndicator_idl__
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_uno_XInterface_idl__
27*b1cdbd2cSJim Jagielski#include <com/sun/star/uno/XInterface.idl>
28*b1cdbd2cSJim Jagielski#endif
29*b1cdbd2cSJim Jagielski
30*b1cdbd2cSJim Jagielski//=============================================================================
31*b1cdbd2cSJim Jagielski
32*b1cdbd2cSJim Jagielski module com {  module sun {  module star {  module task {
33*b1cdbd2cSJim Jagielski
34*b1cdbd2cSJim Jagielski//=============================================================================
35*b1cdbd2cSJim Jagielski/** controls a status indicator which displays progress of
36*b1cdbd2cSJim Jagielski    longer actions to the user
37*b1cdbd2cSJim Jagielski
38*b1cdbd2cSJim Jagielski    <p>
39*b1cdbd2cSJim Jagielski    Such objects are provided by a <type>XStatusIndicatorFactory</type>.
40*b1cdbd2cSJim Jagielski    </p>
41*b1cdbd2cSJim Jagielski
42*b1cdbd2cSJim Jagielski    @see XStatusIndicatorFactory
43*b1cdbd2cSJim Jagielski */
44*b1cdbd2cSJim Jagielskipublished interface XStatusIndicator: com::sun::star::uno::XInterface
45*b1cdbd2cSJim Jagielski{
46*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
47*b1cdbd2cSJim Jagielski    /** initialize and start the progress
48*b1cdbd2cSJim Jagielski
49*b1cdbd2cSJim Jagielski        <p>
50*b1cdbd2cSJim Jagielski        It activates a new created or reactivate an already used inidicator
51*b1cdbd2cSJim Jagielski        (must be finished by calling <member>XStatusIndicator::end()</member>
52*b1cdbd2cSJim Jagielski        before!). By the way it's possible to set first progress description
53*b1cdbd2cSJim Jagielski        and the possible range of progress value. That means that a progress
54*b1cdbd2cSJim Jagielski        can runs from 0 to <var>Range</var>.
55*b1cdbd2cSJim Jagielski        </p>
56*b1cdbd2cSJim Jagielski
57*b1cdbd2cSJim Jagielski        @param Text
58*b1cdbd2cSJim Jagielski            initial value for progress description for showing
59*b1cdbd2cSJim Jagielski            Value can be updated by calling <member>XStatusIndicator::setText()</member>.
60*b1cdbd2cSJim Jagielski
61*b1cdbd2cSJim Jagielski        @param Range
62*b1cdbd2cSJim Jagielski            mewns the maximum value of the progress which can be setted by
63*b1cdbd2cSJim Jagielski            calling <member>XStatusIndicator::setValue()</member>.
64*b1cdbd2cSJim Jagielski	 */
65*b1cdbd2cSJim Jagielski    [oneway] void start(
66*b1cdbd2cSJim Jagielski        [in] string Text,
67*b1cdbd2cSJim Jagielski        [in] long Range);
68*b1cdbd2cSJim Jagielski
69*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
70*b1cdbd2cSJim Jagielski    /** stop the progress
71*b1cdbd2cSJim Jagielski
72*b1cdbd2cSJim Jagielski        <p>
73*b1cdbd2cSJim Jagielski        Further calls of <member>XStatusIndicator::setText()</member>,
74*b1cdbd2cSJim Jagielski        <member>XStatusIndicator::setValue()</member> or
75*b1cdbd2cSJim Jagielski        <member>XStatusIndicator::reset()</member> must be ignored.
76*b1cdbd2cSJim Jagielski        Only <member>XStatusIndicator::start()</member> can reactivate this
77*b1cdbd2cSJim Jagielski        indicator.
78*b1cdbd2cSJim Jagielski        It's not allowed to destruct the indicator inside this method.
79*b1cdbd2cSJim Jagielski        The instance must be gone by using ref count or disposing.
80*b1cdbd2cSJim Jagielski        </p>
81*b1cdbd2cSJim Jagielski     */
82*b1cdbd2cSJim Jagielski	[oneway] void end();
83*b1cdbd2cSJim Jagielski
84*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
85*b1cdbd2cSJim Jagielski    /** update progress description
86*b1cdbd2cSJim Jagielski
87*b1cdbd2cSJim Jagielski        <p>
88*b1cdbd2cSJim Jagielski        Initial value can be set during starting of the progress by calling
89*b1cdbd2cSJim Jagielski        <member>XStatusIndicator::start()</member>.
90*b1cdbd2cSJim Jagielski        Stopped indicators must ignore this call.
91*b1cdbd2cSJim Jagielski        </p>
92*b1cdbd2cSJim Jagielski
93*b1cdbd2cSJim Jagielski        @param Text
94*b1cdbd2cSJim Jagielski            new value for progress description which should be shown now
95*b1cdbd2cSJim Jagielski	 */
96*b1cdbd2cSJim Jagielski    [oneway] void setText( [in] string Text );
97*b1cdbd2cSJim Jagielski
98*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
99*b1cdbd2cSJim Jagielski    /** update progress value
100*b1cdbd2cSJim Jagielski
101*b1cdbd2cSJim Jagielski        <p>
102*b1cdbd2cSJim Jagielski        Wrong values must be ignored and stopped indicators must ignore this
103*b1cdbd2cSJim Jagielski        call generaly.
104*b1cdbd2cSJim Jagielski        </p>
105*b1cdbd2cSJim Jagielski
106*b1cdbd2cSJim Jagielski        @param Value
107*b1cdbd2cSJim Jagielski            new value for progress which should be shown now
108*b1cdbd2cSJim Jagielski            Must fit the range [0..Range] which was set during
109*b1cdbd2cSJim Jagielski            <member>XStatusIndicator::start()</member>.
110*b1cdbd2cSJim Jagielski	 */
111*b1cdbd2cSJim Jagielski    [oneway] void setValue( [in] long Value );
112*b1cdbd2cSJim Jagielski
113*b1cdbd2cSJim Jagielski	//-------------------------------------------------------------------------
114*b1cdbd2cSJim Jagielski    /** clear progress value and description
115*b1cdbd2cSJim Jagielski
116*b1cdbd2cSJim Jagielski        <p>
117*b1cdbd2cSJim Jagielski        Calling of setValue(0) and setText("") should do the same.
118*b1cdbd2cSJim Jagielski        Stopped indicators must ignore this call.
119*b1cdbd2cSJim Jagielski        </p>
120*b1cdbd2cSJim Jagielski	 */
121*b1cdbd2cSJim Jagielski	[oneway] void reset();
122*b1cdbd2cSJim Jagielski};
123*b1cdbd2cSJim Jagielski
124*b1cdbd2cSJim Jagielski}; }; }; };
125*b1cdbd2cSJim Jagielski
126*b1cdbd2cSJim Jagielski#endif
127