]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/scrolwin.h
don't use deprecated wxMouseState functions
[wxWidgets.git] / include / wx / scrolwin.h
index c4bd4dfa933be325826fe097e8ba942346cac879..adc7e5a1fcb233c72b18f6160c50aba99ae8e096 100644 (file)
@@ -106,6 +106,10 @@ public:
     // Clear() is necessary. If false, the whole canvas is invalidated and a
     // Clear() is necessary. Disable for when the scroll increment is used to
     // actually scroll a non-constant distance
+    //
+    // Notice that calling this method with a false argument doesn't disable
+    // scrolling the window in this direction, it just changes the mechanism by
+    // which it is implemented to not use wxWindow::ScrollWindow().
     virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
 
     // Disable use of keyboard keys for scrolling. By default cursor movement
@@ -279,6 +283,10 @@ protected:
 
     wxTimer              *m_timerAutoScroll;
 
+    // The number of pixels to scroll in horizontal and vertical directions
+    // respectively.
+    //
+    // If 0, means that the scrolling in the given direction is disabled.
     int                   m_xScrollPixelsPerLine;
     int                   m_yScrollPixelsPerLine;
     int                   m_xScrollPosition;
@@ -378,10 +386,17 @@ public:
         if ( !(style & (wxHSCROLL | wxVSCROLL)) )
             style |= wxHSCROLL | wxVSCROLL;
 
+#ifdef __WXOSX__
+        bool retval = T::Create(parent, winid, pos, size, style, name);
+        if ( retval && (style & wxALWAYS_SHOW_SB) )
+            ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS);
+        return retval;
+#else
         if ( style & wxALWAYS_SHOW_SB )
             ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS);
 
         return T::Create(parent, winid, pos, size, style, name);
+#endif
     }
 
     // we need to return a special WM_GETDLGCODE value to process just the