llfloaterfriends.h

Go to the documentation of this file.
00001 
00034 #ifndef LL_LLFLOATERFRIENDS_H
00035 #define LL_LLFLOATERFRIENDS_H
00036 
00037 #include "llpanel.h"
00038 #include "llstring.h"
00039 #include "lluuid.h"
00040 #include "lltimer.h"
00041 
00042 class LLFriendObserver;
00043 
00044 
00052 class LLPanelFriends : public LLPanel, public LLEventTimer
00053 {
00054 public:
00055         LLPanelFriends();
00056         virtual ~LLPanelFriends();
00057 
00063         virtual BOOL tick();
00064 
00069         void updateFriends(U32 changed_mask);
00070 
00071         virtual BOOL postBuild();
00072 
00073         // Show a dialog explaining what friendship entails, then request
00074         // friendship. JC
00075         static void requestFriendshipDialog(const LLUUID& target_id, 
00076                                                                                 const std::string& target_name);
00077 
00078         // Just request friendship, no dialog.
00079         static void requestFriendship(const LLUUID& target_id,
00080                                                                   const LLString& target_name);
00081 
00082 private:
00083 
00084         enum FRIENDS_COLUMN_ORDER
00085         {
00086                 LIST_ONLINE_STATUS,
00087                 LIST_FRIEND_NAME,
00088                 LIST_VISIBLE_ONLINE,
00089                 LIST_VISIBLE_MAP,
00090                 LIST_EDIT_MINE,
00091                 LIST_EDIT_THEIRS
00092         };
00093 
00094         // protected members
00095 
00096         void reloadNames();
00097         void refreshNames();
00098         void refreshUI();
00099         void refreshRightsChangeList();
00100         void applyRightsToFriends(S32 flag, BOOL value);
00101         void updateMenuState(S32 flag, BOOL value);
00102         S32 getMenuState() { return mMenuState; }
00103         void addFriend(const std::string& name, const LLUUID& agent_id);        
00104 
00105         // return LLUUID::null if nothing is selected
00106         LLDynamicArray<LLUUID> getSelectedIDs();
00107 
00108         // callback methods
00109         static void onSelectName(LLUICtrl* ctrl, void* user_data);
00110         static void callbackAddFriend(S32 option, void* user_data);
00111         static void onPickAvatar(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* user_data);
00112         static void onMaximumSelect(void* user_data);
00113 
00114         static void onClickIM(void* user_data);
00115         static void onClickProfile(void* user_data);
00116         static void onClickAddFriend(void* user_data);
00117         static void onClickRemove(void* user_data);
00118 
00119         static void onClickOfferTeleport(void* user_data);
00120         static void onClickPay(void* user_data);
00121 
00122         static void onClickOnlineStatus(LLUICtrl* ctrl, void* user_data);
00123         static void onClickMapStatus(LLUICtrl* ctrl, void* user_data);
00124         static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data);
00125 
00126         static void handleRemove(S32 option, void* user_data);
00127         static void handleModifyRights(S32 option, void* user_data);
00128 
00129 private:
00130         // member data
00131         LLFriendObserver* mObserver;
00132         LLUUID mAddFriendID;
00133         LLString mAddFriendName;
00134         LLScrollListCtrl*                       mFriendsList;
00135         S32             mMenuState;
00136         BOOL mShowMaxSelectWarning;
00137         BOOL mAllowRightsChange;
00138         S32 mNumRightsChanged;
00139 };
00140 
00141 
00142 #endif // LL_LLFLOATERFRIENDS_H

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