From f9d8abbf7bcfaa74bf52db3f8f97481d35792d29 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Wed, 16 May 2012 07:25:11 +0000 Subject: [PATCH] o Added color() methods to get/set color of input field. o ABI feature: change input and up/down buttons from 'private' to 'protected' git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Spinner.H | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/FL/Fl_Spinner.H b/FL/Fl_Spinner.H index 677345702..90706d6b1 100644 --- a/FL/Fl_Spinner.H +++ b/FL/Fl_Spinner.H @@ -50,12 +50,16 @@ class FL_EXPORT Fl_Spinner : public Fl_Group { double step_; // Amount to add/subtract for up/down const char *format_; // Format string +#if FLTK_ABI_VERSION >= 10302 +// NEW +protected: +#endif Fl_Input input_; // Input field for the value Fl_Repeat_Button up_button_, // Up button down_button_; // Down button - +private: static void sb_cb(Fl_Widget *w, Fl_Spinner *sb) { double v; // New value @@ -253,6 +257,14 @@ class FL_EXPORT Fl_Spinner : public Fl_Group { type() should be changed to floating point. */ void value(double v) { value_ = v; update(); } + /** + Change the background color of the spinner widget's input field. + */ + void color(Fl_Color v) { input_.color(v); } + /** + Return the background color of the spinner widget's input field. + */ + Fl_Color color() const { return(input_.color()); } }; #endif // !Fl_Spinner_H