1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/progdlg.h
3 // Purpose: wxProgressDialog
4 // Author: Rickard Westerlund
6 // Copyright: (c) 2010 wxWidgets team
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_PROGDLG_H_
11 #define _WX_PROGDLG_H_
13 class wxProgressDialogTaskRunner
;
14 class wxProgressDialogSharedData
;
16 class WXDLLIMPEXP_CORE wxProgressDialog
: public wxGenericProgressDialog
19 wxProgressDialog(const wxString
& title
, const wxString
& message
,
21 wxWindow
*parent
= NULL
,
22 int style
= wxPD_APP_MODAL
| wxPD_AUTO_HIDE
);
24 virtual ~wxProgressDialog();
26 virtual bool Update(int value
, const wxString
& newmsg
= wxEmptyString
, bool *skip
= NULL
);
27 virtual bool Pulse(const wxString
& newmsg
= wxEmptyString
, bool *skip
= NULL
);
32 wxString
GetMessage() const;
34 void SetRange(int maximum
);
36 // Return whether "Cancel" or "Skip" button was pressed, always return
37 // false if the corresponding button is not shown.
38 bool WasSkipped() const;
39 bool WasCancelled() const;
41 virtual void SetTitle(const wxString
& title
);
42 virtual wxString
GetTitle() const;
44 virtual bool Show( bool show
= true );
46 // Must provide overload to avoid hiding it (and warnings about it)
47 virtual void Update() { wxGenericProgressDialog::Update(); }
49 virtual WXWidget
GetHandle() const;
52 // Performs common routines to Update() and Pulse(). Requires the
53 // shared object to have been entered.
54 bool DoNativeBeforeUpdate(bool *skip
);
56 // Updates the various timing informations for both determinate
57 // and indeterminate modes. Requires the shared object to have
59 void UpdateExpandedInformation(int value
);
61 wxProgressDialogTaskRunner
*m_taskDialogRunner
;
63 wxProgressDialogSharedData
*m_sharedData
;
65 // Store the message and title we currently use to be able to return it
66 // from Get{Message,Title}()
70 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxProgressDialog
);
73 #endif // _WX_PROGDLG_H_