summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorrichard <none@none>2009-12-21 18:12:17 -0800
committerrichard <none@none>2009-12-21 18:12:17 -0800
commit18e25641fecd526cd2a2bb074311056101b3456a (patch)
tree3ff89da9566a7f7b602b201d19bda7ff43c99134 /indra/llui/lltextbase.cpp
parente6a8b3e2b2b3a352c674a788d27ac2d5f35983f8 (diff)
parent5b978865e3b09e5b911728cd6381a2a4a7b3a9d3 (diff)
merge
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index cb0907a771..e54032ac5e 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -962,7 +962,10 @@ void LLTextBase::draw()
reflow();
// then update scroll position, as cursor may have moved
- updateScrollFromCursor();
+ if (!mReadOnly)
+ {
+ updateScrollFromCursor();
+ }
LLRect doc_rect;
if (mScroller)
@@ -1932,11 +1935,19 @@ void LLTextBase::endOfLine()
void LLTextBase::startOfDoc()
{
setCursorPos(0);
+ if (mScroller)
+ {
+ mScroller->goToTop();
+ }
}
void LLTextBase::endOfDoc()
{
setCursorPos(getLength());
+ if (mScroller)
+ {
+ mScroller->goToBottom();
+ }
}
void LLTextBase::changePage( S32 delta )
@@ -2001,6 +2012,16 @@ void LLTextBase::changeLine( S32 delta )
setCursorPos(new_cursor_pos, true);
}
+bool LLTextBase::scrolledToStart()
+{
+ return mScroller->isAtTop();
+}
+
+bool LLTextBase::scrolledToEnd()
+{
+ return mScroller->isAtBottom();
+}
+
bool LLTextBase::setCursor(S32 row, S32 column)
{