summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2007-12-15 16:42:00 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2007-12-15 16:42:00 +0000
commit681e6ae9460864e9dca10aa19495f2f94a326f8d (patch)
tree797ed2bbeca7411ea35fde92154be2359b1c00b1 /src
parentfe1e8a37eeca9a9c6816fe7c71a782bfe9137ff1 (diff)
Add clip_children() method (STR #1844)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Group.cxx5
1 files changed, 5 insertions, 0 deletions
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() {