]> git.saurik.com Git - wxWidgets.git/blobdiff - src/palmos/statbrpalm.cpp
don't assume there's always an active wxEventLoop instance
[wxWidgets.git] / src / palmos / statbrpalm.cpp
index 0b77b5d42471800fc3d99cfdff84c6bed4d3c20e..679433f1b9940cca61deb2fa97c09693ec7df472 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "statusbr.h"
-#endif
-
 // for compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
   #pragma hdrstop
 #endif
 
-#ifndef WX_PRECOMP
-  #include "wx/setup.h"
-  #include "wx/frame.h"
-  #include "wx/settings.h"
-  #include "wx/dcclient.h"
-#endif
-
 #if wxUSE_NATIVE_STATUSBAR
 
-#include "wx/intl.h"
-#include "wx/log.h"
 #include "wx/statusbr.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/frame.h"
+    #include "wx/settings.h"
+    #include "wx/dcclient.h"
+    #include "wx/intl.h"
+    #include "wx/log.h"
+#endif
+
+#include <StatusBar.h>
+
 // ----------------------------------------------------------------------------
 // macros
 // ----------------------------------------------------------------------------
@@ -48,8 +45,6 @@
 wxStatusBarPalm::wxStatusBarPalm()
 {
     SetParent(NULL);
-    m_hWnd = 0;
-    m_windowId = 0;
 }
 
 bool wxStatusBarPalm::Create(wxWindow *parent,
@@ -63,13 +58,11 @@ bool wxStatusBarPalm::Create(wxWindow *parent,
 
     SetName(name);
     SetParent(parent);
+    SetId( id == wxID_ANY ? NewControlId() : id );
 
     parent->AddChild(this);
 
-    m_windowId = id == wxID_ANY ? NewControlId() : id;
-
     SetFieldsCount(1);
-    SubclassWin(m_hWnd);
 
     return true;
 }
@@ -150,6 +143,7 @@ wxString wxStatusBarPalm::GetStatusText(int nField) const
 
 void wxStatusBarPalm::DrawStatusBar()
 {
+#if 0
     int i=0;
     int leftPos=0;
     wxArrayInt widthsAbs;
@@ -172,6 +166,7 @@ void wxStatusBarPalm::DrawStatusBar()
         leftPos+=widthsAbs[i]+2;
     }
     WinDrawLine(0,160-FntCharHeight()-1,159,160-FntCharHeight()-1);
+#endif
 }
 
 void wxStatusBarPalm::SetStatusBufferText(const wxString& text, int number)
@@ -187,7 +182,7 @@ wxString wxStatusBarPalm::GetStatusBufferText(int number)
 {
     wxListString *st = GetStatusBufferStack(number);
     if(st==0)
-        return "";
+        return wxEmptyString;
 
     wxListString::compatibility_iterator top = st->GetFirst();
     return(*top->GetData());
@@ -273,4 +268,3 @@ void wxStatusBarPalm::DoMoveWindow(int x, int y, int width, int height)
 }
 
 #endif // wxUSE_NATIVE_STATUSBAR
-