X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d81eb8cee209240b37421ae4f7dfe7a3f07a4fd..062dfc9a96dc9e796c53544f41ff92dc47f26e82:/src/palmos/progdlg.cpp diff --git a/src/palmos/progdlg.cpp b/src/palmos/progdlg.cpp index 9641659886..db371b5917 100644 --- a/src/palmos/progdlg.cpp +++ b/src/palmos/progdlg.cpp @@ -6,28 +6,27 @@ // Created: 29.12.2004 // RCS-ID: $Id$ // Copyright: (c) Wlodzimierz Skiba -// License: wxWindows licence +// Licence: 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 <Progress.h> +#include <SysEvtMgr.h> 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; }