llviewergesture.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLVIEWERGESTURE_H
00033 #define LL_LLVIEWERGESTURE_H
00034 
00035 #include "llanimationstates.h"
00036 #include "lluuid.h"
00037 #include "llstring.h"
00038 #include "lldarray.h"
00039 #include "llgesture.h"
00040 
00041 class LLMessageSystem;
00042 
00043 class LLViewerGesture : public LLGesture
00044 {
00045 public:
00046         LLViewerGesture();
00047         LLViewerGesture(KEY key, MASK mask, const std::string &trigger, 
00048                 const LLUUID &sound_item_id, const std::string &animation, 
00049                 const std::string &output_string);
00050 
00051         LLViewerGesture(U8 **buffer, S32 max_size); // deserializes, advances buffer
00052         LLViewerGesture(const LLViewerGesture &gesture);
00053 
00054         // Triggers if a key/mask matches it
00055         virtual BOOL trigger(KEY key, MASK mask);
00056 
00057         // Triggers if case-insensitive substring matches (assumes string is lowercase)
00058         virtual BOOL trigger(const std::string &string);
00059 
00060         void doTrigger( BOOL send_chat );
00061 
00062 protected:
00063         static const F32        SOUND_VOLUME;
00064 };
00065 
00066 class LLViewerGestureList : public LLGestureList
00067 {
00068 public:
00069         LLViewerGestureList();
00070 
00071         //void requestFromServer();
00072         BOOL getIsLoaded() { return mIsLoaded; }
00073 
00074         //void requestResetFromServer( BOOL is_male );
00075 
00076         // See if the prefix matches any gesture.  If so, return TRUE
00077         // and place the full text of the gesture trigger into
00078         // output_str
00079         BOOL matchPrefix(const std::string& in_str, std::string* out_str);
00080 
00081         static void xferCallback(void *data, S32 size, void** /*user_data*/, S32 status);
00082 
00083 protected:
00084         LLGesture *create_gesture(U8 **buffer, S32 max_size);
00085 
00086 protected:
00087         BOOL mIsLoaded;
00088 };
00089 
00090 extern LLViewerGestureList gGestureList;
00091 
00092 #endif

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