// implement base class pure virtuals
virtual void AdjustScrollbars();
-private:
+protected:
virtual void DoScroll(int x, int y);
virtual void DoShowScrollbars(wxScrollbarVisibility horz,
wxScrollbarVisibility vert);
+private:
// helper of AdjustScrollbars(): does the work for the single scrollbar
//
// notice that the parameters passed by non-const references are modified
// default ctor doesn't do anything
wxScrollHelper(wxWindow *win) : wxScrollHelperBase(win) { }
+ // implement the base class methods
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
int noUnitsX, int noUnitsY,
int xPos = 0, int yPos = 0,
virtual void AdjustScrollbars();
protected:
+ virtual void DoScroll(int x, int y);
+ virtual void DoShowScrollbars(wxScrollbarVisibility horz,
+ wxScrollbarVisibility vert);
+
+private:
// this does (each) half of AdjustScrollbars() work
void DoAdjustScrollbar(GtkRange* range,
int pixelsPerLine,
int pixelsPerLine,
int *posOld);
- // implement the base class methods
- virtual void DoScroll(int x, int y);
- virtual void DoShowScrollbars(wxScrollbarVisibility horz,
- wxScrollbarVisibility vert);
-
private:
DECLARE_NO_COPY_CLASS(wxScrollHelper)
};
bool noRefresh = false );
// scroll to the given (in logical coords) position
- void Scroll(int x, int y) { DoScroll(x, y); }
- void Scroll(const wxPoint& pt) { DoScroll(pt.x, pt.y); }
+ //
+ // notice that for backwards compatibility reasons Scroll() is virtual as
+ // the existing code could override it but new code should override
+ // DoScroll() instead
+ virtual void Scroll(int x, int y) { DoScroll(x, y); }
+ virtual void Scroll(const wxPoint& pt) { DoScroll(pt.x, pt.y); }
// get/set the page size for this orientation (wxVERTICAL/wxHORIZONTAL)
int GetScrollPageSize(int orient) const;