From 5de9f492eca0bde0b23d762e614c21b30c74adb5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 20 Jul 2004 16:30:22 +0000 Subject: [PATCH] added DoPrepareDC() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/scrolwin.h | 4 +++- include/wx/gtk1/scrolwin.h | 4 +++- src/gtk/scrolwin.cpp | 2 +- src/gtk1/scrolwin.cpp | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/wx/gtk/scrolwin.h b/include/wx/gtk/scrolwin.h index bedce4cc76..bcfb3940df 100644 --- a/include/wx/gtk/scrolwin.h +++ b/include/wx/gtk/scrolwin.h @@ -127,7 +127,7 @@ public: // Override this function if you don't want to have wxScrolledWindow // automatically change the origin according to the scroll position. - virtual void PrepareDC(wxDC& dc); + void PrepareDC(wxDC& dc) { DoPrepareDC(); } // lay out the window and its children virtual bool Layout(); @@ -164,6 +164,8 @@ public: void ViewStart(int *x, int *y) const { GetViewStart( x, y ); } #endif // WXWIN_COMPATIBILITY_2_2 + virtual void DoPrepareDC(wxDC& dc); + protected: wxWindow *m_targetWindow; int m_xScrollPixelsPerLine; diff --git a/include/wx/gtk1/scrolwin.h b/include/wx/gtk1/scrolwin.h index bedce4cc76..bcfb3940df 100644 --- a/include/wx/gtk1/scrolwin.h +++ b/include/wx/gtk1/scrolwin.h @@ -127,7 +127,7 @@ public: // Override this function if you don't want to have wxScrolledWindow // automatically change the origin according to the scroll position. - virtual void PrepareDC(wxDC& dc); + void PrepareDC(wxDC& dc) { DoPrepareDC(); } // lay out the window and its children virtual bool Layout(); @@ -164,6 +164,8 @@ public: void ViewStart(int *x, int *y) const { GetViewStart( x, y ); } #endif // WXWIN_COMPATIBILITY_2_2 + virtual void DoPrepareDC(wxDC& dc); + protected: wxWindow *m_targetWindow; int m_xScrollPixelsPerLine; diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 638e29194a..4d82bb3209 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -453,7 +453,7 @@ wxWindow *wxScrolledWindow::GetTargetWindow() const // Override this function if you don't want to have wxScrolledWindow // automatically change the origin according to the scroll position. -void wxScrolledWindow::PrepareDC(wxDC& dc) +void wxScrolledWindow::DoPrepareDC(wxDC& dc) { dc.SetDeviceOrigin( -m_xScrollPosition * m_xScrollPixelsPerLine, -m_yScrollPosition * m_yScrollPixelsPerLine ); diff --git a/src/gtk1/scrolwin.cpp b/src/gtk1/scrolwin.cpp index 638e29194a..4d82bb3209 100644 --- a/src/gtk1/scrolwin.cpp +++ b/src/gtk1/scrolwin.cpp @@ -453,7 +453,7 @@ wxWindow *wxScrolledWindow::GetTargetWindow() const // Override this function if you don't want to have wxScrolledWindow // automatically change the origin according to the scroll position. -void wxScrolledWindow::PrepareDC(wxDC& dc) +void wxScrolledWindow::DoPrepareDC(wxDC& dc) { dc.SetDeviceOrigin( -m_xScrollPosition * m_xScrollPixelsPerLine, -m_yScrollPosition * m_yScrollPixelsPerLine ); -- 2.45.2