summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-05-08 21:08:08 +0000
committerNat Goodspeed <nat@lindenlab.com>2009-05-08 21:08:08 +0000
commit3800c0df910c83e987184d541b868168fc2b5bec (patch)
tree91bcf4e13972ae02b9d6500c1d14de7bb8d37dc4 /indra/llui
parent5da967dc744f35d5270c7cb0b8b23b993ecda3e1 (diff)
svn merge -r114679:114681 svn+ssh://svn.lindenlab.com/svn/linden/branches/event-system/event-system-7 svn+ssh://svn.lindenlab.com/svn/linden/branches/event-system/event-system-8
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llbutton.cpp16
-rw-r--r--indra/llui/llbutton.h16
-rw-r--r--indra/llui/llmenugl.cpp2
-rw-r--r--indra/llui/llmenugl.h8
-rw-r--r--indra/llui/llmultislider.h4
-rw-r--r--indra/llui/llmultisliderctrl.cpp4
-rw-r--r--indra/llui/llmultisliderctrl.h4
-rw-r--r--indra/llui/llnotifications.cpp23
-rw-r--r--indra/llui/llnotifications.h87
-rw-r--r--indra/llui/llslider.h4
-rw-r--r--indra/llui/llsliderctrl.cpp4
-rw-r--r--indra/llui/llsliderctrl.h4
-rw-r--r--indra/llui/llui.h4
-rw-r--r--indra/llui/lluictrl.cpp4
-rw-r--r--indra/llui/lluictrl.h18
-rw-r--r--indra/llui/llview.cpp2
16 files changed, 96 insertions, 108 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 1f6cd6ddf9..cdd364797c 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -240,37 +240,37 @@ void LLButton::onCommit()
LLUICtrl::onCommit();
}
-boost::signals::connection LLButton::setClickedCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLButton::setClickedCallback( const commit_signal_t::slot_type& cb )
{
return mCommitSignal.connect(cb);
}
-boost::signals::connection LLButton::setMouseDownCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLButton::setMouseDownCallback( const commit_signal_t::slot_type& cb )
{
return mMouseDownSignal.connect(cb);
}
-boost::signals::connection LLButton::setMouseUpCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLButton::setMouseUpCallback( const commit_signal_t::slot_type& cb )
{
return mMouseUpSignal.connect(cb);
}
-boost::signals::connection LLButton::setHeldDownCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLButton::setHeldDownCallback( const commit_signal_t::slot_type& cb )
{
return mHeldDownSignal.connect(cb);
}
// *TODO: Deprecate (for backwards compatability only)
-boost::signals::connection LLButton::setClickedCallback( button_callback_t cb, void* data )
+boost::signals2::connection LLButton::setClickedCallback( button_callback_t cb, void* data )
{
return setClickedCallback(boost::bind(cb, data));
}
-boost::signals::connection LLButton::setMouseDownCallback( button_callback_t cb, void* data )
+boost::signals2::connection LLButton::setMouseDownCallback( button_callback_t cb, void* data )
{
return setMouseDownCallback(boost::bind(cb, data));
}
-boost::signals::connection LLButton::setMouseUpCallback( button_callback_t cb, void* data )
+boost::signals2::connection LLButton::setMouseUpCallback( button_callback_t cb, void* data )
{
return setMouseUpCallback(boost::bind(cb, data));
}
-boost::signals::connection LLButton::setHeldDownCallback( button_callback_t cb, void* data )
+boost::signals2::connection LLButton::setHeldDownCallback( button_callback_t cb, void* data )
{
return setHeldDownCallback(boost::bind(cb, data));
}
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index f146ef9dc2..99f4b94805 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -150,17 +150,17 @@ public:
void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; }
void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; }
- boost::signals::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button
- boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
- boost::signals::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON
+ boost::signals2::connection setClickedCallback( const commit_signal_t::slot_type& cb ); // mouse down and up within button
+ boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb );
+ boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); // mouse up, EVEN IF NOT IN BUTTON
// Passes a 'count' parameter in the commit param payload, i.e. param["count"])
- boost::signals::connection setHeldDownCallback( const commit_signal_t::slot_type& cb ); // Mouse button held down and in button
+ boost::signals2::connection setHeldDownCallback( const commit_signal_t::slot_type& cb ); // Mouse button held down and in button
// *TODO: Deprecate (for backwards compatability only)
- boost::signals::connection setClickedCallback( button_callback_t cb, void* data );
- boost::signals::connection setMouseDownCallback( button_callback_t cb, void* data );
- boost::signals::connection setMouseUpCallback( button_callback_t cb, void* data );
- boost::signals::connection setHeldDownCallback( button_callback_t cb, void* data );
+ boost::signals2::connection setClickedCallback( button_callback_t cb, void* data );
+ boost::signals2::connection setMouseDownCallback( button_callback_t cb, void* data );
+ boost::signals2::connection setMouseUpCallback( button_callback_t cb, void* data );
+ boost::signals2::connection setHeldDownCallback( button_callback_t cb, void* data );
void setHeldDownDelay( F32 seconds, S32 frames = 0) { mHeldDownDelay = seconds; mHeldDownFrameDelay = frames; }
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index a3588d9dae..fc2e6e163b 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -65,6 +65,8 @@
#include <set>
#include <boost/tokenizer.hpp>
+using namespace LLOldEvents;
+
// static
LLMenuHolderGL *LLMenuGL::sMenuContainer = NULL;
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 3cb76efce0..ffaecc2c15 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -285,12 +285,12 @@ public:
//virtual void draw();
- boost::signals::connection setClickCallback( const commit_signal_t::slot_type& cb )
+ boost::signals2::connection setClickCallback( const commit_signal_t::slot_type& cb )
{
return setCommitCallback(cb);
}
- boost::signals::connection setEnableCallback( const enable_signal_t::slot_type& cb )
+ boost::signals2::connection setEnableCallback( const enable_signal_t::slot_type& cb )
{
return mEnableSignal.connect(cb);
}
@@ -335,7 +335,7 @@ public:
// called to rebuild the draw label
virtual void buildDrawLabel( void );
- boost::signals::connection setCheckCallback( const enable_signal_t::slot_type& cb )
+ boost::signals2::connection setCheckCallback( const enable_signal_t::slot_type& cb )
{
return mCheckSignal.connect(cb);
}
@@ -823,7 +823,7 @@ private:
// *TODO: Eliminate
// For backwards compatability only; generally just use boost::bind
-class view_listener_t : public boost::signals::trackable
+class view_listener_t : public boost::signals2::trackable
{
public:
virtual bool handleEvent(const LLSD& userdata) = 0;
diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h
index 9c01b528a7..89d44eaa87 100644
--- a/indra/llui/llmultislider.h
+++ b/indra/llui/llmultislider.h
@@ -78,8 +78,8 @@ public:
/*virtual*/ void setValue(const LLSD& value);
/*virtual*/ LLSD getValue() const { return mValue; }
- boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
- boost::signals::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ) { return mMouseUpSignal.connect(cb); }
+ boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
+ boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ) { return mMouseUpSignal.connect(cb); }
bool findUnusedValue(F32& initVal);
const std::string& addSlider();
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index 14584e6df5..bc981a9b57 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -460,12 +460,12 @@ void LLMultiSliderCtrl::setPrecision(S32 precision)
updateText();
}
-boost::signals::connection LLMultiSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLMultiSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
{
return mMultiSlider->setMouseDownCallback( cb );
}
-boost::signals::connection LLMultiSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLMultiSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
{
return mMultiSlider->setMouseUpCallback( cb );
}
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index 85ba77b7df..4855ed4926 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -115,8 +115,8 @@ public:
void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; }
void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; }
- boost::signals::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
- boost::signals::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
+ boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
+ boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
virtual void onTabInto();
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 34ff21268e..569112aef1 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -685,7 +685,7 @@ std::string LLNotification::getURL() const
// =========================================================
// LLNotificationChannel implementation
// ---
-void LLNotificationChannelBase::connectChanged(const LLStandardSignal::slot_type& slot)
+LLBoundListener LLNotificationChannelBase::connectChangedImpl(const LLEventListener& slot)
{
// when someone wants to connect to a channel, we first throw them
// all of the notifications that are already in the channel
@@ -693,23 +693,23 @@ void LLNotificationChannelBase::connectChanged(const LLStandardSignal::slot_type
// only about new notifications
for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
{
- slot.get_slot_function()(LLSD().insert("sigtype", "load").insert("id", (*it)->id()));
+ slot(LLSD().insert("sigtype", "load").insert("id", (*it)->id()));
}
// and then connect the signal so that all future notifications will also be
// forwarded.
- mChanged.connect(slot);
+ return mChanged.connect(slot);
}
-void LLNotificationChannelBase::connectPassedFilter(const LLStandardSignal::slot_type& slot)
+LLBoundListener LLNotificationChannelBase::connectPassedFilterImpl(const LLEventListener& slot)
{
// these two filters only fire for notifications added after the current one, because
// they don't participate in the hierarchy.
- mPassedFilter.connect(slot);
+ return mPassedFilter.connect(slot);
}
-void LLNotificationChannelBase::connectFailedFilter(const LLStandardSignal::slot_type& slot)
+LLBoundListener LLNotificationChannelBase::connectFailedFilterImpl(const LLEventListener& slot)
{
- mFailedFilter.connect(slot);
+ return mFailedFilter.connect(slot);
}
// external call, conforms to our standard signature
@@ -867,8 +867,7 @@ mParent(parent)
else
{
LLNotificationChannelPtr p = LLNotifications::instance().getChannel(parent);
- LLStandardSignal::slot_type f = boost::bind(&LLNotificationChannelBase::updateItem, this, _1);
- p->connectChanged(f);
+ p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1));
}
}
@@ -1065,11 +1064,11 @@ void LLNotifications::createDefaultChannels()
// connect action methods to these channels
LLNotifications::instance().getChannel("Expiration")->
- connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1));
+ connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1));
LLNotifications::instance().getChannel("Unique")->
- connectChanged(boost::bind(&LLNotifications::uniqueHandler, this, _1));
+ connectChanged(boost::bind(&LLNotifications::uniqueHandler, this, _1));
LLNotifications::instance().getChannel("Unique")->
- connectFailedFilter(boost::bind(&LLNotifications::failedUniquenessTest, this, _1));
+ connectFailedFilter(boost::bind(&LLNotifications::failedUniquenessTest, this, _1));
LLNotifications::instance().getChannel("Ignore")->
connectFailedFilter(&handleIgnoredNotification);
}
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index de86f5daa2..5c8d146e0c 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -91,13 +91,14 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
-#include <boost/signal.hpp>
+#include <boost/enable_shared_from_this.hpp>
#include <boost/type_traits.hpp>
// we want to minimize external dependencies, but this one is important
#include "llsd.h"
// and we need this to manage the notification callbacks
+#include "llevents.h"
#include "llfunctorregistry.h"
#include "llui.h"
#include "llmemory.h"
@@ -105,36 +106,6 @@
class LLNotification;
typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
-/*****************************************************************************
-* Signal and handler declarations
-* Using a single handler signature means that we can have a common handler
-* type, rather than needing a distinct one for each different handler.
-*****************************************************************************/
-
-/**
- * A boost::signals Combiner that stops the first time a handler returns true
- * We need this because we want to have our handlers return bool, so that
- * we have the option to cause a handler to stop further processing. The
- * default handler fails when the signal returns a value but has no slots.
- */
-struct LLStopWhenHandled
-{
- typedef bool result_type;
-
- template<typename InputIterator>
- result_type operator()(InputIterator first, InputIterator last) const
- {
- for (InputIterator si = first; si != last; ++si)
- {
- if (*si)
- {
- return true;
- }
- }
- return false;
- }
-};
-
typedef enum e_notification_priority
{
@@ -145,27 +116,11 @@ typedef enum e_notification_priority
NOTIFICATION_PRIORITY_CRITICAL
} ENotificationPriority;
-/**
- * We want to have a standard signature for all signals; this way,
- * we can easily document a protocol for communicating across
- * dlls and into scripting languages someday.
- * we want to return a bool to indicate whether the signal has been
- * handled and should NOT be passed on to other listeners.
- * Return true to stop further handling of the signal, and false
- * to continue.
- * We take an LLSD because this way the contents of the signal
- * are independent of the API used to communicate it.
- * It is const ref because then there's low cost to pass it;
- * if you only need to inspect it, it's very cheap.
- */
-
typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder;
typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
-typedef boost::signal<bool(const LLSD&), LLStopWhenHandled> LLStandardSignal;
-
// context data that can be looked up via a notification's payload by the display logic
// derive from this class to implement specific contexts
class LLNotificationContext : public LLInstanceTracker<LLNotificationContext, LLUUID>
@@ -713,7 +668,7 @@ typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap;
// all of the built-in tests should attach to the "Visible" channel
//
class LLNotificationChannelBase :
- public boost::signals::trackable
+ public LLEventTrackable
{
LOG_CLASS(LLNotificationChannelBase);
public:
@@ -723,15 +678,45 @@ public:
virtual ~LLNotificationChannelBase() {}
// you can also connect to a Channel, so you can be notified of
// changes to this channel
- virtual void connectChanged(const LLStandardSignal::slot_type& slot);
- virtual void connectPassedFilter(const LLStandardSignal::slot_type& slot);
- virtual void connectFailedFilter(const LLStandardSignal::slot_type& slot);
+ template <typename LISTENER>
+ LLBoundListener connectChanged(const LISTENER& slot)
+ {
+ // Examine slot to see if it binds an LLEventTrackable subclass, or a
+ // boost::shared_ptr to something, or a boost::weak_ptr to something.
+ // Call this->connectChangedImpl() to actually connect it.
+ return LLEventDetail::visit_and_connect(slot,
+ boost::bind(&LLNotificationChannelBase::connectChangedImpl,
+ this,
+ _1));
+ }
+ template <typename LISTENER>
+ LLBoundListener connectPassedFilter(const LISTENER& slot)
+ {
+ // see comments in connectChanged()
+ return LLEventDetail::visit_and_connect(slot,
+ boost::bind(&LLNotificationChannelBase::connectPassedFilterImpl,
+ this,
+ _1));
+ }
+ template <typename LISTENER>
+ LLBoundListener connectFailedFilter(const LISTENER& slot)
+ {
+ // see comments in connectChanged()
+ return LLEventDetail::visit_and_connect(slot,
+ boost::bind(&LLNotificationChannelBase::connectFailedFilterImpl,
+ this,
+ _1));
+ }
// use this when items change or to add a new one
bool updateItem(const LLSD& payload);
const LLNotificationFilter& getFilter() { return mFilter; }
protected:
+ LLBoundListener connectChangedImpl(const LLEventListener& slot);
+ LLBoundListener connectPassedFilterImpl(const LLEventListener& slot);
+ LLBoundListener connectFailedFilterImpl(const LLEventListener& slot);
+
LLNotificationSet mItems;
LLStandardSignal mChanged;
LLStandardSignal mPassedFilter;
diff --git a/indra/llui/llslider.h b/indra/llui/llslider.h
index 39c55afd8c..dad65fcce0 100644
--- a/indra/llui/llslider.h
+++ b/indra/llui/llslider.h
@@ -67,8 +67,8 @@ public:
virtual void setMinValue(F32 min_value) { LLF32UICtrl::setMinValue(min_value); updateThumbRect(); }
virtual void setMaxValue(F32 max_value) { LLF32UICtrl::setMaxValue(max_value); updateThumbRect(); }
- boost::signals::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
- boost::signals::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ) { return mMouseUpSignal.connect(cb); }
+ boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ) { return mMouseDownSignal.connect(cb); }
+ boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ) { return mMouseUpSignal.connect(cb); }
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index d5053478a6..2c8aed6196 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -375,12 +375,12 @@ void LLSliderCtrl::setPrecision(S32 precision)
updateText();
}
-boost::signals::connection LLSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLSliderCtrl::setSliderMouseDownCallback( const commit_signal_t::slot_type& cb )
{
return mSlider->setMouseDownCallback( cb );
}
-boost::signals::connection LLSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
+boost::signals2::connection LLSliderCtrl::setSliderMouseUpCallback( const commit_signal_t::slot_type& cb )
{
return mSlider->setMouseUpCallback( cb );
}
diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h
index 0bcb1ccc9b..5bdbbfcbcc 100644
--- a/indra/llui/llsliderctrl.h
+++ b/indra/llui/llsliderctrl.h
@@ -111,8 +111,8 @@ public:
void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; }
void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; }
- boost::signals::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
- boost::signals::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
+ boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
+ boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
/*virtual*/ void onTabInto();
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 18aa1aa143..71396e10d9 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -45,7 +45,7 @@
#include "lluiimage.h" // *TODO: break this dependency, need to add #include "lluiimage.h" to all widgets that hold an Optional<LLUIImage*> in their paramblocks
#include "llinitparam.h"
#include "llregistry.h"
-#include <boost/signal.hpp>
+#include <boost/signals2.hpp>
#include "lllazyvalue.h"
// LLUIFactory
@@ -576,7 +576,7 @@ public:
class LLCallbackRegistry
{
public:
- typedef boost::signal<void()> callback_signal_t;
+ typedef boost::signals2::signal<void()> callback_signal_t;
void registerCallback(const callback_signal_t::slot_type& slot)
{
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index da0db0424a..99811809a8 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -749,11 +749,11 @@ LLUICtrl* LLUICtrl::getParentUICtrl() const
}
// *TODO: Deprecate; for backwards compatability only:
-boost::signals::connection LLUICtrl::setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data)
+boost::signals2::connection LLUICtrl::setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data)
{
return setCommitCallback( boost::bind(cb, _1, data));
}
-boost::signals::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
+boost::signals2::connection LLUICtrl::setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb )
{
return mValidateSignal.connect(boost::bind(cb, _2));
}
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index e82102d531..6d310dca22 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -74,16 +74,16 @@ protected:
};
class LLUICtrl
- : public LLView, public LLFocusableElement, public boost::signals::trackable
+ : public LLView, public LLFocusableElement, public boost::signals2::trackable
{
public:
typedef boost::function<void (LLUICtrl* ctrl, const LLSD& param)> commit_callback_t;
- typedef boost::signal<void (LLUICtrl* ctrl, const LLSD& param)> commit_signal_t;
+ typedef boost::signals2::signal<void (LLUICtrl* ctrl, const LLSD& param)> commit_signal_t;
typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> enable_callback_t;
- typedef boost::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t;
+ typedef boost::signals2::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t;
struct CallbackParam : public LLInitParam::Block<CallbackParam>
{
@@ -217,12 +217,12 @@ public:
LLUICtrl* getParentUICtrl() const;
- boost::signals::connection setCommitCallback( const commit_signal_t::slot_type& cb ) { return mCommitSignal.connect(cb); }
- boost::signals::connection setValidateCallback( const enable_signal_t::slot_type& cb ) { return mValidateSignal.connect(cb); }
+ boost::signals2::connection setCommitCallback( const commit_signal_t::slot_type& cb ) { return mCommitSignal.connect(cb); }
+ boost::signals2::connection setValidateCallback( const enable_signal_t::slot_type& cb ) { return mValidateSignal.connect(cb); }
// *TODO: Deprecate; for backwards compatability only:
- boost::signals::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data);
- boost::signals::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb );
+ boost::signals2::connection setCommitCallback( boost::function<void (LLUICtrl*,void*)> cb, void* data);
+ boost::signals2::connection setValidateBeforeCommit( boost::function<bool (const LLSD& data)> cb );
LLUICtrl* findRootMostFocusRoot();
@@ -250,9 +250,9 @@ protected:
LLViewModelPtr mViewModel;
LLControlVariable* mControlVariable;
- boost::signals::connection mControlConnection;
+ boost::signals2::connection mControlConnection;
LLControlVariable* mEnabledControlVariable;
- boost::signals::connection mEnabledControlConnection;
+ boost::signals2::connection mEnabledControlConnection;
private:
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 536d0c23f8..0a28075ed6 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -56,6 +56,8 @@
#include "lltexteditor.h"
#include "lltextbox.h"
+using namespace LLOldEvents;
+
BOOL LLView::sDebugRects = FALSE;
BOOL LLView::sDebugKeys = FALSE;
S32 LLView::sDepth = 0;