00001
00032 #ifndef LL_LLFLOATERSCRIPTDEBUG_H
00033 #define LL_LLFLOATERSCRIPTDEBUG_H
00034
00035 #include "llfloater.h"
00036
00037 class LLTextEditor;
00038 class LLUUID;
00039
00040 class LLFloaterScriptDebug : public LLMultiFloater
00041 {
00042 public:
00043 virtual ~LLFloaterScriptDebug();
00044 virtual void onClose(bool app_quitting) { setVisible(FALSE); }
00045 virtual BOOL postBuild();
00046 static void show(const LLUUID& object_id);
00047 static void addScriptLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color, const LLUUID& source_id);
00048
00049 protected:
00050 LLFloaterScriptDebug();
00051
00052 static LLFloater* addOutputWindow(const LLUUID& object_id);
00053
00054 protected:
00055 static LLFloaterScriptDebug* sInstance;
00056 };
00057
00058 class LLFloaterScriptDebugOutput : public LLFloater
00059 {
00060 public:
00061 LLFloaterScriptDebugOutput();
00062 LLFloaterScriptDebugOutput(const LLUUID& object_id);
00063 ~LLFloaterScriptDebugOutput();
00064
00065 virtual void init(const LLString& title, BOOL resizable,
00066 S32 min_width, S32 min_height, BOOL drag_on_left,
00067 BOOL minimizable, BOOL close_btn);
00068
00069 void addLine(const std::string &utf8mesg, const std::string &user_name, const LLColor4& color);
00070
00071 static LLFloaterScriptDebugOutput* show(const LLUUID& object_id);
00072 static LLFloaterScriptDebugOutput* getFloaterByID(const LLUUID& id);
00073
00074 protected:
00075 LLTextEditor* mHistoryEditor;
00076
00077 typedef std::map<LLUUID, LLFloaterScriptDebugOutput*> instance_map_t;
00078 static instance_map_t sInstanceMap;
00079
00080 LLUUID mObjectID;
00081 };
00082
00083 #endif // LL_LLFLOATERSCRIPTDEBUG_H