diff options
author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-06-22 15:02:19 -0700 |
---|---|---|
committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-06-22 15:02:19 -0700 |
commit | baa73fddd9287ddafd2d31551cb253b355ed910a (patch) | |
tree | e3f0986617fe6c0ee0a14df6aac13c6bb6f92507 /indra/llui/llscrollcontainer.cpp | |
parent | dc3833f31b8a20220ddb1775e1625c016c397435 (diff) | |
parent | fcaa1ad46fd1df4cfec9dee12caf6e7b5bf32136 (diff) |
Merge with viewer-2.0.0-3 branch
Diffstat (limited to 'indra/llui/llscrollcontainer.cpp')
-rw-r--r-- | indra/llui/llscrollcontainer.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index dfe3ef29fc..2a2e56a92c 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -63,7 +63,7 @@ static const F32 AUTO_SCROLL_RATE_ACCEL = 120.f; /// Class LLScrollContainer ///---------------------------------------------------------------------------- -static LLRegisterWidget<LLScrollContainer> r("scroll_container"); +static LLDefaultWidgetRegistry::Register<LLScrollContainer> r("scroll_container"); LLScrollContainer::Params::Params() : is_opaque("opaque"), @@ -197,6 +197,15 @@ void LLScrollContainer::reshape(S32 width, S32 height, BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask) { + // allow scrolled view to handle keystrokes in case it delegated keyboard focus + // to the scroll container. + // NOTE: this should not recurse indefinitely as handleKeyHere + // should not propagate to parent controls, so mScrolledView should *not* + // call LLScrollContainer::handleKeyHere in turn + if (mScrolledView->handleKeyHere(key, mask)) + { + return TRUE; + } for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) { if( mScrollbar[i]->handleKeyHere(key, mask) ) @@ -508,6 +517,11 @@ bool LLScrollContainer::addChild(LLView* view, S32 tab_group) return ret_val; } +const widget_registry_t& LLScrollContainer::getChildRegistry() const +{ + // a scroll container can contain any default widget + return LLDefaultWidgetRegistry::instance(); +} void LLScrollContainer::updateScroll() { |