blob: f620b87f97e515e61bb154ae98985de4ac0c0a93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/** \file cmdline_progress_display.h */ // -*-c++-*-
// Copyright (C) 2010 Daniel Burrows
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; see the file COPYING. If not, write to
// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
#ifndef APTITUDE_GENERIC_VIEWS_PROGRESS_H
#define APTITUDE_GENERIC_VIEWS_PROGRESS_H
namespace aptitude
{
namespace util
{
class progress_info;
}
namespace views
{
/** \brief A general class for displaying a single line of
* progress information.
*
* The progress information is delivered as a progress_info
* object. A blank progress_info causes the display to be
* erased. A "pulse" mode progress_info displays a message with
* no percent indicator. And a "bar" mode progress_info displays
* a message with a percent indicator.
*/
class progress
{
public:
virtual ~progress();
/** \brief Set the currently displayed progress.
*
* \param progress The new progress information to display.
*/
virtual void set_progress(const aptitude::util::progress_info &progress) = 0;
/** \brief Mark the currently displayed progress (if any) as done. */
virtual void done() = 0;
};
}
}
#endif // APTITUDE_GENERIC_VIEWS_PROGRESS_H
|