From 98cc2365034a93c69704daa69efb389799cc9627 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Aug 2010 18:44:39 +0100 Subject: Backed out changeset a62bf7c0af21 Backing out this merge that I pushed (prematurely) to the wrong place. --- indra/llui/llview.cpp | 62 ++++++++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 38 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index fe5ef269a9..42ce7b84fe 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -397,40 +397,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& 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 @@ -439,6 +427,17 @@ BOOL LLView::canFocusChildren() const return TRUE; } +//virtual +void LLView::setTentative(BOOL b) +{ +} + +//virtual +BOOL LLView::getTentative() const +{ + return FALSE; +} + //virtual void LLView::setEnabled(BOOL enabled) { @@ -2779,19 +2778,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() { -- cgit v1.2.3