File: busyinfo.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 (78 lines) | stat: -rw-r--r-- 2,231 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
75
76
77
78
/////////////////////////////////////////////////////////////////////////////
// Name:        wx/busyinfo.h
// Purpose:     Information window (when app is busy)
// Author:      Vaclav Slavik
// Copyright:   (c) 1999 Vaclav Slavik
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef __BUSYINFO_H_BASE__
#define __BUSYINFO_H_BASE__

#include "wx/defs.h"

#if wxUSE_BUSYINFO

#include "wx/colour.h"
#include "wx/icon.h"

class WXDLLIMPEXP_FWD_CORE wxWindow;

// This class is used to pass all the various parameters to wxBusyInfo ctor.
// According to the usual naming conventions (see wxAboutDialogInfo,
// wxFontInfo, ...) it would be called wxBusyInfoInfo, but this would have been
// rather strange, so we call it wxBusyInfoFlags instead.
//
// Methods are mostly self-explanatory except for the difference between "Text"
// and "Label": the former can contain markup, while the latter is just plain
// string which is not parsed in any way.
class wxBusyInfoFlags
{
public:
    wxBusyInfoFlags()
    {
        m_parent = NULL;
        m_alpha = wxALPHA_OPAQUE;
    }

    wxBusyInfoFlags& Parent(wxWindow* parent)
        { m_parent = parent; return *this; }

    wxBusyInfoFlags& Icon(const wxIcon& icon)
        { m_icon = icon; return *this; }
    wxBusyInfoFlags& Title(const wxString& title)
        { m_title = title; return *this; }
    wxBusyInfoFlags& Text(const wxString& text)
        { m_text = text; return *this; }
    wxBusyInfoFlags& Label(const wxString& label)
        { m_label = label; return *this; }

    wxBusyInfoFlags& Foreground(const wxColour& foreground)
        { m_foreground = foreground; return *this; }
    wxBusyInfoFlags& Background(const wxColour& background)
        { m_background = background; return *this; }

    wxBusyInfoFlags& Transparency(wxByte alpha)
        { m_alpha = alpha; return *this; }

private:
    wxWindow* m_parent;

    wxIcon m_icon;
    wxString m_title,
             m_text,
             m_label;

    wxColour m_foreground,
             m_background;

    wxByte m_alpha;

    friend class wxBusyInfo;
};

#include "wx/generic/busyinfo.h"

#endif // wxUSE_BUSYINFO

#endif // __BUSYINFO_H_BASE__