diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-19 17:53:09 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-19 17:53:09 +0000 |
| commit | 512332670a87377ba6b705232d22a67681fba3ff (patch) | |
| tree | 82b915d0cbcb2cefbe0fe7088dc6e5ad398e9306 /src/Fl_Input_.cxx | |
| parent | 33ee986a7b69e05e1fe110c685747381bba481a9 (diff) | |
Added Gustavo's damage() update - now use symbolic constants for all values!
git-svn-id: file:///fltk/svn/fltk/trunk@18 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Input_.cxx')
| -rw-r--r-- | src/Fl_Input_.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index a04d3cef2..e4dbadf14 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -84,13 +84,13 @@ double Fl_Input_::expandpos( // being erased, so they don't blink. void Fl_Input_::minimal_update(int p) { - if (damage() & 128) return; // don't waste time if it won't be done - if (damage() & 2) { + if (damage() & FL_DAMAGE_ALL) return; // don't waste time if it won't be done + if (damage() & FL_DAMAGE_EXPOSE) { if (p < mu_p) mu_p = p; } else { mu_p = p; } - damage(2); + damage(FL_DAMAGE_EXPOSE); erase_cursor_only = 0; } @@ -110,7 +110,7 @@ void Fl_Input_::setfont() const { void Fl_Input_::drawtext(int X, int Y, int W, int H) { - int do_mu = !(damage()&128); + int do_mu = !(damage()&FL_DAMAGE_ALL); if (Fl::focus()!=this && !size()) { if (do_mu) { // we have to erase it if cursor was there fl_color(color()); @@ -374,7 +374,7 @@ int Fl_Input_::position(int p, int m) { // new position is a cursor if (position_ == mark_) { // old position was just a cursor - if (!(damage()&2)) { + if (!(damage()&FL_DAMAGE_EXPOSE)) { minimal_update(position_); erase_cursor_only = 1; } } else { // old position was a selection @@ -569,7 +569,7 @@ int Fl_Input_::handletext(int event, int X, int Y, int W, int H) { case FL_UNFOCUS: if (mark_ == position_) { - if (!(damage()&2)) {minimal_update(position_); erase_cursor_only = 1;} + if (!(damage()&FL_DAMAGE_EXPOSE)) {minimal_update(position_); erase_cursor_only = 1;} } else if (Fl::selection_owner() != this) { minimal_update(mark_, position_); } |
