]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/scrolwin.h
add const synonyms for wxGridTableBase::GetNumberRows/Cols(), using const_cast<>...
[wxWidgets.git] / include / wx / scrolwin.h
index 570922a169f3455417dd9b1990b5fcd4dc631dd9..860c65d559bc0f81d9c964dbdc98187fecfe6736 100644 (file)
@@ -208,6 +208,17 @@ protected:
     // in wxScrollHelperEvtHandler::ProcessEvent()
     void ResetDrawnFlag();
 
+    // helper of AdjustScrollbars(): does the work for the single scrollbar
+    //
+    // notice that the parameters passed by non-const references are modified
+    // by this function
+    void AdjustScrollbar(int orient,
+                         int clientSize,
+                         int virtSize,
+                         int& pixelsPerUnit,
+                         int& scrollUnits,
+                         int& scrollPosition);
+
 
     double                m_scaleX;
     double                m_scaleY;
@@ -237,6 +248,19 @@ protected:
 
     wxScrollHelperEvtHandler *m_handler;
 
+private:
+    // this function should be overridden to return the size available for
+    // m_targetWindow inside m_win of the given size
+    //
+    // the default implementation is only good for m_targetWindow == m_win
+    // case, if we're scrolling a subwindow you must override this method
+    virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size)
+    {
+        wxASSERT_MSG( m_targetWindow == m_win, "must be overridden" );
+
+        return size;
+    }
+
     DECLARE_NO_COPY_CLASS(wxScrollHelper)
 };
 
@@ -306,7 +330,7 @@ public:
         m_targetWindow = this;
 
 #ifdef __WXMAC__
-        MacSetClipChildren(true);
+        this->MacSetClipChildren(true);
 #endif
 
         this->Connect(wxEVT_PAINT, wxPaintEventHandler(wxScrolled::OnPaint));
@@ -348,7 +372,11 @@ private:
         event.Skip();
     }
 
+    // VC++ 6 gives warning for the declaration of template member function
+    // without definition
+#if !defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7)
     DECLARE_NO_COPY_CLASS(wxScrolled)
+#endif
 };
 
 // VC++ <= 6 requires this; it's unlikely any other specializations would