lldebugmessagebox.h

Go to the documentation of this file.
00001 
00033 #ifndef LL_LLDEBUGMESSAGEBOX_H
00034 #define LL_LLDEBUGMESSAGEBOX_H
00035 
00036 #include "lldarray.h"
00037 #include "llfloater.h"
00038 #include "v3math.h"
00039 #include "lltextbox.h"
00040 #include "llstring.h"
00041 #include "llframetimer.h"
00042 #include <vector>
00043 #include <map>
00044 
00045 class LLSliderCtrl;
00046 
00047 //----------------------------------------------------------------------------
00048 // LLDebugVarMessageBox
00049 //----------------------------------------------------------------------------
00050 
00051 typedef enum e_debug_var_type
00052 {
00053         VAR_TYPE_F32,
00054         VAR_TYPE_S32,
00055         VAR_TYPE_VEC2,
00056         VAR_TYPE_VEC3,
00057         VAR_TYPE_VEC4,
00058         VAR_TYPE_COUNT
00059 } EDebugVarType;
00060 
00061 class LLDebugVarMessageBox : public LLFloater
00062 {
00063 protected:
00064         LLDebugVarMessageBox(const std::string& title, EDebugVarType var_type, void *var);
00065         ~LLDebugVarMessageBox();
00066 
00067         static LLDebugVarMessageBox* show(const std::string& title, EDebugVarType var_type, void *var);
00068         static void slider_changed(LLUICtrl* ctrl, void* user_data);
00069         static void onAnimateClicked(void* user_data);
00070 
00071 public:
00072         static void show(const std::string& title, F32 *var, F32 max_value = 100.f, F32 increment = 0.1f);
00073         static void show(const std::string& title, S32 *var, S32 max_value = 255, S32 increment = 1);
00074         static void show(const std::string& title, LLVector2 *var, LLVector2 max_value = LLVector2(100.f, 100.f), LLVector2 increment = LLVector2(0.1f, 0.1f));
00075         static void show(const std::string& title, LLVector3 *var, LLVector3 max_value = LLVector3(100.f, 100.f, 100.f), LLVector3 increment = LLVector3(0.1f, 0.1f, 0.1f));
00076         //static void show(const std::string& title, LLVector4 *var, LLVector4 max_value = LLVector4(100.f, 100.f, 100.f, 100.f), LLVector4 increment = LLVector4(0.1f, 0.1f, 0.1f, 0.1f));     
00077                 
00078         virtual void onClose(bool app_quitting);
00079         virtual void    draw();
00080 
00081 protected:
00082         EDebugVarType   mVarType;
00083         void*                   mVarData;
00084         LLSliderCtrl*   mSlider1;
00085         LLSliderCtrl*   mSlider2;
00086         LLSliderCtrl*   mSlider3;
00087         LLButton*               mAnimateButton;
00088         LLTextBox*              mText;
00089         LLString                mTitle;
00090         BOOL                    mAnimate;
00091 
00092         static std::map<LLString, LLDebugVarMessageBox*> sInstances;
00093 };
00094 
00095 #endif // LL_LLMESSAGEBOX_H

Generated on Thu Jul 1 06:08:24 2010 for Second Life Viewer by  doxygen 1.4.7