mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 07:26:57 +08:00
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
This commit is contained in:
+13
-1
@@ -50,12 +50,16 @@ class FL_EXPORT Fl_Spinner : public Fl_Group {
|
|||||||
double step_; // Amount to add/subtract for up/down
|
double step_; // Amount to add/subtract for up/down
|
||||||
const char *format_; // Format string
|
const char *format_; // Format string
|
||||||
|
|
||||||
|
#if FLTK_ABI_VERSION >= 10302
|
||||||
|
// NEW
|
||||||
|
protected:
|
||||||
|
#endif
|
||||||
Fl_Input input_; // Input field for the value
|
Fl_Input input_; // Input field for the value
|
||||||
Fl_Repeat_Button
|
Fl_Repeat_Button
|
||||||
up_button_, // Up button
|
up_button_, // Up button
|
||||||
down_button_; // Down button
|
down_button_; // Down button
|
||||||
|
|
||||||
|
private:
|
||||||
static void sb_cb(Fl_Widget *w, Fl_Spinner *sb) {
|
static void sb_cb(Fl_Widget *w, Fl_Spinner *sb) {
|
||||||
double v; // New value
|
double v; // New value
|
||||||
|
|
||||||
@@ -253,6 +257,14 @@ class FL_EXPORT Fl_Spinner : public Fl_Group {
|
|||||||
type() should be changed to floating point.
|
type() should be changed to floating point.
|
||||||
*/
|
*/
|
||||||
void value(double v) { value_ = v; update(); }
|
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
|
#endif // !Fl_Spinner_H
|
||||||
|
|||||||
Reference in New Issue
Block a user