From 5340966638dba7bcbd960913a0fc010dd1de4883 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 26 Sep 2004 14:05:31 +0000 Subject: [PATCH] clipping for wxMac cleaned up git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/laywin.h | 4 ++++ include/wx/generic/scrolwin.h | 3 +++ include/wx/generic/splitter.h | 3 +++ include/wx/mac/carbon/window.h | 5 +++++ 4 files changed, 15 insertions(+) diff --git a/include/wx/generic/laywin.h b/include/wx/generic/laywin.h index 0f8ede2e8d..ef1c162d9f 100644 --- a/include/wx/generic/laywin.h +++ b/include/wx/generic/laywin.h @@ -184,6 +184,10 @@ public: // Called by layout algorithm to retrieve information about the window. void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event); +#ifdef __WXMAC__ + virtual bool MacClipChildren() const { return true ; } +#endif + private: void Init(); diff --git a/include/wx/generic/scrolwin.h b/include/wx/generic/scrolwin.h index fc55e3177b..88ef181e6b 100644 --- a/include/wx/generic/scrolwin.h +++ b/include/wx/generic/scrolwin.h @@ -71,6 +71,9 @@ public: virtual void DoSetVirtualSize(int x, int y); +#ifdef __WXMAC__ + virtual bool MacClipChildren() const { return true ; } +#endif protected: // this is needed for wxEVT_PAINT processing hack described in // wxScrollHelperEvtHandler::ProcessEvent() diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h index 2102a1bb51..f53efc311a 100644 --- a/include/wx/generic/splitter.h +++ b/include/wx/generic/splitter.h @@ -212,6 +212,9 @@ public: void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; } bool GetNeedUpdating() const { return m_needUpdating ; } +#ifdef __WXMAC__ + virtual bool MacClipGrandChildren() const { return true ; } +#endif protected: // event handlers #if defined(__WXMSW__) || defined(__WXMAC__) diff --git a/include/wx/mac/carbon/window.h b/include/wx/mac/carbon/window.h index 01b5e495d4..5d4f8ccd56 100644 --- a/include/wx/mac/carbon/window.h +++ b/include/wx/mac/carbon/window.h @@ -201,6 +201,11 @@ public: // returns the visible region of this control in window ie non-client coordinates wxRegion MacGetVisibleRegion( bool includeOuterStructures = false ) ; + // returns true if children have to clipped to the content area (eg scrolled window) + virtual bool MacClipChildren() const { return false ; } + // returns true if the grandchildren have to be clipped to the children's content area (eg + // splitter window) + virtual bool MacClipGrandChildren() const { return false ; } bool MacIsWindowScrollbar( const wxScrollBar* sb ) { return (m_hScrollBar == sb || m_vScrollBar == sb) ; } -- 2.47.2