From 681e6ae9460864e9dca10aa19495f2f94a326f8d Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sat, 15 Dec 2007 16:42:00 +0000 Subject: Add clip_children() method (STR #1844) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Group.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx index a9aecf097..f2c2e1e21 100644 --- a/src/Fl_Group.cxx +++ b/src/Fl_Group.cxx @@ -536,6 +536,9 @@ void Fl_Group::resize(int X, int Y, int W, int H) { void Fl_Group::draw_children() { Fl_Widget*const* a = array(); + + if (clip_children()) fl_push_clip(x(), y(), w(), h()); + if (damage() & ~FL_DAMAGE_CHILD) { // redraw the entire thing: for (int i=children_; i--;) { Fl_Widget& o = **a++; @@ -545,6 +548,8 @@ void Fl_Group::draw_children() { } else { // only redraw the children that need it: for (int i=children_; i--;) update_child(**a++); } + + if (clip_children()) fl_pop_clip(); } void Fl_Group::draw() { -- cgit v1.2.3