X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23d8bb2c66855225b5ae6110b7b9c4844fe4999b..df16a53ef9ae506c51023178e4fe45ce45e69447:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index 69e3c6cd2f..dbb420c484 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -54,6 +54,10 @@ #undef WXDEBUG_REFRESH #endif +#if defined(WXDEBUG_REFRESH) && defined(__WXMSW__) && !defined(__WXMICROWIN__) +#include "wx/msw/private.h" +#endif + // ============================================================================ // implementation // ============================================================================ @@ -69,6 +73,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowGTK) #elif defined(__WXMGL__) IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowMGL) +#elif defined(__WXPM__) + IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowOS2) #endif BEGIN_EVENT_TABLE(wxWindow, wxWindowNative) @@ -129,11 +135,6 @@ bool wxWindow::Create(wxWindow *parent, PositionScrollbars(); } - // the colours/fonts are default - m_hasBgCol = - m_hasFgCol = - m_hasFont = FALSE; - return TRUE; } @@ -365,7 +366,7 @@ bool wxWindow::Enable(bool enable) return FALSE; // disabled window can't keep focus - if ( FindFocus() == this ) + if ( FindFocus() == this && GetParent() != NULL ) { GetParent()->SetFocus(); } @@ -653,9 +654,12 @@ void wxWindow::SetScrollbar(int orient, int range, bool refresh) { + wxASSERT_MSG( pageSize <= range, + _T("page size can't be greater than range") ); + bool hasClientSizeChanged = FALSE; wxScrollBar *scrollbar = GetScrollbar(orient); - if ( range ) + if ( range && (pageSize < range) ) { if ( !scrollbar ) { @@ -929,40 +933,6 @@ wxRect wxWindow::ScrollNoRefresh(int dx, int dy, const wxRect *rectTotal) return rect; } -// ---------------------------------------------------------------------------- -// colours/fonts -// ---------------------------------------------------------------------------- - -bool wxWindow::SetBackgroundColour(const wxColour& colour) -{ - if ( !wxWindowNative::SetBackgroundColour(colour) ) - return FALSE; - - m_hasBgCol = TRUE; - - return TRUE; -} - -bool wxWindow::SetForegroundColour(const wxColour& colour) -{ - if ( !wxWindowNative::SetForegroundColour(colour) ) - return FALSE; - - m_hasFgCol = TRUE; - - return TRUE; -} - -bool wxWindow::SetFont(const wxFont& font) -{ - if ( !wxWindowNative::SetFont(font) ) - return FALSE; - - m_hasFont = TRUE; - - return TRUE; -} - // ---------------------------------------------------------------------------- // mouse capture // ----------------------------------------------------------------------------