From c20bd2dfee1068d5a23eef9a10d21c2035c0b324 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 16 Aug 2010 15:00:51 -0700 Subject: cleaned up LLUICtrlFactory... removed redundant functionality moved buildPanel to LLPanel --- indra/llui/llview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 4d3708302b..3ee4a85de0 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -1698,7 +1698,9 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const child = getDefaultWidget(name); if (!child) { - child = LLUICtrlFactory::createDefaultWidget(name); + LLView::Params view_params; + view_params.name = name; + child = LLUICtrlFactory::create(view_params); } } return child; -- cgit v1.2.3 From 65c9914d23022df6a39db50ce295750f08695893 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 23 Aug 2010 11:03:19 -0700 Subject: made Params parsers not act as singletons --- indra/llui/llview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 3ee4a85de0..48db873b6f 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -111,8 +111,8 @@ LLView::Params::Params() user_resize("user_resize"), auto_resize("auto_resize"), needs_translate("translate"), - min_width("min_width"), - max_width("max_width"), + min_dim("min_width"), + max_dim("max_width"), xmlns("xmlns"), xmlns_xsi("xmlns:xsi"), xsi_schemaLocation("xsi:schemaLocation"), @@ -120,6 +120,8 @@ LLView::Params::Params() { addSynonym(rect, ""); + addSynonym(min_dim, "min_height"); + addSynonym(max_dim, "max_height"); } LLView::LLView(const LLView::Params& p) -- cgit v1.2.3 From 0daa627db4f1bba2f69ec717426b26593674d14c Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 24 Aug 2010 11:44:28 -0700 Subject: removed LLLayoutStack::fromXML custom xml parsing --- indra/llui/llview.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 48db873b6f..878def07ae 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -108,11 +108,7 @@ LLView::Params::Params() left_pad("left_pad"), left_delta("left_delta", S32_MAX), from_xui("from_xui", false), - user_resize("user_resize"), - auto_resize("auto_resize"), needs_translate("translate"), - min_dim("min_width"), - max_dim("max_width"), xmlns("xmlns"), xmlns_xsi("xmlns:xsi"), xsi_schemaLocation("xsi:schemaLocation"), @@ -120,8 +116,6 @@ LLView::Params::Params() { addSynonym(rect, ""); - addSynonym(min_dim, "min_height"); - addSynonym(max_dim, "max_height"); } LLView::LLView(const LLView::Params& p) -- cgit v1.2.3 From dcebc0114907e9cc1f78b239edc93138a4b5c0e4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 16 Sep 2010 00:41:45 -0700 Subject: made LLView::getUseBoundingRect() const and used it internally --- indra/llui/llview.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index a6f1af9274..3fa86bf0ca 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -214,7 +214,7 @@ void LLView::setUseBoundingRect( BOOL use_bounding_rect ) } } -BOOL LLView::getUseBoundingRect() +BOOL LLView::getUseBoundingRect() const { return mUseBoundingRect; } @@ -1366,12 +1366,12 @@ void LLView::drawDebugRect() // drawing solids requires texturing be disabled gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - if (mUseBoundingRect) + if (getUseBoundingRect()) { LLUI::translate((F32)mBoundingRect.mLeft - (F32)mRect.mLeft, (F32)mBoundingRect.mBottom - (F32)mRect.mBottom, 0.f); } - LLRect debug_rect = mUseBoundingRect ? mBoundingRect : mRect; + LLRect debug_rect = getUseBoundingRect() ? mBoundingRect : mRect; // draw red rectangle for the border LLColor4 border_color(0.25f, 0.25f, 0.25f, 1.f); @@ -1569,7 +1569,7 @@ void LLView::updateBoundingRect() LLRect cur_rect = mBoundingRect; - if (mUseBoundingRect) + if (getUseBoundingRect()) { mBoundingRect = calcBoundingRect(); } @@ -1579,7 +1579,7 @@ void LLView::updateBoundingRect() } // give parent view a chance to resize, in case we just moved, for example - if (getParent() && getParent()->mUseBoundingRect) + if (getParent() && getParent()->getUseBoundingRect()) { getParent()->updateBoundingRect(); } @@ -1603,7 +1603,7 @@ LLRect LLView::calcScreenBoundingRect() const { LLRect screen_rect; // get bounding rect, if used - LLRect bounding_rect = mUseBoundingRect ? mBoundingRect : mRect; + LLRect bounding_rect = getUseBoundingRect() ? mBoundingRect : mRect; // convert to local coordinates, as defined by mRect bounding_rect.translate(-mRect.mLeft, -mRect.mBottom); @@ -1734,14 +1734,14 @@ LLView* LLView::findChildView(const std::string& name, BOOL recurse) const BOOL LLView::parentPointInView(S32 x, S32 y, EHitTestType type) const { - return (mUseBoundingRect && type == HIT_TEST_USE_BOUNDING_RECT) + return (getUseBoundingRect() && type == HIT_TEST_USE_BOUNDING_RECT) ? mBoundingRect.pointInRect( x, y ) : mRect.pointInRect( x, y ); } BOOL LLView::pointInView(S32 x, S32 y, EHitTestType type) const { - return (mUseBoundingRect && type == HIT_TEST_USE_BOUNDING_RECT) + return (getUseBoundingRect() && type == HIT_TEST_USE_BOUNDING_RECT) ? mBoundingRect.pointInRect( x + mRect.mLeft, y + mRect.mBottom ) : mRect.localPointInRect( x, y ); } -- cgit v1.2.3