diff options
author | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
commit | 420b91db29485df39fd6e724e782c449158811cb (patch) | |
tree | b471a94563af914d3ed3edd3e856d21cb1b69945 /indra/newview/lltoolpipette.h |
Print done when done.
Diffstat (limited to 'indra/newview/lltoolpipette.h')
-rwxr-xr-x | indra/newview/lltoolpipette.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h new file mode 100755 index 0000000000..532f75c3e7 --- /dev/null +++ b/indra/newview/lltoolpipette.h @@ -0,0 +1,47 @@ +/** + * @file lltoolpipette.h + * @brief LLToolPipette class header file + * + * Copyright (c) 2006-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +// A tool to pick texture entry infro from objects in world (color/texture) + +#ifndef LL_LLTOOLPIPETTE_H +#define LL_LLTOOLPIPETTE_H + +#include "lltool.h" +#include "lltextureentry.h" + +class LLViewerObject; + +class LLToolPipette +: public LLTool +{ +public: + LLToolPipette(); + virtual ~LLToolPipette(); + + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); + virtual BOOL handleHover(S32 x, S32 y, MASK mask); + virtual BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect *sticky_rect_screen); + + typedef void (*select_callback)(const LLTextureEntry& te, void *data); + void setSelectCallback(select_callback callback, void* user_data); + void setResult(BOOL success, const LLString& msg); + + static void pickCallback(S32 x, S32 y, MASK mask); + +protected: + LLTextureEntry mTextureEntry; + select_callback mSelectCallback; + BOOL mSuccess; + LLString mTooltipMsg; + void* mUserData; +}; + +extern LLToolPipette *gToolPipette; + +#endif //LL_LLTOOLPIPETTE_H |