diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:44:39 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-24 18:44:39 +0100 |
commit | 98cc2365034a93c69704daa69efb389799cc9627 (patch) | |
tree | 4c3ec75b78a26a736f18a2153af025040ae05a4b /indra/llui/llview.cpp | |
parent | 6ba23344c95157793af9e4154933ae8df61630e8 (diff) |
Backed out changeset a62bf7c0af21
Backing out this merge that I pushed (prematurely) to the wrong place.
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 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<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 @@ -440,6 +428,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; @@ -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() { |