More doco updates.

All of the core widgets now consistently set changed() before
calling the callback function for a change in value; this allows
programs to check the changed() state in a callback to see why
they are being called (STR #475)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3713 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2004-07-27 16:02:21 +00:00
parent a529510e5b
commit 62c19c63d6
20 changed files with 141 additions and 95 deletions
+7 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.20 2004/04/11 04:38:57 easysw Exp $"
// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.21 2004/07/27 16:02:19 easysw Exp $"
//
// Base Browser widget class for the Fast Light Tool Kit (FLTK).
//
@@ -510,7 +510,10 @@ int Fl_Browser_::select(void* l, int i, int docallbacks) {
display(l);
}
}
if (docallbacks) do_callback();
if (docallbacks) {
set_changed();
do_callback();
}
return 1;
}
@@ -687,8 +690,8 @@ int Fl_Browser_::handle(int event) {
void* t = selection_; deselect(); selection_ = t;
}
if (change) {
set_changed();
if (when() & FL_WHEN_RELEASE) do_callback();
else if (!(when()&FL_WHEN_CHANGED)) set_changed();
} else {
if (when() & FL_WHEN_NOT_CHANGED) do_callback();
}
@@ -758,5 +761,5 @@ void Fl_Browser_::item_select(void*, int) {}
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
//
// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.20 2004/04/11 04:38:57 easysw Exp $".
// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.21 2004/07/27 16:02:19 easysw Exp $".
//
+12 -10
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.22 2004/04/11 04:38:57 easysw Exp $"
// "$Id: Fl_Button.cxx,v 1.4.2.6.2.23 2004/07/27 16:02:20 easysw Exp $"
//
// Button widget for the Fast Light Tool Kit (FLTK).
//
@@ -81,6 +81,7 @@ int Fl_Button::handle(int event) {
newval = oldval;
if (newval != value_) {
value_ = newval;
set_changed();
redraw();
if (when() & FL_WHEN_CHANGED) do_callback();
}
@@ -90,15 +91,14 @@ int Fl_Button::handle(int event) {
if (when() & FL_WHEN_NOT_CHANGED) do_callback();
return 1;
}
if (type() == FL_RADIO_BUTTON)
setonly();
else if (type() == FL_TOGGLE_BUTTON)
oldval = value_;
set_changed();
if (type() == FL_RADIO_BUTTON) setonly();
else if (type() == FL_TOGGLE_BUTTON) oldval = value_;
else {
value(oldval);
if (when() & FL_WHEN_CHANGED) do_callback();
}
if (when() & FL_WHEN_RELEASE) do_callback(); else set_changed();
if (when() & FL_WHEN_RELEASE) do_callback();
return 1;
case FL_SHORTCUT:
if (!(shortcut() ?
@@ -108,12 +108,13 @@ int Fl_Button::handle(int event) {
if (type() == FL_RADIO_BUTTON && !value_) {
setonly();
set_changed();
if (when() & FL_WHEN_CHANGED) do_callback();
} else if (type() == FL_TOGGLE_BUTTON) {
value(!value());
set_changed();
if (when() & FL_WHEN_CHANGED) do_callback();
}
if (when() & FL_WHEN_RELEASE) do_callback(); else set_changed();
} else if (when() & FL_WHEN_RELEASE) do_callback();
return 1;
case FL_FOCUS :
case FL_UNFOCUS :
@@ -131,6 +132,7 @@ int Fl_Button::handle(int event) {
case FL_KEYBOARD :
if (Fl::focus() == this && Fl::event_key() == ' ' &&
!(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) {
set_changed();
if (type() == FL_RADIO_BUTTON && !value_) {
setonly();
if (when() & FL_WHEN_CHANGED) do_callback();
@@ -138,7 +140,7 @@ int Fl_Button::handle(int event) {
value(!value());
if (when() & FL_WHEN_CHANGED) do_callback();
}
if (when() & FL_WHEN_RELEASE) do_callback(); else set_changed();
if (when() & FL_WHEN_RELEASE) do_callback();
return 1;
}
default:
@@ -156,5 +158,5 @@ Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *l)
}
//
// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.22 2004/04/11 04:38:57 easysw Exp $".
// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.23 2004/07/27 16:02:20 easysw Exp $".
//
+4 -2
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Color_Chooser.cxx,v 1.7.2.4.2.7 2004/04/11 04:38:57 easysw Exp $"
// "$Id: Fl_Color_Chooser.cxx,v 1.7.2.4.2.8 2004/07/27 16:02:20 easysw Exp $"
//
// Color chooser for the Fast Light Tool Kit (FLTK).
//
@@ -125,6 +125,7 @@ int Fl_Color_Chooser::rgb(double R, double G, double B) {
double pv = value_;
rgb2hsv(R,G,B,hue_,saturation_,value_);
set_valuators();
set_changed();
if (value_ != pv) {
#ifdef UPDATE_HUE_BOX
huebox.damage(FL_DAMAGE_SCROLL);
@@ -157,6 +158,7 @@ int Fl_Color_Chooser::hsv(double H, double S, double V) {
}
hsv2rgb(H,S,V,r_,g_,b_);
set_valuators();
set_changed();
return 1;
}
@@ -521,5 +523,5 @@ int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b) {
}
//
// End of "$Id: Fl_Color_Chooser.cxx,v 1.7.2.4.2.7 2004/04/11 04:38:57 easysw Exp $".
// End of "$Id: Fl_Color_Chooser.cxx,v 1.7.2.4.2.8 2004/07/27 16:02:20 easysw Exp $".
//
+3 -2
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_File_Input.cxx,v 1.1.2.11 2004/04/11 04:38:57 easysw Exp $"
// "$Id: Fl_File_Input.cxx,v 1.1.2.12 2004/07/27 16:02:20 easysw Exp $"
//
// File_Input header file for the Fast Light Tool Kit (FLTK).
//
@@ -262,6 +262,7 @@ Fl_File_Input::handle_button(int event) // I - Event
value(newvalue, start - newvalue);
// Then do the callbacks, if necessary...
set_changed();
if (when() & FL_WHEN_CHANGED) do_callback();
}
@@ -270,5 +271,5 @@ Fl_File_Input::handle_button(int event) // I - Event
//
// End of "$Id: Fl_File_Input.cxx,v 1.1.2.11 2004/04/11 04:38:57 easysw Exp $".
// End of "$Id: Fl_File_Input.cxx,v 1.1.2.12 2004/07/27 16:02:20 easysw Exp $".
//
+9 -8
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Help_View.cxx,v 1.1.2.52 2004/07/26 20:52:51 easysw Exp $"
// "$Id: Fl_Help_View.cxx,v 1.1.2.53 2004/07/27 16:02:20 easysw Exp $"
//
// Fl_Help_View widget routines.
//
@@ -1372,6 +1372,7 @@ Fl_Help_View::format()
needspace = 0;
line = 0;
newalign = get_align(attrs, tolower(buf[1]) == 'h' ? CENTER : LEFT);
talign = newalign;
cells[column] = block - blocks_;
@@ -1574,15 +1575,15 @@ Fl_Help_View::format()
// Reset scrolling if it needs to be...
if (scrollbar_.visible()) {
int hh = h() - 8;
if (hscrollbar_.visible()) hh -= 16;
if ((topline_ + hh) > size_) topline(size_ - hh);
int temph = h() - 8;
if (hscrollbar_.visible()) temph -= 16;
if ((topline_ + temph) > size_) topline(size_ - temph);
else topline(topline_);
} else topline(0);
if (hscrollbar_.visible()) {
int ww = w() - 24;
if ((leftline_ + ww) > hsize_) leftline(hsize_ - ww);
int tempw = w() - 24;
if ((leftline_ + tempw) > hsize_) leftline(hsize_ - tempw);
else leftline(leftline_);
} else leftline(0);
}
@@ -2606,8 +2607,8 @@ Fl_Help_View::topline(int t) // I - Top line number
scrollbar_.value(topline_, h() - 24, 0, size_);
set_changed();
do_callback();
clear_changed();
redraw();
}
@@ -2810,5 +2811,5 @@ hscrollbar_callback(Fl_Widget *s, void *)
//
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.52 2004/07/26 20:52:51 easysw Exp $".
// End of "$Id: Fl_Help_View.cxx,v 1.1.2.53 2004/07/27 16:02:20 easysw Exp $".
//
+8 -5
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.29 2004/04/11 04:38:57 easysw Exp $"
// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.30 2004/07/27 16:02:21 easysw Exp $"
//
// Common input widget routines for the Fast Light Tool Kit (FLTK).
//
@@ -599,7 +599,8 @@ int Fl_Input_::replace(int b, int e, const char* text, int ilen) {
mark_ = position_ = undoat;
if (when()&FL_WHEN_CHANGED) do_callback(); else set_changed();
set_changed();
if (when()&FL_WHEN_CHANGED) do_callback();
return 1;
}
@@ -636,7 +637,8 @@ int Fl_Input_::undo() {
position_ = b;
minimal_update(b1);
if (when()&FL_WHEN_CHANGED) do_callback(); else set_changed();
set_changed();
if (when()&FL_WHEN_CHANGED) do_callback();
return 1;
}
@@ -649,7 +651,8 @@ int Fl_Input_::copy_cuts() {
void Fl_Input_::maybe_do_callback() {
if (changed() || (when()&FL_WHEN_NOT_CHANGED)) {
clear_changed(); do_callback();}
do_callback();
}
}
int Fl_Input_::handletext(int event, int X, int Y, int W, int H) {
@@ -852,5 +855,5 @@ Fl_Input_::~Fl_Input_() {
}
//
// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.29 2004/04/11 04:38:57 easysw Exp $".
// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.30 2004/07/27 16:02:21 easysw Exp $".
//
+2 -3
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.9 2004/04/11 04:38:57 easysw Exp $"
// "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.10 2004/07/27 16:02:21 easysw Exp $"
//
// Common menu code for the Fast Light Tool Kit (FLTK).
//
@@ -138,7 +138,6 @@ const Fl_Menu_Item* Fl_Menu_::picked(const Fl_Menu_Item* v) {
value_ = v;
if (when()&(FL_WHEN_CHANGED|FL_WHEN_RELEASE)) {
if (changed() || when()&FL_WHEN_NOT_CHANGED) {
clear_changed();
if (value_ && value_->callback_) value_->do_callback((Fl_Widget*)this);
else do_callback();
}
@@ -225,5 +224,5 @@ void Fl_Menu_::clear() {
}
//
// End of "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.9 2004/04/11 04:38:57 easysw Exp $".
// End of "$Id: Fl_Menu_.cxx,v 1.7.2.8.2.10 2004/07/27 16:02:21 easysw Exp $".
//
+6 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:58 easysw Exp $"
// "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.5 2004/07/27 16:02:21 easysw Exp $"
//
// Positioner widget for the Fast Light Tool Kit (FLTK).
//
@@ -89,9 +89,11 @@ int Fl_Positioner::handle(int event, int X, int Y, int W, int H) {
if (yy > ymax) yy = ymax;
if (value(xx, yy)) set_changed();}
if (!(when() & FL_WHEN_CHANGED ||
when() & FL_WHEN_RELEASE && event == FL_RELEASE)) return 1;
(when() & FL_WHEN_RELEASE && event == FL_RELEASE))) return 1;
if (changed() || when()&FL_WHEN_NOT_CHANGED) {
clear_changed(); do_callback();}
if (event == FL_RELEASE) clear_changed();
do_callback();
}
return 1;
default:
return 0;
@@ -129,5 +131,5 @@ void Fl_Positioner::ybounds(double a, double b) {
}
//
// End of "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:58 easysw Exp $".
// End of "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.5 2004/07/27 16:02:21 easysw Exp $".
//
+3 -2
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.16 2004/04/11 04:38:58 easysw Exp $"
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.17 2004/07/27 16:02:21 easysw Exp $"
//
// Scroll bar widget for the Fast Light Tool Kit (FLTK).
//
@@ -176,6 +176,7 @@ int Fl_Scrollbar::handle(int event) {
if (v != value()) {
Fl_Slider::value(v);
value_damage();
set_changed();
do_callback();
}
return 1;}
@@ -242,5 +243,5 @@ Fl_Scrollbar::Fl_Scrollbar(int X, int Y, int W, int H, const char* L)
}
//
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.16 2004/04/11 04:38:58 easysw Exp $".
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.17 2004/07/27 16:02:21 easysw Exp $".
//
+11 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.19 2004/04/11 04:38:58 easysw Exp $"
// "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.20 2004/07/27 16:02:21 easysw Exp $"
//
// Tab widget for the Fast Light Tool Kit (FLTK).
//
@@ -133,8 +133,13 @@ int Fl_Tabs::handle(int event) {
case FL_DRAG:
case FL_RELEASE:
o = which(Fl::event_x(), Fl::event_y());
if (event == FL_RELEASE) {push(0); if (o && value(o)) do_callback();}
else push(o);
if (event == FL_RELEASE) {
push(0);
if (o && value(o)) {
set_changed();
do_callback();
}
} else push(o);
if (Fl::visible_focus() && event == FL_RELEASE) Fl::focus(this);
return 1;
case FL_FOCUS:
@@ -160,6 +165,7 @@ int Fl_Tabs::handle(int event) {
for (i = 1; i < children(); i ++)
if (child(i)->visible()) break;
value(child(i - 1));
set_changed();
do_callback();
return 1;
case FL_Right:
@@ -167,6 +173,7 @@ int Fl_Tabs::handle(int event) {
for (i = 0; i < children(); i ++)
if (child(i)->visible()) break;
value(child(i + 1));
set_changed();
do_callback();
return 1;
case FL_Down:
@@ -302,5 +309,5 @@ Fl_Tabs::Fl_Tabs(int X,int Y,int W, int H, const char *l) :
}
//
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.19 2004/04/11 04:38:58 easysw Exp $".
// End of "$Id: Fl_Tabs.cxx,v 1.6.2.10.2.20 2004/07/27 16:02:21 easysw Exp $".
//
+21 -14
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Text_Editor.cxx,v 1.9.2.20 2004/07/26 20:52:52 easysw Exp $"
// "$Id: Fl_Text_Editor.cxx,v 1.9.2.21 2004/07/27 16:02:21 easysw Exp $"
//
// Copyright 2001-2004 by Bill Spitzak and others.
// Original code Copyright Mark Edel. Permission to distribute under
@@ -185,8 +185,8 @@ int Fl_Text_Editor::kf_default(int c, Fl_Text_Editor* e) {
if (e->insert_mode()) e->insert(s);
else e->overstrike(s);
e->show_insert_position();
e->set_changed();
if (e->when()&FL_WHEN_CHANGED) e->do_callback();
else e->set_changed();
return 1;
}
@@ -199,7 +199,8 @@ int Fl_Text_Editor::kf_backspace(int, Fl_Text_Editor* e) {
e->buffer()->select(e->insert_position(), e->insert_position()+1);
kill_selection(e);
e->show_insert_position();
if (e->when()&FL_WHEN_CHANGED) e->do_callback(); else e->set_changed();
e->set_changed();
if (e->when()&FL_WHEN_CHANGED) e->do_callback();
return 1;
}
@@ -207,7 +208,8 @@ int Fl_Text_Editor::kf_enter(int, Fl_Text_Editor* e) {
kill_selection(e);
e->insert("\n");
e->show_insert_position();
if (e->when()&FL_WHEN_CHANGED) e->do_callback(); else e->set_changed();
e->set_changed();
if (e->when()&FL_WHEN_CHANGED) e->do_callback();
return 1;
}
@@ -342,7 +344,8 @@ int Fl_Text_Editor::kf_delete(int, Fl_Text_Editor* e) {
e->buffer()->select(e->insert_position(), e->insert_position()+1);
kill_selection(e);
e->show_insert_position();
if (e->when()&FL_WHEN_CHANGED) e->do_callback(); else e->set_changed();
e->set_changed();
if (e->when()&FL_WHEN_CHANGED) e->do_callback();
return 1;
}
@@ -358,7 +361,8 @@ int Fl_Text_Editor::kf_copy(int, Fl_Text_Editor* e) {
int Fl_Text_Editor::kf_cut(int c, Fl_Text_Editor* e) {
kf_copy(c, e);
kill_selection(e);
if (e->when()&FL_WHEN_CHANGED) e->do_callback(); else e->set_changed();
e->set_changed();
if (e->when()&FL_WHEN_CHANGED) e->do_callback();
return 1;
}
@@ -366,7 +370,8 @@ int Fl_Text_Editor::kf_paste(int, Fl_Text_Editor* e) {
kill_selection(e);
Fl::paste(*e, 1);
e->show_insert_position();
if (e->when()&FL_WHEN_CHANGED) e->do_callback(); else e->set_changed();
e->set_changed();
if (e->when()&FL_WHEN_CHANGED) e->do_callback();
return 1;
}
@@ -381,7 +386,8 @@ int Fl_Text_Editor::kf_undo(int , Fl_Text_Editor* e) {
int ret = e->buffer()->undo(&crsr);
e->insert_position(crsr);
e->show_insert_position();
if (e->when()&FL_WHEN_CHANGED) e->do_callback(); else e->set_changed();
e->set_changed();
if (e->when()&FL_WHEN_CHANGED) e->do_callback();
return ret;
}
@@ -399,8 +405,8 @@ int Fl_Text_Editor::handle_key() {
else overstrike(Fl::event_text());
}
show_insert_position();
set_changed();
if (when()&FL_WHEN_CHANGED) do_callback();
else set_changed();
return 1;
}
@@ -417,8 +423,7 @@ int Fl_Text_Editor::handle_key() {
void Fl_Text_Editor::maybe_do_callback() {
// printf("Fl_Text_Editor::maybe_do_callback()\n");
// printf("changed()=%d, when()=%x\n", changed(), when());
if (changed() || (when()&FL_WHEN_NOT_CHANGED)) {
clear_changed(); do_callback();}
if (changed() || (when()&FL_WHEN_NOT_CHANGED)) do_callback();
}
int Fl_Text_Editor::handle(int event) {
@@ -428,7 +433,8 @@ int Fl_Text_Editor::handle(int event) {
dragType = -1;
Fl::paste(*this, 0);
Fl::focus(this);
if (when()&FL_WHEN_CHANGED) do_callback(); else set_changed();
set_changed();
if (when()&FL_WHEN_CHANGED) do_callback();
return 1;
}
@@ -458,7 +464,8 @@ int Fl_Text_Editor::handle(int event) {
if (insert_mode()) insert(Fl::event_text());
else overstrike(Fl::event_text());
show_insert_position();
if (when()&FL_WHEN_CHANGED) do_callback(); else set_changed();
set_changed();
if (when()&FL_WHEN_CHANGED) do_callback();
return 1;
case FL_ENTER:
@@ -472,5 +479,5 @@ int Fl_Text_Editor::handle(int event) {
}
//
// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.20 2004/07/26 20:52:52 easysw Exp $".
// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.21 2004/07/27 16:02:21 easysw Exp $".
//
+3 -2
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.6 2004/04/11 04:38:58 easysw Exp $"
// "$Id: Fl_Tile.cxx,v 1.5.2.5.2.7 2004/07/27 16:02:21 easysw Exp $"
//
// Tile widget for the Fast Light Tool Kit (FLTK).
//
@@ -187,6 +187,7 @@ int Fl_Tile::handle(int event) {
} else
newy = sy;
position(sx,sy,newx,newy);
if (event == FL_DRAG) set_changed();
do_callback();
return 1;}
@@ -196,5 +197,5 @@ int Fl_Tile::handle(int event) {
}
//
// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.6 2004/04/11 04:38:58 easysw Exp $".
// End of "$Id: Fl_Tile.cxx,v 1.5.2.5.2.7 2004/07/27 16:02:21 easysw Exp $".
//
+5 -4
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.8 2004/04/11 04:38:58 easysw Exp $"
// "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.9 2004/07/27 16:02:21 easysw Exp $"
//
// Valuator widget for the Fast Light Tool Kit (FLTK).
//
@@ -80,8 +80,8 @@ void Fl_Valuator::handle_drag(double v) {
if (v != value_) {
value_ = v;
value_damage();
set_changed();
if (when() & FL_WHEN_CHANGED) do_callback();
else set_changed();
}
}
@@ -92,8 +92,9 @@ void Fl_Valuator::handle_release() {
// initial position:
clear_changed();
// now do the callback only if slider in new position or always is on:
if (value_ != previous_value_ || when() & FL_WHEN_NOT_CHANGED)
if (value_ != previous_value_ || when() & FL_WHEN_NOT_CHANGED) {
do_callback();
}
}
}
@@ -125,5 +126,5 @@ int Fl_Valuator::format(char* buffer) {
}
//
// End of "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.8 2004/04/11 04:38:58 easysw Exp $".
// End of "$Id: Fl_Valuator.cxx,v 1.5.2.4.2.9 2004/07/27 16:02:21 easysw Exp $".
//
+4 -8
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.9 2004/04/11 04:38:58 easysw Exp $"
// "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.10 2004/07/27 16:02:21 easysw Exp $"
//
// Value input widget for the Fast Light Tool Kit (FLTK).
//
@@ -41,12 +41,8 @@ void Fl_Value_Input::input_cb(Fl_Widget*, void* v) {
else nv = strtol(t.input.value(), 0, 0);
if (nv != t.value() || t.when() & FL_WHEN_NOT_CHANGED) {
t.set_value(nv);
if (t.when()) {
t.clear_changed();
t.do_callback();
} else {
t.set_changed();
}
t.set_changed();
if (t.when()) t.do_callback();
}
}
@@ -131,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.6.2.5.2.9 2004/04/11 04:38:58 easysw Exp $".
// End of "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.10 2004/07/27 16:02:21 easysw Exp $".
//
+3 -2
View File
@@ -1,5 +1,5 @@
//
// "$Id: forms_timer.cxx,v 1.4.2.3.2.6 2004/04/11 04:39:00 easysw Exp $"
// "$Id: forms_timer.cxx,v 1.4.2.3.2.7 2004/07/27 16:02:21 easysw Exp $"
//
// Forms timer object for the Fast Light Tool Kit (FLTK).
//
@@ -111,6 +111,7 @@ void Fl_Timer::step() {
redraw();
Fl::add_timeout(FL_TIMER_BLINKRATE, stepcb, this);
}
set_changed();
do_callback();
} else {
if (type() == FL_VALUE_TIMER) redraw();
@@ -162,5 +163,5 @@ void Fl_Timer::suspended(char d) {
}
//
// End of "$Id: forms_timer.cxx,v 1.4.2.3.2.6 2004/04/11 04:39:00 easysw Exp $".
// End of "$Id: forms_timer.cxx,v 1.4.2.3.2.7 2004/07/27 16:02:21 easysw Exp $".
//