1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/progdlg.h
3 // Purpose: wxProgressDialog
4 // Author: Rickard Westerlund
7 // Copyright: (c) 2010 wxWidgets team
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_PROGDLG_H_
12 #define _WX_PROGDLG_H_
14 class wxProgressDialogTaskRunner
;
15 class wxProgressDialogSharedData
;
17 class WXDLLIMPEXP_CORE wxProgressDialog
: public wxGenericProgressDialog
20 wxProgressDialog(const wxString
& title
, const wxString
& message
,
22 wxWindow
*parent
= NULL
,
23 int style
= wxPD_APP_MODAL
| wxPD_AUTO_HIDE
);
25 virtual ~wxProgressDialog();
27 virtual bool Update(int value
, const wxString
& newmsg
= wxEmptyString
, bool *skip
= NULL
);
28 virtual bool Pulse(const wxString
& newmsg
= wxEmptyString
, bool *skip
= NULL
);
33 wxString
GetMessage() const;
35 void SetRange(int maximum
);
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;
42 virtual void SetTitle(const wxString
& title
);
43 virtual wxString
GetTitle() const;
45 virtual bool Show( bool show
= true );
47 // Must provide overload to avoid hiding it (and warnings about it)
48 virtual void Update() { wxGenericProgressDialog::Update(); }
50 virtual WXWidget
GetHandle() const;
53 // Performs common routines to Update() and Pulse(). Requires the
54 // shared object to have been entered.
55 bool DoNativeBeforeUpdate(bool *skip
);
57 // Updates the various timing informations for both determinate
58 // and indeterminate modes. Requires the shared object to have
60 void UpdateExpandedInformation(int value
);
62 wxProgressDialogTaskRunner
*m_taskDialogRunner
;
64 wxProgressDialogSharedData
*m_sharedData
;
66 // Store the message and title we currently use to be able to return it
67 // from Get{Message,Title}()
71 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxProgressDialog
);
74 #endif // _WX_PROGDLG_H_