Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget.cc')
-rw-r--r--src/ui/widget.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/widget.cc b/src/ui/widget.cc
index 15fa10f..cc53c9f 100644
--- a/src/ui/widget.cc
+++ b/src/ui/widget.cc
@@ -47,12 +47,15 @@ void Widget::remove_children()
widget_children.clear();
}
-size_t Widget::list(const size_t indent) const
+size_t Widget::list(const size_t indent, const bool visible_only) const
{
+ if (visible_only && !visible())
+ return 0;
+
print(indent);
size_t n = 1;
for (Children::const_iterator it = widget_children.begin(); it != widget_children.end(); it++) {
- n += (*it)->list(indent+1);
+ n += (*it)->list(indent+1, visible_only);
}
return n;
}