llgroupnotify.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLGROUPNOTIFY_H
00033 #define LL_LLGROUPNOTIFY_H
00034 
00035 #include "llfontgl.h"
00036 #include "llpanel.h"
00037 #include "lldarray.h"
00038 #include "lltimer.h"
00039 #include "llviewermessage.h"
00040 
00041 class LLButton;
00042 
00043 // NotifyBox - for notifications that require a response from the
00044 // user.  Replaces LLMessageBox.
00045 class LLGroupNotifyBox
00046 :       public LLPanel
00047 {
00048 public:
00049         static LLGroupNotifyBox* show(const char* subject,
00050                                                                         const char* message,
00051                                                                         const char* from_name,
00052                                                                         const LLUUID& group_id,
00053                                                                         const U32& time_stamp,
00054                                                                         const bool& has_inventory = FALSE,
00055                                                                         const char* inventory_name = NULL,
00056                                                                         LLOfferInfo* inventory_offer = NULL);
00057         void close();
00058 
00059 protected:
00060         // Non-transient messages.  You can specify non-default button
00061         // layouts (like one for script dialogs) by passing various
00062         // numbers in for "layout".
00063         LLGroupNotifyBox(const char* subject,
00064                                                 const char* message,
00065                                                 const char* from_name,
00066                                                 const LLUUID& group_id,
00067                                                 const LLUUID& group_insignia,
00068                                                 const char* group_name,
00069                                                 const U32& t,
00070                                                 const bool& has_inventory = FALSE,
00071                                                 const char* inventory_name = NULL,
00072                                                 LLOfferInfo* inventory_offer = NULL);
00073 
00074         /*virtual*/ ~LLGroupNotifyBox();
00075 
00076 // JC - removed support for clicking in background to dismiss
00077 // the dialogs.
00078 //      /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
00079 //      /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
00080 //      /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
00081         /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
00082 
00083         // Animate as sliding onto the screen.
00084         /*virtual*/ void draw();
00085 
00086         void moveToBack();
00087 
00088         // Returns the rect, relative to gNotifyView, where this
00089         // notify box should be placed.
00090         static LLRect getGroupNotifyRect();
00091 
00092         // internal handler for button being clicked
00093         static void onClickOk(void* data);
00094         static void onClickGroupInfo(void* data);
00095         static void onClickSaveInventory(void* data);
00096 
00097         // for "next" button
00098         static void onClickNext(void* data);
00099 
00100 protected:
00101         // Are we sliding onscreen?
00102         BOOL mAnimating;
00103 
00104         // Time since this notification was displayed.
00105         // This is an LLTimer not a frame timer because I am concerned
00106         // that I could be out-of-sync by one frame in the animation.
00107         LLTimer mTimer;
00108 
00109         LLButton* mNextBtn;
00110         LLButton* mSaveInventoryBtn;
00111 
00112         static S32 sGroupNotifyBoxCount;
00113 
00114         LLUUID mGroupID;
00115         BOOL mHasInventory;
00116         LLOfferInfo* mInventoryOffer;
00117 };
00118 
00119 // This view contains the stack of notification windows.
00120 //extern LLView* gGroupNotifyBoxView;
00121 
00122 const S32 GROUP_LAYOUT_DEFAULT = 0;
00123 const S32 GROUP_LAYOUT_SCRIPT_DIALOG = 1;
00124 
00125 #endif

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