#include "wx/generic/statusbr.h"
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
#include <windows.h>
#ifdef DrawText
wxStatusBar::wxStatusBar(void)
{
- m_statusWidths = NULL;
- m_statusStrings = NULL;
+ m_statusWidths = (int *) NULL;
+ m_statusStrings = (wxString *) NULL;
m_nFields = 0;
m_borderX = wxTHICK_LINE_BORDER;
m_borderY = wxTHICK_LINE_BORDER;
delete[] m_statusStrings;
}
-bool wxStatusBar::Create(wxWindow *parent, const wxWindowID id,
+bool wxStatusBar::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
- const long style,
+ long style,
const wxString& name)
{
- m_statusWidths = NULL;
- m_statusStrings = NULL;
+ m_statusWidths = (int *) NULL;
+ m_statusStrings = (wxString *) NULL;
m_nFields = 0;
m_borderX = wxTHICK_LINE_BORDER;
m_borderY = wxTHICK_LINE_BORDER;
return success;
}
-void wxStatusBar::SetFieldsCount(const int number, const int *widths)
+void wxStatusBar::SetFieldsCount(int number, const int widths[])
{
m_nFields = number;
SetStatusWidths(number, widths);
}
-void wxStatusBar::SetStatusText(const wxString& text, const int number)
+void wxStatusBar::SetStatusText(const wxString& text, int number)
{
if ((number < 0) || (number >= m_nFields))
return;
Refresh();
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
// For some reason, this can cause major GDI problems - graphics
// all over the place. E.g. in print previewing.
// ::UpdateWindow((HWND) GetHWND());
#endif
}
-wxString wxStatusBar::GetStatusText(const int n) const
+wxString wxStatusBar::GetStatusText(int n) const
{
if ((n < 0) || (n >= m_nFields))
return wxString("");
return m_statusStrings[n];
}
-void wxStatusBar::SetStatusWidths(const int n, const int *widths_field)
+void wxStatusBar::SetStatusWidths(int n, const int widths_field[])
{
// only set status widths, when n == number of statuswindows
if (n == m_nFields)
DrawField(dc, i);
}
-void wxStatusBar::DrawFieldText(wxDC& dc, const int i)
+void wxStatusBar::DrawFieldText(wxDC& dc, int i)
{
int leftMargin = 2;
dc.DestroyClippingRegion();
}
-void wxStatusBar::DrawField(wxDC& dc, const int i)
+void wxStatusBar::DrawField(wxDC& dc, int i)
{
wxRectangle rect;
GetFieldRect(i, rect);
}
// Get the position and size of the field's internal bounding rectangle
-bool wxStatusBar::GetFieldRect(const int n, wxRectangle& rect) const
+bool wxStatusBar::GetFieldRect(int n, wxRectangle& rect) const
{
if ((n < 0) || (n >= m_nFields))
return FALSE;