diff --git a/FL/Fl_Spinner.H b/FL/Fl_Spinner.H
index 139079980..35a9badfb 100644
--- a/FL/Fl_Spinner.H
+++ b/FL/Fl_Spinner.H
@@ -45,10 +45,10 @@
class Fl_Spinner : public Fl_Group
{
- int value_; // Current value
- int minimum_; // Minimum value
- int maximum_; // Maximum value
- int step_; // Amount to add/subtract for up/down
+ double value_; // Current value
+ double minimum_; // Minimum value
+ double maximum_; // Maximum value
+ double step_; // Amount to add/subtract for up/down
const char *format_; // Format string
Fl_Input input_; // Input field for the value
@@ -57,11 +57,11 @@ class Fl_Spinner : public Fl_Group
down_button_; // Down button
static void sb_cb(Fl_Widget *w, Fl_Spinner *sb) {
- int v; // New value
+ double v; // New value
if (w == &(sb->input_)) {
// Something changed in the input field...
- v = atoi(sb->input_.value());
+ v = atof(sb->input_.value());
if (v < sb->minimum_) {
sb->value_ = sb->minimum_;
@@ -107,11 +107,11 @@ class Fl_Spinner : public Fl_Group
H / 2 + 2, H / 2, "@-22>") {
end();
- value_ = 1;
- minimum_ = 1;
- maximum_ = 100;
- step_ = 1;
- format_ = "%d";
+ value_ = 1.0;
+ minimum_ = 1.0;
+ maximum_ = 100.0;
+ step_ = 1.0;
+ format_ = "%.0f";
align(FL_ALIGN_LEFT);
@@ -127,11 +127,11 @@ class Fl_Spinner : public Fl_Group
const char *format() { return (format_); }
void format(const char *f) { format_ = f; update(); }
- int maxinum() const { return (maximum_); }
- void maximum(int m) { maximum_ = m; }
- int mininum() const { return (minimum_); }
- void minimum(int m) { minimum_ = m; }
- void range(int a, int b) { minimum_ = a; maximum_ = b; }
+ double maxinum() const { return (maximum_); }
+ void maximum(double m) { maximum_ = m; }
+ double mininum() const { return (minimum_); }
+ void minimum(double m) { minimum_ = m; }
+ void range(double a, double b) { minimum_ = a; maximum_ = b; }
void resize(int X, int Y, int W, int H) {
Fl_Group::resize(X,Y,W,H);
@@ -140,8 +140,8 @@ class Fl_Spinner : public Fl_Group
down_button_.resize(X + W - H / 2 - 2, Y + H - H / 2,
H / 2 + 2, H / 2);
}
- int step() const { return (step_); }
- void step(int s) { step_ = s; }
+ double step() const { return (step_); }
+ void step(double s) { step_ = s; }
Fl_Color textcolor() const {
return (input_.textcolor());
}
@@ -160,8 +160,8 @@ class Fl_Spinner : public Fl_Group
void textsize(uchar s) {
input_.textsize(s);
}
- int value() const { return (value_); }
- void value(int v) { value_ = v; update(); }
+ double value() const { return (value_); }
+ void value(double v) { value_ = v; update(); }
};
#endif // !Fl_Spinner_H
diff --git a/documentation/Fl_Spinner.html b/documentation/Fl_Spinner.html
new file mode 100644
index 000000000..ab6383c77
--- /dev/null
+++ b/documentation/Fl_Spinner.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+Class Hierarchy
+
+
+Fl_Group
+ |
+ +----Fl_Spinner
+ |
+ +----Fl_Input
+ Fl_Repeat_Button
+
+
+Include Files
+
+
+#include <FL/Fl_Spinner.H>
+
+
+Description
+
+The Fl_Spinner widget is a combination of the input
+widget and repeat buttons. The user can either type into the
+input area or use the buttons to change the value.
+
+
Methods
+
+
+
+
+
+Creates a new Fl_Spinner widget using the given position, size,
+and label string.
+
+
+
+Destroys the widget and any value associated with it.
+
+
+
+Sets or returns the format string for the value.
+
+
+
+Sets or returns the maximum value of the widget.
+
+
+
+Sets or returns the minimum value of the widget.
+
+
+
+Sets the minimum and maximum values for the widget.
+
+
+
+Sets or returns the amount to change the value when the user
+clicks a button.
+
+
+
+Sets or returns the color of the text in the input field.
+
+
+
+Sets or returns the font of the text in the input field.
+
+
+
+Sets or returns the size of the text in the input field.
+
+
+
+Sets or returns the current value of the widget.
+
+
+
diff --git a/documentation/Makefile b/documentation/Makefile
index a8434510a..a648c6304 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -119,6 +119,7 @@ HTMLFILES = \
Fl_Shared_Image.html \
Fl_Single_Window.html \
Fl_Slider.html \
+ Fl_Spinner.html \
Fl_Tabs.html \
Fl_Text_Buffer.html \
Fl_Text_Display.html \
diff --git a/documentation/fltk.book b/documentation/fltk.book
index cc71dc505..436ffe97d 100644
--- a/documentation/fltk.book
+++ b/documentation/fltk.book
@@ -76,6 +76,7 @@ Fl_Secret_Input.html
Fl_Select_Browser.html
Fl_Single_Window.html
Fl_Slider.html
+Fl_Spinner.html
Fl_Tabs.html
Fl_Text_Buffer.html
Fl_Text_Display.html
diff --git a/documentation/widgets.html b/documentation/widgets.html
index d101330c6..393b8af65 100644
--- a/documentation/widgets.html
+++ b/documentation/widgets.html
@@ -79,6 +79,7 @@ description of the fl_ functions, see
Fl_Shared_Image
Fl_Single_Window
Fl_Slider
+Fl_Spinner
Fl_Tabs
Fl_Text_Buffer
Fl_Text_Display
@@ -165,6 +166,7 @@ description of the fl_ functions, see
Fl_Input_Choice
Fl_Pack
Fl_Scroll
+ Fl_Slider
Fl_Tabs
Fl_Text_Display
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index a44e0fbcf..f138690b7 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -909,7 +909,7 @@ void print_cb(Fl_Return_Button *, void *) {
print_progress->show();
// Figure out how many pages we'll have to print...
- if (print_collate_button->value()) copies = print_copies->value();
+ if (print_collate_button->value()) copies = (int)print_copies->value();
else copies = 1;
if (print_pages->value()) {
@@ -958,8 +958,8 @@ void print_cb(Fl_Return_Button *, void *) {
// Pipe the output into the lp command...
const char *printer = (const char *)print_choice->menu()[print_choice->value()].user_data();
- snprintf(command, sizeof(command), "lp -s -d %s -n %d -t '%s' -o media=%s",
- printer, print_collate_button->value() ? 1 : print_copies->value(),
+ snprintf(command, sizeof(command), "lp -s -d %s -n %.0f -t '%s' -o media=%s",
+ printer, print_collate_button->value() ? 1.0 : print_copies->value(),
basename, print_page_size->text(print_page_size->value()));
outfile = popen(command, "w");
} else {
@@ -1483,7 +1483,8 @@ void load_history() {
fl_filename_relative(relative_history[i], sizeof(relative_history[i]),
absolute_history[i]);
- Main_Menu[i + HISTORY_ITEM].flags = 0;
+ if (i == 9) Main_Menu[i + HISTORY_ITEM].flags = FL_MENU_DIVIDER;
+ else Main_Menu[i + HISTORY_ITEM].flags = 0;
} else break;
}
@@ -1531,8 +1532,10 @@ void update_history(const char *flname) {
// Update the menu items as needed...
for (i = 0; i < max_files; i ++) {
fluid_prefs.set( Fl_Preferences::Name("file%d", i), absolute_history[i]);
- if (absolute_history[i][0]) Main_Menu[i + HISTORY_ITEM].flags = 0;
- else break;
+ if (absolute_history[i][0]) {
+ if (i == 9) Main_Menu[i + HISTORY_ITEM].flags = FL_MENU_DIVIDER;
+ else Main_Menu[i + HISTORY_ITEM].flags = 0;
+ } else break;
}
for (; i < 10; i ++) {
diff --git a/fluid/makedepend b/fluid/makedepend
index 0c4ffa713..51ba4404c 100644
--- a/fluid/makedepend
+++ b/fluid/makedepend
@@ -56,7 +56,8 @@ Fl_Menu_Type.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
Fl_Menu_Type.o: ../FL/Fl_Preferences.H ../FL/Fl_Tooltip.H ../FL/Fl_Button.H
Fl_Menu_Type.o: ../FL/Fl_Box.H ../FL/Fl_Light_Button.H
Fl_Menu_Type.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
-Fl_Menu_Type.o: ../FL/Fl_Button.H ../FL/Fl_Return_Button.H ../FL/fl_message.H
+Fl_Menu_Type.o: ../FL/Fl_Button.H ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H
+Fl_Menu_Type.o: ../FL/Fl.H ../FL/Fl_Return_Button.H ../FL/fl_message.H
Fl_Menu_Type.o: ../FL/fl_ask.H ../src/flstring.h ../FL/Fl_Export.H
Fl_Menu_Type.o: ../config.h ../FL/Fl_Output.H ../FL/Fl_Input.H
Fl_Menu_Type.o: Shortcut_Button.h
@@ -108,12 +109,14 @@ Fl_Widget_Type.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
Fl_Widget_Type.o: ../FL/Fl_Preferences.H ../FL/Fl_Tooltip.H ../FL/Fl_Button.H
Fl_Widget_Type.o: ../FL/Fl_Box.H ../FL/Fl_Light_Button.H
Fl_Widget_Type.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H
-Fl_Widget_Type.o: ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
-Fl_Widget_Type.o: ../FL/fl_message.H ../FL/fl_ask.H ../FL/Fl_Slider.H
-Fl_Widget_Type.o: ../src/flstring.h ../FL/Fl_Export.H ../config.h
-Fl_Widget_Type.o: widget_panel.h ../FL/Fl_Value_Input.H ../FL/Fl_Input.H
-Fl_Widget_Type.o: Shortcut_Button.h CodeEditor.h ../FL/Fl_Text_Editor.H
-Fl_Widget_Type.o: ../FL/Fl_Text_Display.H ../FL/fl_show_colormap.H
+Fl_Widget_Type.o: ../FL/Fl_Button.H ../FL/Fl_Spinner.H
+Fl_Widget_Type.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H
+Fl_Widget_Type.o: ../FL/Fl_Return_Button.H ../FL/fl_message.H ../FL/fl_ask.H
+Fl_Widget_Type.o: ../FL/Fl_Slider.H ../src/flstring.h ../FL/Fl_Export.H
+Fl_Widget_Type.o: ../config.h widget_panel.h ../FL/Fl_Value_Input.H
+Fl_Widget_Type.o: ../FL/Fl_Input.H Shortcut_Button.h CodeEditor.h
+Fl_Widget_Type.o: ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H
+Fl_Widget_Type.o: ../FL/fl_show_colormap.H
Fl_Window_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
Fl_Window_Type.o: ../FL/Fl_Overlay_Window.H ../FL/Fl_Double_Window.H
Fl_Window_Type.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Widget.H
@@ -133,6 +136,7 @@ Fl_Window_Type.o: ../FL/Fl_Double_Window.H ../FL/Fl_Preferences.H
Fl_Window_Type.o: ../FL/Fl_Tooltip.H ../FL/Fl_Button.H ../FL/Fl_Box.H
Fl_Window_Type.o: ../FL/Fl_Light_Button.H ../FL/Fl_Check_Button.H
Fl_Window_Type.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
+Fl_Window_Type.o: ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H ../FL/Fl.H
Fl_Window_Type.o: ../FL/Fl_Return_Button.H widget_panel.h
Fl_Window_Type.o: ../FL/Fl_Value_Input.H ../FL/Fl_Input.H Shortcut_Button.h
Fl_Window_Type.o: CodeEditor.h ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H
@@ -182,6 +186,7 @@ alignment_panel.o: ../FL/Fl_Input_.H ../FL/Fl_Light_Button.H
alignment_panel.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H
alignment_panel.o: ../FL/Fl_Image.H ../FL/Fl_Check_Button.H
alignment_panel.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
+alignment_panel.o: ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H ../FL/Fl.H
alignment_panel.o: ../FL/Fl_Return_Button.H
code.o: ../src/flstring.h ../FL/Fl_Export.H ../config.h ../FL/Fl.H
code.o: ../FL/Enumerations.H ../FL/Fl_Export.H Fl_Type.h ../FL/Fl_Widget.H
@@ -197,7 +202,8 @@ code.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
code.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Double_Window.H ../FL/Fl_Window.H
code.o: ../FL/Fl_Preferences.H ../FL/Fl_Tooltip.H ../FL/Fl_Button.H
code.o: ../FL/Fl_Box.H ../FL/Fl_Light_Button.H ../FL/Fl_Check_Button.H
-code.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
+code.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Spinner.H
+code.o: ../FL/Fl_Repeat_Button.H ../FL/Fl.H ../FL/Fl_Return_Button.H
code.o: ../FL/filename.H
factory.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Group.H
factory.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../FL/Fl_Image.H
@@ -236,6 +242,7 @@ file.o: ../FL/Fl_Tabs.H ../FL/Fl_Group.H ../FL/Fl_Box.H ../FL/Fl_Input.H
file.o: ../FL/Fl_Input_.H ../FL/Fl_Light_Button.H ../FL/Fl_Choice.H
file.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Item.H ../FL/Fl_Image.H
file.o: ../FL/Fl_Check_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
+file.o: ../FL/Fl_Spinner.H ../FL/Fl_Repeat_Button.H ../FL/Fl.H
file.o: ../FL/Fl_Return_Button.H ../FL/fl_message.H ../FL/fl_ask.H
file.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Menu.H Fluid_Image.h
file.o: ../FL/Fl_Shared_Image.H ../FL/fl_draw.H ../FL/Fl_Pack.H
@@ -259,11 +266,11 @@ fluid.o: ../FL/Fl_Return_Button.H ../FL/fl_message.H ../FL/fl_ask.H
fluid.o: ../FL/filename.H ../src/flstring.h ../FL/Fl_Export.H ../config.h
fluid.o: alignment_panel.h ../FL/Fl_Text_Buffer.H ../FL/Fl_Text_Display.H
fluid.o: ../FL/Fl_Text_Buffer.H ../FL/Fl_Tooltip.H ../FL/Fl_Widget.H
-fluid.o: ../FL/Fl_Tabs.H ../FL/Fl_Light_Button.H function_panel.h
-fluid.o: ../FL/Fl_Window.H CodeEditor.h ../FL/Fl_Text_Editor.H
-fluid.o: ../FL/Fl_Text_Display.H template_panel.h ../FL/Fl_Browser.H
-fluid.o: print_panel.h ../FL/Fl_Round_Button.H ../FL/Fl_Spinner.H
-fluid.o: ../FL/Fl_Repeat_Button.H ../FL/Fl_Progress.H about_panel.h undo.h
+fluid.o: ../FL/Fl_Tabs.H ../FL/Fl_Light_Button.H ../FL/Fl_Spinner.H
+fluid.o: ../FL/Fl_Repeat_Button.H function_panel.h ../FL/Fl_Window.H
+fluid.o: CodeEditor.h ../FL/Fl_Text_Editor.H ../FL/Fl_Text_Display.H
+fluid.o: template_panel.h ../FL/Fl_Browser.H print_panel.h
+fluid.o: ../FL/Fl_Round_Button.H ../FL/Fl_Progress.H about_panel.h undo.h
fluid.o: Fl_Type.h ../FL/Fl_Menu.H Fluid_Image.h ../FL/Fl_Shared_Image.H
fluid.o: ../FL/Fl_Pack.H ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H
fluid.o: ../FL/Fl_Input_Choice.H
diff --git a/fluid/print_panel.cxx b/fluid/print_panel.cxx
index 18f8d970c..9e7d21113 100644
--- a/fluid/print_panel.cxx
+++ b/fluid/print_panel.cxx
@@ -296,7 +296,7 @@ Fl_Double_Window* make_print_panel() {
o->box(FL_THIN_DOWN_BOX);
o->labelfont(1);
o->align(FL_ALIGN_TOP_LEFT);
- { Fl_Spinner* o = print_copies = new Fl_Spinner(326, 96, 40, 25, "# Copies:");
+ { Fl_Spinner* o = print_copies = new Fl_Spinner(321, 96, 45, 25, "# Copies:");
o->callback((Fl_Callback*)cb_print_copies);
o->when(FL_WHEN_CHANGED);
}
diff --git a/fluid/print_panel.fl b/fluid/print_panel.fl
index 07aeb1cc0..723dbe841 100644
--- a/fluid/print_panel.fl
+++ b/fluid/print_panel.fl
@@ -109,8 +109,8 @@ print_to->deactivate();}
print_collate_button->activate();
print_collate_group[0]->activate();
print_collate_group[1]->activate();
-}}
- xywh {326 96 40 25} when 1
+}} selected
+ xywh {321 96 45 25} when 1
}
Fl_Check_Button print_collate_button {
label Collate
@@ -277,7 +277,7 @@ print_update_status();}
}
Fl_Button {} {
label Use
- callback {print_properties_panel->hide();} selected
+ callback {print_properties_panel->hide();}
xywh {60 95 53 25}
}
}