X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cb853a8ca8376cbbe5aa094a7ccfc4ce3b74b33..8ad31f9dfdb85a54cd080aac6957883f2f3e38e3:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index b7edbd5e96..6297621fd0 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: univ/window.cpp +// Name: src/univ/window.cpp // Purpose: implementation of extra wxWindow methods for wxUniv port // Author: Vadim Zeitlin // Modified by: @@ -17,10 +17,6 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "univwindow.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -28,18 +24,19 @@ #pragma hdrstop #endif +#include "wx/window.h" + #ifndef WX_PRECOMP #include "wx/app.h" - #include "wx/window.h" #include "wx/dcclient.h" #include "wx/dcmemory.h" #include "wx/event.h" #include "wx/scrolbar.h" #include "wx/menu.h" #include "wx/frame.h" + #include "wx/log.h" #endif // WX_PRECOMP -#include "wx/log.h" #include "wx/univ/colschem.h" #include "wx/univ/renderer.h" #include "wx/univ/theme.h" @@ -343,7 +340,7 @@ bool wxWindow::DoDrawBackground(wxDC& dc) } else { - // Draw background ouselves + // Draw background ourselves EraseBackground( dc, rect ); } @@ -474,8 +471,7 @@ bool wxWindow::Enable(bool enable) bool wxWindow::IsFocused() const { - wxWindow *self = wxConstCast(this, wxWindow); - return self->FindFocus() == self; + return FindFocus() == this; } bool wxWindow::IsPressed() const @@ -935,9 +931,9 @@ void wxWindow::SetScrollbar(int orient, void wxWindow::SetScrollPos(int orient, int pos, bool WXUNUSED(refresh)) { wxScrollBar *scrollbar = GetScrollbar(orient); - wxCHECK_RET( scrollbar, _T("no scrollbar to set position for") ); - scrollbar->SetThumbPosition(pos); + if (scrollbar) + scrollbar->SetThumbPosition(pos); // VZ: I think we can safely ignore this as we always refresh it // automatically whenever the value chanegs @@ -1368,4 +1364,3 @@ WXLRESULT wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar } #endif // __WXMSW__ -