diff options
author | angela <angela@lindenlab.com> | 2009-11-24 11:55:12 +0800 |
---|---|---|
committer | angela <angela@lindenlab.com> | 2009-11-24 11:55:12 +0800 |
commit | f27aff450fd394dc53c7160d58df40037d57c774 (patch) | |
tree | 3893fd9aed15b0a3c186d565bc0afb7bdc8247a3 /indra/llui | |
parent | 65fd784f136d4fc2183b97b6c15bd0c338bdb833 (diff) | |
parent | cfccf4d5145274f7bfe1c88b7e51c000461226e8 (diff) |
Automated merge with ssh://angela@hg.lindenlab.com/james/gooey
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llsliderctrl.cpp | 3 | ||||
-rw-r--r-- | indra/llui/llsliderctrl.h | 4 | ||||
-rw-r--r-- | indra/llui/lltexteditor.cpp | 26 |
3 files changed, 24 insertions, 9 deletions
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index a4f89ae1d3..01c274bb4e 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -122,7 +122,8 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p) slider_p.min_value.setIfNotProvided(p.min_value); slider_p.max_value.setIfNotProvided(p.max_value); slider_p.increment.setIfNotProvided(p.increment); - + slider_p.orientation.setIfNotProvided(p.orientation); + slider_p.commit_callback.function(&LLSliderCtrl::onSliderCommit); slider_p.control_name(p.control_name); slider_p.mouse_down_callback( p.mouse_down_callback ); diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h index 4a1574d502..c425849782 100644 --- a/indra/llui/llsliderctrl.h +++ b/indra/llui/llsliderctrl.h @@ -46,6 +46,7 @@ class LLSliderCtrl : public LLF32UICtrl public: struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params> { + Optional<std::string> orientation; Optional<S32> label_width; Optional<S32> text_width; Optional<bool> show_text; @@ -78,7 +79,8 @@ public: value_text("value_text"), slider_label("slider_label"), mouse_down_callback("mouse_down_callback"), - mouse_up_callback("mouse_up_callback") + mouse_up_callback("mouse_up_callback"), + orientation("orientation", std::string ("horizontal")) {} }; protected: diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 224f066968..3f4ef24f82 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -750,8 +750,10 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) { if( mIsSelecting ) { - mScroller->autoScroll(x, y); - + if(mScroller) + { + mScroller->autoScroll(x, y); + } S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight); S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop); setCursorAtLocalPos( clamped_x, clamped_y, true ); @@ -799,7 +801,10 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) { if( mIsSelecting ) { - mScroller->autoScroll(x, y); + if(mScroller) + { + mScroller->autoScroll(x, y); + } S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight); S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop); setCursorAtLocalPos( clamped_x, clamped_y, true ); @@ -1696,7 +1701,15 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) */ if (mReadOnly) { - handled = mScroller->handleKeyHere( key, mask ); + if(mScroller) + { + handled = mScroller->handleKeyHere( key, mask ); + } + else + { + handled = handleNavigationKey( key, mask ); + } + } else { @@ -2135,9 +2148,8 @@ void LLTextEditor::drawPreeditMarker() void LLTextEditor::drawLineNumbers() { LLGLSUIDefault gls_ui; - - LLRect scrolled_view_rect = mScroller->getVisibleContentRect(); - LLRect content_rect = mScroller->getContentWindowRect(); + LLRect scrolled_view_rect = getVisibleDocumentRect(); + LLRect content_rect = getTextRect(); LLLocalClipRect clip(content_rect); S32 first_line = getFirstVisibleLine(); S32 num_lines = getLineCount(); |