summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-09-02 02:59:07 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-09-02 02:59:07 +0000
commit5612f13dc8693d89cb5c89f8b1a15115742fba8d (patch)
tree51e9fb2dcf50ad701deee378e6a146aa0ba600a5 /indra/llui
parent1a5cb4fbfb718a6740bdee0442efbb3ae2897b9b (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1516 https://svn.aws.productengine.com/secondlife/pe/stable-2@1526 -> viewer-2.0.0-3
* Bugs: EXT-622 EXT-702 EXT-626 EXT-638 EXT-600 EXT-543 EXT-656 EXT-801 * New Dev: EXT-282 EXT-782 EXT-694 EXT-797 EXT-798 EXT-799 EXT-453
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/CMakeLists.txt2
-rw-r--r--indra/llui/llscrollcontainer.cpp3
-rw-r--r--indra/llui/lluictrl.cpp7
-rw-r--r--indra/llui/lluictrl.h5
-rw-r--r--indra/llui/llview.cpp14
-rw-r--r--indra/llui/llview.h3
6 files changed, 34 insertions, 0 deletions
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 8b0fcc68c4..a7f899ce41 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -48,6 +48,7 @@ set(llui_SOURCE_FILES
lllayoutstack.cpp
lllineeditor.cpp
lllink.cpp
+ lllistctrl.cpp
llmenugl.cpp
llmodaldialog.cpp
llmultifloater.cpp
@@ -124,6 +125,7 @@ set(llui_HEADER_FILES
lllazyvalue.h
lllineeditor.h
lllink.h
+ lllistctrl.h
llmenugl.h
llmodaldialog.h
llmultifloater.h
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 13f862f3af..556ff80991 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -66,9 +66,12 @@ static LLDefaultChildRegistry::Register<LLScrollContainer> r("scroll_container")
#include "llscrollingpanellist.h"
#include "llcontainerview.h"
#include "llpanel.h"
+#include "lllistctrl.h"
+
static ScrollContainerRegistry::Register<LLScrollingPanelList> r1("scrolling_panel_list");
static ScrollContainerRegistry::Register<LLContainerView> r2("container_view");
static ScrollContainerRegistry::Register<LLPanel> r3("panel", &LLPanel::fromXML);
+static ScrollContainerRegistry::Register<LLListCtrl> r4("list");
LLScrollContainer::Params::Params()
: is_opaque("opaque"),
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 7ff942268d..1ab04054ff 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -257,6 +257,13 @@ BOOL LLUICtrl::handleRightMouseUp(S32 x, S32 y, MASK mask)
return handled;
}
+BOOL LLUICtrl::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = LLView::handleDoubleClick(x, y, mask);
+ mDoubleClickSignal(this, x, y, mask);
+ return handled;
+}
+
// can't tab to children of a non-tab-stop widget
BOOL LLUICtrl::canFocusChildren() const
{
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index 3e2e1f41a1..5011adcfe9 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -166,6 +166,7 @@ public:
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
// From LLFocusableElement
/*virtual*/ void setFocus( BOOL b );
@@ -239,6 +240,8 @@ public:
boost::signals2::connection setRightMouseDownCallback( const mouse_signal_t::slot_type& cb ) { return mRightMouseDownSignal.connect(cb); }
boost::signals2::connection setRightMouseUpCallback( const mouse_signal_t::slot_type& cb ) { return mRightMouseUpSignal.connect(cb); }
+ boost::signals2::connection setDoubleClickCallback( const mouse_signal_t::slot_type& cb ) { return mDoubleClickSignal.connect(cb); }
+
// *TODO: Deprecate; for backwards compatability only:
boost::signals2::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data);
boost::signals2::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb );
@@ -273,6 +276,8 @@ protected:
mouse_signal_t mMouseUpSignal;
mouse_signal_t mRightMouseDownSignal;
mouse_signal_t mRightMouseUpSignal;
+
+ mouse_signal_t mDoubleClickSignal;
LLViewModelPtr mViewModel;
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 4770807ac7..83d45f0dfa 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -2735,3 +2735,17 @@ LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const
}
return *mDefaultWidgets;
}
+void LLView::notifyParent(const LLSD& info)
+{
+ LLView* parent = getParent();
+ if(parent)
+ parent->notifyParent(info);
+}
+void LLView::notifyChilds(const LLSD& info)
+{
+ for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
+ {
+ (*child_it)->notifyChilds(info);
+ }
+}
+
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index ecc6bf47da..87298b5292 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -549,6 +549,9 @@ public:
virtual void handleReshape(const LLRect& rect, bool by_user);
+ virtual void notifyParent(const LLSD& info);
+ virtual void notifyChilds(const LLSD& info);
+
protected:
void drawDebugRect();
void drawChild(LLView* childp, S32 x_offset = 0, S32 y_offset = 0, BOOL force_draw = FALSE);