X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48f7ffbe93ab587c54643e2476b0e3b0c74e1386..f5bed7a885024108682c32c74567cdf7bf2ed13b:/src/generic/statusbr.cpp diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 0b8cb4868c..bb1b36f560 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: generic/statusbr.cpp +// Name: src/generic/statusbr.cpp // Purpose: wxStatusBarGeneric class implementation // Author: Julian Smart // Modified by: @@ -9,24 +9,21 @@ // 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" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_STATUSBAR +#include "wx/statusbr.h" + #ifndef WX_PRECOMP -#include "wx/setup.h" -#include "wx/frame.h" -#include "wx/settings.h" -#include "wx/dcclient.h" + #include "wx/frame.h" + #include "wx/settings.h" + #include "wx/dcclient.h" #endif #ifdef __WXGTK20__ @@ -34,8 +31,6 @@ #include "wx/gtk/win_gtk.h" #endif -#include "wx/statusbr.h" - // we only have to do it here when we use wxStatusBarGeneric in addition to the // standard wxStatusBar class, if wxStatusBarGeneric is the same as // wxStatusBar, then the corresponding IMPLEMENT_DYNAMIC_CLASS is already in @@ -237,7 +232,7 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i) wxString text(GetStatusText(i)); - long x, y; + long x = 0, y = 0; dc.GetTextExtent(text, &x, &y); @@ -355,7 +350,7 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const void wxStatusBarGeneric::InitColours() { // Shadow colours -#if defined(__WIN95__) || defined(__WXMAC__) +#if defined(__WXMSW__) || defined(__WXMAC__) wxColour mediumShadowColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)); m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID); @@ -363,17 +358,13 @@ void wxStatusBarGeneric::InitColours() m_hilightPen = wxPen(hilightColour, 1, wxSOLID); #elif defined(__WXPM__) m_mediumShadowPen = wxPen(wxColour(127, 127, 127), 1, wxSOLID); - m_hilightPen = wxPen(_T("WHITE"), 1, wxSOLID); - - wxColour vColour; + m_hilightPen = *wxWHITE_PEN; - vColour.Set(wxString(_T("LIGHT GREY"))); - SetBackgroundColour(vColour); - vColour.Set(wxString(_T("BLACK"))); - SetForegroundColour(vColour); + SetBackgroundColour(*wxLIGHT_GREY); + SetForegroundColour(*wxBLACK); #else - m_mediumShadowPen = wxPen("GREY", 1, wxSOLID); - m_hilightPen = wxPen("WHITE", 1, wxSOLID); + m_mediumShadowPen = *wxGREY_PEN; + m_hilightPen = *wxWHITE_PEN; #endif }