From 3d777efedc1e05bd6c2a7c34a00a65895b62bb13 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 27 Aug 2013 13:12:31 +0000 Subject: [PATCH] No real changes, just make wxWindow::CanScroll() virtual. This will allow overriding it in wxScrolled<>, see #15440. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/window.h | 6 +----- src/common/wincmn.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/wx/window.h b/include/wx/window.h index bdb96cd..199c4b7 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -1221,11 +1221,7 @@ public: // ---------- // can the window have the scrollbar in this orientation? - bool CanScroll(int orient) const - { - return (m_windowStyle & - (orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0; - } + virtual bool CanScroll(int orient) const; // does the window have the scrollbar in this orientation? bool HasScrollbar(int orient) const; diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 5d50b21..ebee014 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1113,6 +1113,12 @@ void wxWindowBase::SendSizeEventToParent(int flags) parent->SendSizeEvent(flags); } +bool wxWindowBase::CanScroll(int orient) const +{ + return (m_windowStyle & + (orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0; +} + bool wxWindowBase::HasScrollbar(int orient) const { // if scrolling in the given direction is disabled, we can't have the -- 2.7.4