diff options
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 62 |
1 files changed, 24 insertions, 38 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 4d3708302b..394ec957d5 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -403,40 +403,28 @@ bool LLCompareByTabOrder::operator() (const LLView* const a, const LLView* const return (a_score == b_score) ? a < b : a_score < b_score; } -BOOL LLView::isInVisibleChain() const +bool LLView::trueToRoot(const boost::function<bool (const LLView*)>& predicate) const { - BOOL visible = TRUE; - - const LLView* viewp = this; - while(viewp) + const LLView* cur_view = this; + while(cur_view) { - if (!viewp->getVisible()) + if(!predicate(cur_view)) { - visible = FALSE; - break; + return false; } - viewp = viewp->getParent(); + cur_view = cur_view->getParent(); } - - return visible; + return true; } -BOOL LLView::isInEnabledChain() const +BOOL LLView::isInVisibleChain() const { - BOOL enabled = TRUE; + return trueToRoot(&LLView::getVisible); +} - const LLView* viewp = this; - while(viewp) - { - if (!viewp->getEnabled()) - { - enabled = FALSE; - break; - } - viewp = viewp->getParent(); - } - - return enabled; +BOOL LLView::isInEnabledChain() const +{ + return trueToRoot(&LLView::getEnabled); } // virtual @@ -446,6 +434,17 @@ 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; @@ -2785,19 +2784,6 @@ 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() { |