]> git.saurik.com Git - wxWidgets.git/commitdiff
Add GetScrollHelper() to wxWindow.
authorRobert Roebling <robert@roebling.de>
Wed, 13 Sep 2006 22:18:24 +0000 (22:18 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 13 Sep 2006 22:18:24 +0000 (22:18 +0000)
  Let wxScrollHelper set the underlying field itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/window.h
src/common/wincmn.cpp
src/generic/scrlwing.cpp

index c7183ecabb746ca4f3aa248dec3a717f89fc407b..82b313d4b83f5dabdd5f2001b0e49f05f17dcd49 100644 (file)
@@ -65,6 +65,7 @@ class WXDLLEXPORT wxSizer;
 class WXDLLEXPORT wxToolTip;
 class WXDLLEXPORT wxWindowBase;
 class WXDLLEXPORT wxWindow;
+class WXDLLEXPORT wxScrollHelper;
 
 #if wxUSE_ACCESSIBILITY
 class WXDLLEXPORT wxAccessible;
@@ -343,6 +344,9 @@ public:
             *h = s.y;
     }
 
+    void SetScrollHelper( wxScrollHelper *sh )   { m_scrollHelper = sh; }
+    wxScrollHelper *GetScrollHelper()            { return m_scrollHelper; }
+
         // reset the cached best size value so it will be recalculated the
         // next time it is needed.
     void InvalidateBestSize();
@@ -1242,6 +1246,8 @@ protected:
     // Virtual size (scrolling)
     wxSize                m_virtualSize;
 
+    wxScrollHelper       *m_scrollHelper;
+
     int                   m_minVirtualWidth;    // VirtualSizeHints
     int                   m_minVirtualHeight;
     int                   m_maxVirtualWidth;
index 9d0b6f45822f2f2e8f49f91cdec5a2e47c9ab8c1..47983f7274cec95d8cf6d87d1cc94bc9834673d9 100644 (file)
@@ -200,6 +200,8 @@ wxWindowBase::wxWindowBase()
 
     m_virtualSize = wxDefaultSize;
 
+    m_scrollHelper = (wxScrollHelper *) NULL;
+
     m_minVirtualWidth =
     m_maxVirtualWidth = wxDefaultCoord;
     m_minVirtualHeight =
index e05ecbda17a3e6fdc62db89d660022b3fb3db980..b6646136f1167d39cbeb459c518a3c4346686eff 100644 (file)
@@ -311,6 +311,8 @@ wxScrollHelper::wxScrollHelper(wxWindow *win)
     m_handler = NULL;
 
     m_win = win;
+    
+    m_win->SetScrollHelper( this );
 
     // by default, the associated window is also the target window
     DoSetTargetWindow(win);