diff --git a/fltk b/fltk index a333817..5c6ec56 160000 --- a/fltk +++ b/fltk @@ -1 +1 @@ -Subproject commit a333817f4178d944685fc787bd389097e8d85aca +Subproject commit 5c6ec56b33d9eb5a9261eb72128d86f8e6ff5305 diff --git a/include/cfl_valuator.h b/include/cfl_valuator.h index 24ec0b8..92cc700 100644 --- a/include/cfl_valuator.h +++ b/include/cfl_valuator.h @@ -34,6 +34,8 @@ int Fl_Slider_slider_box(const Fl_Slider *self); void Fl_Slider_set_slider_box(Fl_Slider *self, int c); +int Fl_Slider_scroll_value(Fl_Slider *self, int pos, int windowSize, int first_line, int total_lines); + VALUATOR_DECLARE(Fl_Slider) WIDGET_DECLARE(Fl_Nice_Slider) @@ -70,6 +72,8 @@ void Fl_Scrollbar_set_linesize(Fl_Scrollbar *self, int sz); int Fl_Scrollbar_linesize(const Fl_Scrollbar *self); +int Fl_Scrollbar_scroll_value(Fl_Scrollbar *self, int pos, int windowSize, int first_line, int total_lines); + VALUATOR_DECLARE(Fl_Scrollbar) WIDGET_DECLARE(Fl_Value_Slider) diff --git a/src/cfl_valuator.cpp b/src/cfl_valuator.cpp index 848fd97..83abd10 100644 --- a/src/cfl_valuator.cpp +++ b/src/cfl_valuator.cpp @@ -104,6 +104,11 @@ void Fl_Slider_set_slider_box(Fl_Slider *self, int c) { LOCK(self->slider((Fl_Boxtype)c)); } +int Fl_Slider_scroll_value(Fl_Slider *self, int pos, int windowSize, int first_line, int total_lines) { + LOCK(auto ret = self->scrollvalue(pos, windowSize, first_line, total_lines)); + return ret; +} + VALUATOR_DEFINE(Fl_Slider) WIDGET_CLASS(Fl_Nice_Slider) @@ -167,6 +172,11 @@ int Fl_Scrollbar_linesize(const Fl_Scrollbar *self) { return ret; } +int Fl_Scrollbar_scroll_value(Fl_Scrollbar *self, int pos, int windowSize, int first_line, int total_lines) { + LOCK(auto ret = self->value(pos, windowSize, first_line, total_lines)); + return ret; +} + VALUATOR_DEFINE(Fl_Scrollbar) WIDGET_CLASS(Fl_Value_Slider)