aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llscrollcontainer.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llui/llscrollcontainer.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llui/llscrollcontainer.cpp')
-rw-r--r--linden/indra/llui/llscrollcontainer.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/linden/indra/llui/llscrollcontainer.cpp b/linden/indra/llui/llscrollcontainer.cpp
index 1217a58..1ba2923 100644
--- a/linden/indra/llui/llscrollcontainer.cpp
+++ b/linden/indra/llui/llscrollcontainer.cpp
@@ -32,9 +32,7 @@
32 32
33#include "linden_common.h" 33#include "linden_common.h"
34 34
35#include "llgl.h"
36#include "llrender.h" 35#include "llrender.h"
37
38#include "llscrollcontainer.h" 36#include "llscrollcontainer.h"
39#include "llscrollbar.h" 37#include "llscrollbar.h"
40#include "llui.h" 38#include "llui.h"
@@ -45,8 +43,6 @@
45#include "lluictrlfactory.h" 43#include "lluictrlfactory.h"
46#include "llfontgl.h" 44#include "llfontgl.h"
47 45
48#include "llglheaders.h"
49
50///---------------------------------------------------------------------------- 46///----------------------------------------------------------------------------
51/// Local function declarations, constants, enums, and typedefs 47/// Local function declarations, constants, enums, and typedefs
52///---------------------------------------------------------------------------- 48///----------------------------------------------------------------------------
@@ -64,7 +60,7 @@ static const F32 AUTO_SCROLL_RATE_ACCEL = 120.f;
64static LLRegisterWidget<LLScrollableContainerView> r("scroll_container"); 60static LLRegisterWidget<LLScrollableContainerView> r("scroll_container");
65 61
66// Default constructor 62// Default constructor
67LLScrollableContainerView::LLScrollableContainerView( const LLString& name, 63LLScrollableContainerView::LLScrollableContainerView( const std::string& name,
68 const LLRect& rect, 64 const LLRect& rect,
69 LLView* scrolled_view, 65 LLView* scrolled_view,
70 BOOL is_opaque, 66 BOOL is_opaque,
@@ -86,7 +82,7 @@ LLScrollableContainerView::LLScrollableContainerView( const LLString& name,
86} 82}
87 83
88// LLUICtrl constructor 84// LLUICtrl constructor
89LLScrollableContainerView::LLScrollableContainerView( const LLString& name, const LLRect& rect, 85LLScrollableContainerView::LLScrollableContainerView( const std::string& name, const LLRect& rect,
90 LLUICtrl* scrolled_ctrl, BOOL is_opaque, 86 LLUICtrl* scrolled_ctrl, BOOL is_opaque,
91 const LLColor4& bg_color) : 87 const LLColor4& bg_color) :
92 LLUICtrl( name, rect, FALSE, NULL, NULL ), 88 LLUICtrl( name, rect, FALSE, NULL, NULL ),
@@ -108,7 +104,7 @@ LLScrollableContainerView::LLScrollableContainerView( const LLString& name, cons
108void LLScrollableContainerView::init() 104void LLScrollableContainerView::init()
109{ 105{
110 LLRect border_rect( 0, getRect().getHeight(), getRect().getWidth(), 0 ); 106 LLRect border_rect( 0, getRect().getHeight(), getRect().getWidth(), 0 );
111 mBorder = new LLViewBorder( "scroll border", border_rect, LLViewBorder::BEVEL_IN ); 107 mBorder = new LLViewBorder( std::string("scroll border"), border_rect, LLViewBorder::BEVEL_IN );
112 addChild( mBorder ); 108 addChild( mBorder );
113 109
114 mInnerRect.set( 0, getRect().getHeight(), getRect().getWidth(), 0 ); 110 mInnerRect.set( 0, getRect().getHeight(), getRect().getWidth(), 0 );
@@ -116,7 +112,7 @@ void LLScrollableContainerView::init()
116 112
117 LLRect vertical_scroll_rect = mInnerRect; 113 LLRect vertical_scroll_rect = mInnerRect;
118 vertical_scroll_rect.mLeft = vertical_scroll_rect.mRight - SCROLLBAR_SIZE; 114 vertical_scroll_rect.mLeft = vertical_scroll_rect.mRight - SCROLLBAR_SIZE;
119 mScrollbar[VERTICAL] = new LLScrollbar( "scrollable vertical", 115 mScrollbar[VERTICAL] = new LLScrollbar( std::string("scrollable vertical"),
120 vertical_scroll_rect, 116 vertical_scroll_rect,
121 LLScrollbar::VERTICAL, 117 LLScrollbar::VERTICAL,
122 mInnerRect.getHeight(), 118 mInnerRect.getHeight(),
@@ -132,7 +128,7 @@ void LLScrollableContainerView::init()
132 128
133 LLRect horizontal_scroll_rect = mInnerRect; 129 LLRect horizontal_scroll_rect = mInnerRect;
134 horizontal_scroll_rect.mTop = horizontal_scroll_rect.mBottom + SCROLLBAR_SIZE; 130 horizontal_scroll_rect.mTop = horizontal_scroll_rect.mBottom + SCROLLBAR_SIZE;
135 mScrollbar[HORIZONTAL] = new LLScrollbar( "scrollable horizontal", 131 mScrollbar[HORIZONTAL] = new LLScrollbar( std::string("scrollable horizontal"),
136 horizontal_scroll_rect, 132 horizontal_scroll_rect,
137 LLScrollbar::HORIZONTAL, 133 LLScrollbar::HORIZONTAL,
138 mInnerRect.getWidth(), 134 mInnerRect.getWidth(),
@@ -268,7 +264,7 @@ BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask,
268 EDragAndDropType cargo_type, 264 EDragAndDropType cargo_type,
269 void* cargo_data, 265 void* cargo_data,
270 EAcceptance* accept, 266 EAcceptance* accept,
271 LLString& tooltip_msg) 267 std::string& tooltip_msg)
272{ 268{
273 // Scroll folder view if needed. Never accepts a drag or drop. 269 // Scroll folder view if needed. Never accepts a drag or drop.
274 *accept = ACCEPT_NO; 270 *accept = ACCEPT_NO;
@@ -340,7 +336,7 @@ BOOL LLScrollableContainerView::handleDragAndDrop(S32 x, S32 y, MASK mask,
340} 336}
341 337
342 338
343BOOL LLScrollableContainerView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect) 339BOOL LLScrollableContainerView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect)
344{ 340{
345 S32 local_x, local_y; 341 S32 local_x, local_y;
346 for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) 342 for( S32 i = 0; i < SCROLLBAR_COUNT; i++ )
@@ -704,7 +700,7 @@ LLXMLNodePtr LLScrollableContainerView::getXML(bool save_children) const
704 700
705LLView* LLScrollableContainerView::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) 701LLView* LLScrollableContainerView::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
706{ 702{
707 LLString name("scroll_container"); 703 std::string name("scroll_container");
708 node->getAttributeString("name", name); 704 node->getAttributeString("name", name);
709 705
710 LLRect rect; 706 LLRect rect;
@@ -742,7 +738,7 @@ LLView* LLScrollableContainerView::fromXML(LLXMLNodePtr node, LLView *parent, LL
742 738
743 if (panelp == NULL) 739 if (panelp == NULL)
744 { 740 {
745 panelp = new LLPanel("dummy", LLRect::null, FALSE); 741 panelp = new LLPanel(std::string("dummy"), LLRect::null, FALSE);
746 } 742 }
747 743
748 ret->mScrolledView = panelp; 744 ret->mScrolledView = panelp;