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_Tabs.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Fl_Tabs.cxx') diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index 44e2d7ecf..fc9c73a87 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -128,7 +128,7 @@ int Fl_Tabs::handle(int event) { int Fl_Tabs::push(Fl_Widget *o) { if (push_ == o) return 0; - if (push_ && push_ != value_ || o && o != value_) damage(2); + if (push_ && push_ != value_ || o && o != value_) damage(FL_DAMAGE_EXPOSE); push_ = o; return 1; } @@ -164,7 +164,7 @@ enum {LEFT, RIGHT, SELECTED}; void Fl_Tabs::draw() { Fl_Widget *v = value(); int H = tab_height(); - if (damage() & ~3) { // redraw the entire thing: + if (damage() & ~(FL_DAMAGE_EXPOSE|FL_DAMAGE_CHILD)) { // redraw the entire thing: fl_clip(x(), y()+(H>=0?H:0), w(), h()-(H>=0?H:-H)); draw_box(box(), x(), y(), w(), h(), v->color()); fl_pop_clip(); @@ -172,7 +172,7 @@ void Fl_Tabs::draw() { } else { // redraw the child update_child(*v); } - if (damage() & 2) { + if (damage() & (FL_DAMAGE_EXPOSE|FL_DAMAGE_ALL)) { int p[128]; int w[128]; int selected = tab_positions(p,w); int i; -- cgit v1.2.3