From 72c4d73706267a32bb31d93e14425b1c0c8a5715 Mon Sep 17 00:00:00 2001
From: RevolutionSmythe
Date: Sat, 23 Oct 2010 20:51:07 -0500
Subject: Merges the Message log and Message builder from Inertia in.
---
linden/indra/llui/llscrolllistctrl.cpp | 17 +++++++++++++++++
linden/indra/llui/llscrolllistctrl.h | 11 +++++++++++
2 files changed, 28 insertions(+)
(limited to 'linden/indra/llui')
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp
index 3c2293f..9635f99 100644
--- a/linden/indra/llui/llscrolllistctrl.cpp
+++ b/linden/indra/llui/llscrolllistctrl.cpp
@@ -103,6 +103,10 @@ struct SortScrollListItem
LLScrollListIcon::LLScrollListIcon(LLUIImagePtr icon, S32 width)
: LLScrollListCell(width),
mIcon(icon),
+ //
+ mCallback(NULL),
+ mUserData(NULL),
+ //
mColor(LLColor4::white)
{
}
@@ -145,6 +149,19 @@ void LLScrollListIcon::setValue(const LLSD& value)
}
}
+//
+void LLScrollListIcon::setClickCallback(BOOL (*callback)(void*), void* user_data)
+{
+ mCallback = callback;
+ mUserData = user_data;
+}
+
+BOOL LLScrollListIcon::handleClick()
+{
+ if(mCallback) return mCallback(mUserData);
+ return FALSE;
+}
+//
void LLScrollListIcon::setColor(const LLColor4& color)
{
diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h
index 516e4f1..e875d7a 100644
--- a/linden/indra/llui/llscrolllistctrl.h
+++ b/linden/indra/llui/llscrolllistctrl.h
@@ -163,10 +163,18 @@ public:
virtual void setColor(const LLColor4&);
virtual BOOL isText()const { return FALSE; }
virtual void setValue(const LLSD& value);
+ //
+ void setClickCallback(BOOL (*callback)(void*), void* user_data);
+ virtual BOOL handleClick();
+ //
private:
LLUIImagePtr mIcon;
LLColor4 mColor;
+ //
+ BOOL (*mCallback)(void*);
+ void* mUserData;
+ //
};
/*
@@ -493,6 +501,9 @@ public:
virtual S32 getScrollPos() const;
virtual void setScrollPos( S32 pos );
+ //
+ S32 getPageLines() { return mPageLines; }
+ //
S32 getSearchColumn();
void setSearchColumn(S32 column) { mSearchColumn = column; }
S32 getColumnIndexFromOffset(S32 x);
--
cgit v1.1