]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/progdlg.cpp
don't use built-in support for menu bitmaps if they are too big, they don't come...
[wxWidgets.git] / src / palmos / progdlg.cpp
index 9641659886bfc5ffecaa23c86599269715aaa7b8..4b57a09fc04da98ed21ace873db8077a0c912944 100644 (file)
@@ -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 <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;
 }