#undef WXDEBUG_REFRESH
#endif
+#if defined(WXDEBUG_REFRESH) && defined(__WXMSW__) && !defined(__WXMICROWIN__)
+#include "wx/msw/private.h"
+#endif
+
// ============================================================================
// implementation
// ============================================================================
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)
PositionScrollbars();
}
- // the colours/fonts are default
- m_hasBgCol =
- m_hasFgCol =
- m_hasFont = FALSE;
-
return TRUE;
}
return FALSE;
// disabled window can't keep focus
- if ( FindFocus() == this )
+ if ( FindFocus() == this && GetParent() != NULL )
{
GetParent()->SetFocus();
}
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 )
{
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
// ----------------------------------------------------------------------------