1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added an option to Viewport to allow mouse-wheel scrolling when scrollbars are disabled.

This commit is contained in:
jules 2014-04-12 21:57:21 +01:00
parent bcce4e388a
commit 943d20ba7a
2 changed files with 52 additions and 50 deletions

View file

@ -191,9 +191,15 @@ public:
If set to false, the scrollbars won't ever appear. When true (the default)
they will appear only when needed.
The allowVerticalScrollingWithoutScrollbar parameters allow you to enable
mouse-wheel scrolling even when there the scrollbars are hidden. When the
scrollbars are visible, these parameters are ignored.
*/
void setScrollBarsShown (bool showVerticalScrollbarIfNeeded,
bool showHorizontalScrollbarIfNeeded);
bool showHorizontalScrollbarIfNeeded,
bool allowVerticalScrollingWithoutScrollbar = false,
bool allowHorizontalScrollingWithoutScrollbar = false);
/** True if the vertical scrollbar is enabled.
@see setScrollBarsShown
@ -258,9 +264,9 @@ private:
int scrollBarThickness;
int singleStepX, singleStepY;
bool showHScrollbar, showVScrollbar, deleteContent;
bool allowScrollingWithoutScrollbarV, allowScrollingWithoutScrollbarH;
Component contentHolder;
ScrollBar verticalScrollBar;
ScrollBar horizontalScrollBar;
ScrollBar verticalScrollBar, horizontalScrollBar;
Point<int> viewportPosToCompPos (Point<int>) const;
void updateVisibleArea();