From 512332670a87377ba6b705232d22a67681fba3ff Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 19 Oct 1998 17:53:09 +0000 Subject: 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 --- src/Fl_Pack.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Fl_Pack.cxx') diff --git a/src/Fl_Pack.cxx b/src/Fl_Pack.cxx index c236f29c6..551755a7d 100644 --- a/src/Fl_Pack.cxx +++ b/src/Fl_Pack.cxx @@ -40,7 +40,7 @@ void Fl_Pack::draw() { H = o->h(); } if (spacing_ && current_position>maximum_position && - (X != o->x() || Y != o->y() || d&128)) { + (X != o->x() || Y != o->y() || d&FL_DAMAGE_ALL)) { fl_color(color()); if (horizontal()) fl_rectf(maximum_position, ty, spacing_, th); @@ -49,9 +49,9 @@ void Fl_Pack::draw() { } if (X != o->x() || Y != o->y() || W != o->w() || H != o->h()) { o->resize(X,Y,W,H); - o->clear_damage(~0); + o->clear_damage(FL_DAMAGE_ALL); } - if (d&128) draw_child(*o); else update_child(*o); + if (d&FL_DAMAGE_ALL) draw_child(*o); else update_child(*o); // child's draw() can change it's size, so use new size: current_position += (horizontal() ? o->w() : o->h()); if (current_position > maximum_position) @@ -73,6 +73,6 @@ void Fl_Pack::draw() { } tw += Fl::box_dw(box()); if (tw <= 0) tw = 1; th += Fl::box_dh(box()); if (th <= 0) th = 1; - if (tw != w() || th != h()) {Fl_Widget::resize(x(),y(),tw,th); d = 128;} - if (d&128) draw_box(); + if (tw != w() || th != h()) {Fl_Widget::resize(x(),y(),tw,th); d = FL_DAMAGE_ALL;} + if (d&FL_DAMAGE_ALL) draw_box(); } -- cgit v1.2.3