summaryrefslogtreecommitdiff
path: root/shared/taskbar.h
blob: acf2d6daa9143714ccef9e1869c2ca844907d069 (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
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html       *
// * Copyright (C) 2008-2010 ZenJu (zhnmju123 AT gmx.de)                    *
// **************************************************************************
//
#ifndef TASKBARPROGRESS_H_INCLUDED
#define TASKBARPROGRESS_H_INCLUDED

#ifndef FFS_WIN
use in windows build only!
#endif

#include <wx/toplevel.h>
#include <memory>


namespace util
{
class TaskbarNotAvailable {};

//show progress in windows superbar via ITaskbarList3 Interface (http://msdn.microsoft.com/en-us/library/dd391692(VS.85).aspx)
class TaskbarProgress
{
public:
    TaskbarProgress(const wxTopLevelWindow& window); //throw TaskbarNotAvailable()
    ~TaskbarProgress();

    enum Status
    {
        STATUS_NOPROGRESS,
        STATUS_INDETERMINATE,
        STATUS_NORMAL,
        STATUS_ERROR,
        STATUS_PAUSED
    };

    void setStatus(Status status);
    void setProgress(size_t current, size_t total);

private:
    class Pimpl;
    std::auto_ptr<Pimpl> pimpl_;
};

}

#endif // TASKBARPROGRESS_H_INCLUDED
bgstack15