File: appprogress.h

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (74 lines) | stat: -rw-r--r-- 2,196 bytes parent folder | download | duplicates (4)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/////////////////////////////////////////////////////////////////////////////
// Name:        interface/wx/appprogress.h
// Purpose:     interface of wxAppProgressIndicator
// Author:      wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

/**
    @class wxAppProgressIndicator

    A helper class that can be used to update the progress bar in the taskbar
    button on Windows and the dock icon on macOS.

    @library{wxcore}
    @category{misc}

    @onlyfor{wxmsw,wxosx}

    @see wxTaskBarButton
    @since 3.1.0
*/
class WXDLLIMPEXP_CORE wxAppProgressIndicator
{
public:
    /**
        Constructs the wxAppProgressIndicator.

        @param parent
            The parent window of wxAppProgressIndicator. Note that the
            window should has taskbar button showing. If parent is NULL,
            the progress will reflect on the taskbar buttons of all the
            top level windows.
        @param maxValue
            Integer range (maximum value) of the progress indicator.
    */
    wxAppProgressIndicator(wxWindow* parent = NULL, int maxValue = 100);

    /**
        Destructor, stops displaying progress and returns the indicator to its
        normal state.
    */
    virtual ~wxAppProgressIndicator();

    /**
        Check if the application progress display is available.

        Currently this only returns @true when using wxMSW and running
        under Windows 7 or later systems (which provide task bar button
        API) or when using wxOSX.

        If this method returns @false, no other methods of this class do
        anything, but they may still be called without any ill effects.
     */
    bool IsAvailable() const;

    /**
        Set the progress value in taskbar button of parent window.

        @param value
            The new value of the progress meter. It should be less than or equal
            to the range.
     */
    void SetValue(int value);

    /**
        Set the progress range in taskbar button of parent window.
     */
    void SetRange(int range);

    /**
        Makes the progress bar run in indeterminate mode.
    */
    bool Pulse();
};