Improve horizontal scrolling in wxRibbonControl.

Scroll by entire "sections", i.e. panes of the ribbon, instead of scrolling by
a fixed number of pixels as it's much more useful and user-friendly to uncover
the next section entirely instead of asking the user to press on the arrow
several times before being able to use it.

Closes #15232.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-05-31 23:21:11 +00:00
parent ff3493c0ce
commit 0a72cae73d
4 changed files with 141 additions and 2 deletions

View File

@@ -148,6 +148,7 @@ public:
@see GetMajorAxis()
@see ScrollPixels()
@see ScrollSections()
*/
virtual bool ScrollLines(int lines);
@@ -165,9 +166,27 @@ public:
@see GetMajorAxis()
@see ScrollLines()
@see ScrollSections()
*/
bool ScrollPixels(int pixels);
/**
Scroll the page by an entire child section.
The @a sections parameter value should be 1 or -1. This will scroll
enough to uncover a partially visible child section or totally uncover
the next child section that may not be visible at all.
@return @true if the page scrolled at least one pixel in the given
direction, @false if it did not scroll.
@see ScrollPixels()
@see ScrollSections()
@since 2.9.5
*/
bool ScrollSections(int sections);
/**
Get the direction in which ribbon panels are stacked within the page.