summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-09-16 00:41:45 -0700
committerRichard Linden <none@none>2010-09-16 00:41:45 -0700
commitdcebc0114907e9cc1f78b239edc93138a4b5c0e4 (patch)
treed8367a7214ce5f74b16a4d83648c01309d6a5202 /indra/llui
parent8f51615aa7c8cab8137c82e89446928e3632dc74 (diff)
made LLView::getUseBoundingRect() const and used it internally
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llview.cpp16
-rw-r--r--indra/llui/llview.h2
2 files changed, 9 insertions, 9 deletions
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 );
}
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 3504bb6619..6bcee98f26 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -234,7 +234,7 @@ public:
void setSoundFlags(U8 flags) { mSoundFlags = flags; }
void setName(std::string name) { mName = name; }
void setUseBoundingRect( BOOL use_bounding_rect );
- BOOL getUseBoundingRect();
+ BOOL getUseBoundingRect() const;
ECursorType getHoverCursor() { return mHoverCursor; }