summaryrefslogtreecommitdiff
path: root/src/Fl_Value_Input.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-03-07 08:51:44 +0000
committerBill Spitzak <spitzak@gmail.com>1999-03-07 08:51:44 +0000
commit51d37642ba4f9071ac178328cec7d421d4724187 (patch)
tree6ac5e6ad6e0b210b2b8bf32168752787bdb46db4 /src/Fl_Value_Input.cxx
parent6c793587e3305a4de1a080bb5663a356392c1075 (diff)
Contributed code for more accurate item_height() in Fl_Browser.
Fixed display of Fl_Choice yet again Tried to remove warning egcs warning messages from Fl_Color_Chooser Fl_Value_Input updates without user having to type Enter git-svn-id: file:///fltk/svn/fltk/trunk@374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Value_Input.cxx')
-rw-r--r--src/Fl_Value_Input.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Fl_Value_Input.cxx b/src/Fl_Value_Input.cxx
index d1bc1f0bd..63404025c 100644
--- a/src/Fl_Value_Input.cxx
+++ b/src/Fl_Value_Input.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Value_Input.cxx,v 1.5 1999/01/07 19:17:28 mike Exp $"
+// "$Id: Fl_Value_Input.cxx,v 1.6 1999/03/07 08:51:44 bill Exp $"
//
// Value input widget for the Fast Light Tool Kit (FLTK).
//
@@ -32,14 +32,18 @@
#include <FL/Fl_Group.H>
#include <stdlib.h>
+static char hack_o_rama;
+
void Fl_Value_Input::input_cb(Fl_Widget*, void* v) {
Fl_Value_Input& t = *(Fl_Value_Input*)v;
double nv;
if (t.step()>=1.0) nv = strtol(t.input.value(), 0, 0);
else nv = strtod(t.input.value(), 0);
+ hack_o_rama = 1;
t.handle_push();
t.handle_drag(nv);
t.handle_release();
+ hack_o_rama = 0;
}
void Fl_Value_Input::draw() {
@@ -56,6 +60,7 @@ void Fl_Value_Input::resize(int X, int Y, int W, int H) {
}
void Fl_Value_Input::value_damage() {
+ if (hack_o_rama) return;
char buf[128];
format(buf);
input.value(buf);
@@ -113,7 +118,7 @@ Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char* l)
((Fl_Group*)input.parent())->remove(input);
input.parent(this); // kludge!
input.callback(input_cb, this);
- input.when((Fl_When)(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY));
+ input.when(FL_WHEN_CHANGED);
box(input.box());
color(input.color());
selection_color(input.selection_color());
@@ -122,5 +127,5 @@ Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char* l)
}
//
-// End of "$Id: Fl_Value_Input.cxx,v 1.5 1999/01/07 19:17:28 mike Exp $".
+// End of "$Id: Fl_Value_Input.cxx,v 1.6 1999/03/07 08:51:44 bill Exp $".
//