]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/progdlg.h
Overhaul IE zoom functions to support both text and optical zoom.
[wxWidgets.git] / include / wx / msw / progdlg.h
CommitLineData
c31d9c7f
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/progdlg.h
3// Purpose: wxProgressDialog
4// Author: Rickard Westerlund
5// Created: 2010-07-22
6// RCS-ID: $Id$
7// Copyright: (c) 2010 wxWidgets team
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_PROGDLG_H_
12#define _WX_PROGDLG_H_
13
14class wxProgressDialogTaskRunner;
15class wxProgressDialogSharedData;
16
17class WXDLLIMPEXP_CORE wxProgressDialog : public wxGenericProgressDialog
18{
19public:
20 wxProgressDialog(const wxString& title, const wxString& message,
21 int maximum = 100,
22 wxWindow *parent = NULL,
23 int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE);
24
25 virtual ~wxProgressDialog();
26
27 virtual bool Update(int value, const wxString& newmsg = wxEmptyString, bool *skip = NULL);
28 virtual bool Pulse(const wxString& newmsg = wxEmptyString, bool *skip = NULL);
29
30 void Resume();
31
32 int GetValue() const;
33 wxString GetMessage() const;
34
35 void SetRange(int maximum);
36
37 // Return whether "Cancel" or "Skip" button was pressed, always return
38 // false if the corresponding button is not shown.
39 bool WasSkipped() const;
40 bool WasCancelled() const;
41
42 virtual void SetTitle(const wxString& title);
43 virtual wxString GetTitle() const;
44
45 virtual bool Show( bool show = true );
46
47 // Must provide overload to avoid hiding it (and warnings about it)
48 virtual void Update() { wxGenericProgressDialog::Update(); }
49
50private:
c31d9c7f
VZ
51 // Performs common routines to Update() and Pulse(). Requires the
52 // shared object to have been entered.
53 bool DoNativeBeforeUpdate(bool *skip);
54
55 // Updates the various timing informations for both determinate
56 // and indeterminate modes. Requires the shared object to have
57 // been entered.
58 void UpdateExpandedInformation(int value);
59
60 wxProgressDialogTaskRunner *m_taskDialogRunner;
61
62 wxProgressDialogSharedData *m_sharedData;
63
64 // Store the message and title we currently use to be able to return it
65 // from Get{Message,Title}()
66 wxString m_message,
67 m_title;
68
69 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxProgressDialog);
70};
71
72#endif // _WX_PROGDLG_H_