X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d81eb8cee209240b37421ae4f7dfe7a3f07a4fd..8946ede10c2702c7acbb194fe8bd2793d7fb8358:/src/palmos/progdlg.cpp?ds=sidebyside diff --git a/src/palmos/progdlg.cpp b/src/palmos/progdlg.cpp index 9641659886..4b57a09fc0 100644 --- a/src/palmos/progdlg.cpp +++ b/src/palmos/progdlg.cpp @@ -9,25 +9,24 @@ // License: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "progdlg.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#if wxUSE_PROGRESSDLG + +#include "wx/progdlg.h" + #ifndef WX_PRECOMP #include "wx/string.h" + #include "wx/msgdlg.h" #endif //WX_PRECOMP -#if wxUSE_PROGRESSDLG - -#include "wx/progdlg.h" -#include "wx/msgdlg.h" +#include +#include IMPLEMENT_CLASS(wxProgressDialog, wxDialog) @@ -65,7 +64,7 @@ wxProgressDialog::~wxProgressDialog() { if(m_prgFrame) { - PrgStopDialog(m_prgFrame, false); + PrgStopDialog((ProgressType *)m_prgFrame, false); m_prgFrame = NULL; } } @@ -80,17 +79,18 @@ bool wxProgressDialog::Update(int value, const wxString& newmsg, bool *skip) EventType event; + ProgressType *prg = (ProgressType *)m_prgFrame; do { EvtGetEvent(&event, 0); - Boolean handled = PrgHandleEvent(m_prgFrame, &event); - if (!PrgHandleEvent(m_prgFrame, &event)) - if( PrgUserCancel(m_prgFrame) ) + Boolean handled = PrgHandleEvent(prg, &event); + if (!PrgHandleEvent(prg, &event)) + if( PrgUserCancel(prg) ) return false; } while(event.eType != sysEventNilEvent); - PrgUpdateDialog(m_prgFrame, 0, 0, "", true); + PrgUpdateDialog(prg, 0, 0, "", true); m_activeSkip = m_canSkip && true; @@ -106,14 +106,17 @@ bool wxProgressDialog::Show(bool show) return false; } -Boolean wxProgressDialog::Callback(PrgCallbackData *data) +Boolean wxProgressDialog::Callback(void *data) { - strncpy( data->textP, m_msg.ToAscii() , data->textLen - 1 ); - data->textChanged = true; - data->displaySkipBtn = m_canSkip; - data->barMaxValue = (uint32_t)m_max; - data->barCurValue = (uint32_t)m_cur; - data->delay = (m_max == m_cur); + PrgCallbackData *palmData = (PrgCallbackData *)data; + strncpy( palmData->textP, m_msg.ToAscii() , palmData->textLen - 1 ); + palmData->textChanged = true; +#ifdef __WXPALMOS6__ + palmData->displaySkipBtn = m_canSkip; +#endif // __WXPALMOS6__ + palmData->barMaxValue = (uint32_t)m_max; + palmData->barCurValue = (uint32_t)m_cur; + palmData->delay = (m_max == m_cur); return true; }