lltoolpipette.h

Go to the documentation of this file.
00001 
00032 // A tool to pick texture entry infro from objects in world (color/texture)
00033 // This tool assumes it is transient in the codebase and must be used
00034 // accordingly. We should probably restructure the way tools are
00035 // managed so that this is handled automatically.
00036 
00037 #ifndef LL_LLTOOLPIPETTE_H
00038 #define LL_LLTOOLPIPETTE_H
00039 
00040 #include "lltool.h"
00041 #include "lltextureentry.h"
00042 
00043 class LLViewerObject;
00044 
00045 class LLToolPipette
00046 :       public LLTool
00047 {
00048 public:
00049         LLToolPipette();
00050         virtual ~LLToolPipette();
00051 
00052         virtual BOOL    handleMouseDown(S32 x, S32 y, MASK mask);
00053         virtual BOOL    handleMouseUp(S32 x, S32 y, MASK mask);
00054         virtual BOOL    handleHover(S32 x, S32 y, MASK mask);
00055         virtual BOOL    handleToolTip(S32 x, S32 y, LLString& msg, LLRect *sticky_rect_screen);
00056 
00057         typedef void (*select_callback)(const LLTextureEntry& te, void *data);
00058         void setSelectCallback(select_callback callback, void* user_data);
00059         void setResult(BOOL success, const LLString& msg);
00060 
00061         static void pickCallback(S32 x, S32 y, MASK mask);
00062 
00063 protected:
00064         LLTextureEntry  mTextureEntry;
00065         select_callback mSelectCallback;
00066         BOOL                    mSuccess;
00067         LLString                mTooltipMsg;
00068         void*                   mUserData;
00069 };
00070 
00071 extern LLToolPipette *gToolPipette;
00072 
00073 #endif //LL_LLTOOLPIPETTE_H

Generated on Thu Jul 1 06:09:22 2010 for Second Life Viewer by  doxygen 1.4.7