summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp62
1 files changed, 38 insertions, 24 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 394ec957d5..4d3708302b 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -403,28 +403,40 @@ bool LLCompareByTabOrder::operator() (const LLView* const a, const LLView* const
return (a_score == b_score) ? a < b : a_score < b_score;
}
-bool LLView::trueToRoot(const boost::function<bool (const LLView*)>& predicate) const
+BOOL LLView::isInVisibleChain() const
{
- const LLView* cur_view = this;
- while(cur_view)
+ BOOL visible = TRUE;
+
+ const LLView* viewp = this;
+ while(viewp)
{
- if(!predicate(cur_view))
+ if (!viewp->getVisible())
{
- return false;
+ visible = FALSE;
+ break;
}
- cur_view = cur_view->getParent();
+ viewp = viewp->getParent();
}
- return true;
-}
-
-BOOL LLView::isInVisibleChain() const
-{
- return trueToRoot(&LLView::getVisible);
+
+ return visible;
}
BOOL LLView::isInEnabledChain() const
{
- return trueToRoot(&LLView::getEnabled);
+ BOOL enabled = TRUE;
+
+ const LLView* viewp = this;
+ while(viewp)
+ {
+ if (!viewp->getEnabled())
+ {
+ enabled = FALSE;
+ break;
+ }
+ viewp = viewp->getParent();
+ }
+
+ return enabled;
}
// virtual
@@ -434,17 +446,6 @@ BOOL LLView::canFocusChildren() const
}
//virtual
-void LLView::setTentative(BOOL b)
-{
-}
-
-//virtual
-BOOL LLView::getTentative() const
-{
- return FALSE;
-}
-
-//virtual
void LLView::setEnabled(BOOL enabled)
{
mEnabled = enabled;
@@ -2784,6 +2785,19 @@ LLView::tree_post_iterator_t LLView::endTreeDFSPost()
return tree_post_iterator_t();
}
+LLView::bfs_tree_iterator_t LLView::beginTreeBFS()
+{
+ return bfs_tree_iterator_t(this,
+ boost::bind(boost::mem_fn(&LLView::beginChild), _1),
+ boost::bind(boost::mem_fn(&LLView::endChild), _1));
+}
+
+LLView::bfs_tree_iterator_t LLView::endTreeBFS()
+{
+ // an empty iterator is an "end" iterator
+ return bfs_tree_iterator_t();
+}
+
LLView::root_to_view_iterator_t LLView::beginRootToView()
{