wxWidgets/include/wx/progdlg.h
Vadim Zeitlin c31d9c7f60 Use task dialog for wxProgressDialog implementation in wxMSW.
If available, the task dialog is now used for the wxProgressDialog under
Windows. This provides a much more native looking dialog which doesn't look
out of place under modern Windows versions, unlike the generic implementation.

The internals of the code had to be significantly changed as the task dialog
can only be shown modally so, to emulate wxProgressDialog modeless nature, a
separate thread is used for the progress dialog management.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-18 22:49:02 +00:00

61 lines
1.7 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/progdlg.h
// Purpose: Base header for wxProgressDialog
// Author: Julian Smart
// Modified by:
// Created:
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PROGDLG_H_BASE_
#define _WX_PROGDLG_H_BASE_
#include "wx/defs.h"
#if wxUSE_PROGRESSDLG
/*
* wxProgressDialog flags
*/
#define wxPD_CAN_ABORT 0x0001
#define wxPD_APP_MODAL 0x0002
#define wxPD_AUTO_HIDE 0x0004
#define wxPD_ELAPSED_TIME 0x0008
#define wxPD_ESTIMATED_TIME 0x0010
#define wxPD_SMOOTH 0x0020
#define wxPD_REMAINING_TIME 0x0040
#define wxPD_CAN_SKIP 0x0080
#ifdef __WXPALMOS__
#include "wx/palmos/progdlg.h"
#else
#include "wx/generic/progdlgg.h"
#if defined(__WXMSW__) && wxUSE_THREADS
#include "wx/msw/progdlg.h"
#else
class WXDLLIMPEXP_CORE wxProgressDialog
: public wxGenericProgressDialog
{
public:
wxProgressDialog( const wxString& title, const wxString& message,
int maximum = 100,
wxWindow *parent = NULL,
int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE )
: wxGenericProgressDialog( title, message, maximum,
parent, style )
{ }
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxProgressDialog );
};
#endif // defined(__WXMSW__) && wxUSE_THREADS
#endif // __WXPALMOS__
#endif // wxUSE_PROGRESSDLG
#endif // _WX_PROGDLG_H_BASE_