summaryrefslogtreecommitdiff
path: root/src/Fl_Scrollbar.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-08-05 14:00:15 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-08-05 14:00:15 +0000
commit51050b38d82ca53bb71c85d2031f9777e6dd373e (patch)
treee7e8958a5b433cd8b84e7e312d421ce8c6a84400 /src/Fl_Scrollbar.cxx
parent03f49329ff670c072aaddabf8f1beaf4f69e5bd9 (diff)
Keyboard nav for valuators.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1555 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Scrollbar.cxx')
-rw-r--r--src/Fl_Scrollbar.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Fl_Scrollbar.cxx b/src/Fl_Scrollbar.cxx
index feeb34fea..c252dc2b7 100644
--- a/src/Fl_Scrollbar.cxx
+++ b/src/Fl_Scrollbar.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.1 2001/08/04 12:21:33 easysw Exp $"
+// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.2 2001/08/05 14:00:15 easysw Exp $"
//
// Scroll bar widget for the Fast Light Tool Kit (FLTK).
//
@@ -109,6 +109,7 @@ int Fl_Scrollbar::handle(int event) {
handle_release();
return 1;
case FL_PUSH:
+ take_focus();
if (pushed_) return 1;
if (area != 8) pushed_ = area;
if (pushed_) {
@@ -126,7 +127,12 @@ int Fl_Scrollbar::handle(int event) {
if (horizontal()) return 0;
handle_drag(clamp(value() + 3 * linesize_ * Fl::e_dy));
return 1;
- case FL_SHORTCUT: {
+ case FL_FOCUS :
+ case FL_UNFOCUS :
+ damage(FL_DAMAGE_ALL);
+ return 1;
+ case FL_SHORTCUT:
+ case FL_KEYBOARD: {
int v = value();
int ls = maximum()>=minimum() ? linesize_ : -linesize_;
if (horizontal()) {
@@ -238,5 +244,5 @@ Fl_Scrollbar::Fl_Scrollbar(int X, int Y, int W, int H, const char* L)
}
//
-// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.1 2001/08/04 12:21:33 easysw Exp $".
+// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.2 2001/08/05 14:00:15 easysw Exp $".
//