From 78df41df75d9437e0e1b9ee88864fd4230e829a8 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 1 Apr 2005 07:05:52 +0000 Subject: [PATCH] adding protected inquiry function whether a child window belongs to the 'client' or the 'non-client' area, examples for the latter are toolbar, scrollbars etc adding another cached clip rect for the real client area git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/carbon/frame.h | 2 ++ include/wx/mac/carbon/window.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/wx/mac/carbon/frame.h b/include/wx/mac/carbon/frame.h index 1620419b9b..b93829e653 100644 --- a/include/wx/mac/carbon/frame.h +++ b/include/wx/mac/carbon/frame.h @@ -111,6 +111,8 @@ protected: // the last focused child: we restore focus to it on activation wxWindow *m_winLastFocused; + virtual bool MacIsChildOfClientArea( const wxWindow* child ) const ; + private: DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxFrame) diff --git a/include/wx/mac/carbon/window.h b/include/wx/mac/carbon/window.h index 81643de6ff..e8ed1c6e1b 100644 --- a/include/wx/mac/carbon/window.h +++ b/include/wx/mac/carbon/window.h @@ -207,6 +207,7 @@ public: // return the rectangle that would be visible of this control, regardless whether controls are hidden // only taking into account clipping by parent windows + const wxRect& MacGetClippedClientRect() const ; const wxRect& MacGetClippedRect() const ; const wxRect& MacGetClippedRectWithOuterStructure() const ; // returns the visible region of this control in window ie non-client coordinates @@ -272,8 +273,10 @@ protected: mutable bool m_cachedClippedRectValid ; mutable wxRect m_cachedClippedRectWithOuterStructure ; mutable wxRect m_cachedClippedRect ; + mutable wxRect m_cachedClippedClientRect ; mutable wxRegion m_cachedClippedRegionWithOuterStructure ; mutable wxRegion m_cachedClippedRegion ; + mutable wxRegion m_cachedClippedClientRegion ; // true if is is not a native control but a wxWindow control bool m_macIsUserPane ; wxBrush m_macBackgroundBrush ; @@ -290,6 +293,8 @@ protected: // it becomes the target window of a scrolled window it has to... bool m_clipChildren ; + virtual bool MacIsChildOfClientArea( const wxWindow* child ) const ; + void MacCreateScrollBars( long style ) ; void MacRepositionScrollBars() ; void MacUpdateControlFont() ;