summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpipette.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/lltoolpipette.h
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/lltoolpipette.h')
-rw-r--r--indra/newview/lltoolpipette.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h
index 54c24e9467..fcccafe1a4 100644
--- a/indra/newview/lltoolpipette.h
+++ b/indra/newview/lltoolpipette.h
@@ -40,6 +40,8 @@
#include "lltool.h"
#include "lltextureentry.h"
+#include <boost/function.hpp>
+#include <boost/signal.hpp>
class LLViewerObject;
class LLPickInfo;
@@ -56,18 +58,19 @@ public:
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect *sticky_rect_screen);
- typedef void (*select_callback)(const LLTextureEntry& te, void *data);
- void setSelectCallback(select_callback callback, void* user_data);
+ // Note: Don't return connection; use boost::bind + boost::signal::trackable to disconnect slots
+ typedef boost::signal<void (const LLTextureEntry& te)> signal_t;
+ void setToolSelectCallback(const signal_t::slot_type& cb) { mSignal.connect(cb); }
void setResult(BOOL success, const std::string& msg);
-
+
+ void setTextureEntry(const LLTextureEntry* entry);
static void pickCallback(const LLPickInfo& pick_info);
protected:
LLTextureEntry mTextureEntry;
- select_callback mSelectCallback;
+ signal_t mSignal;
BOOL mSuccess;
std::string mTooltipMsg;
- void* mUserData;
};
#endif //LL_LLTOOLPIPETTE_H