/indra/newview/llpanelgroupnotices.h
C++ Header | 119 lines | 64 code | 26 blank | 29 comment | 0 complexity | 7170949830753b27c99cc5d5d965ddbc MD5 | raw file
Possible License(s): LGPL-2.1
1/** 2 * @file llpanelgroupnotices.h 3 * @brief A panel to display group notices. 4 * 5 * $LicenseInfo:firstyear=2006&license=viewerlgpl$ 6 * Second Life Viewer Source Code 7 * Copyright (C) 2010, Linden Research, Inc. 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; 12 * version 2.1 of the License only. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 * 23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA 24 * $/LicenseInfo$ 25 */ 26 27#ifndef LL_LLPANELGROUPNOTICES_H 28#define LL_LLPANELGROUPNOTICES_H 29 30#include "llpanelgroup.h" 31#include "llpointer.h" 32#include "llinventory.h" 33 34class LLLineEditor; 35class LLTextEditor; 36class LLButton; 37class LLIconCtrl; 38class LLCheckBoxCtrl; 39class LLScrollListCtrl; 40 41class LLPanelGroupNotices : public LLPanelGroupTab 42{ 43public: 44 LLPanelGroupNotices(); 45 virtual ~LLPanelGroupNotices(); 46 47 // LLPanelGroupTab 48 virtual void activate(); 49 //virtual bool needsApply(std::string& mesg); 50 //virtual bool apply(std::string& mesg); 51 //virtual void update(); 52 53 virtual BOOL postBuild(); 54 virtual BOOL isVisibleByAgent(LLAgent* agentp); 55 56 void setItem(LLPointer<LLInventoryItem> inv_item); 57 58 static void processGroupNoticesListReply(LLMessageSystem* msg, void** data); 59 60 void showNotice(const std::string& subject, 61 const std::string& message, 62 const bool& has_inventory, 63 const std::string& inventory_name, 64 LLOfferInfo* inventory_offer); 65 66 void refreshNotices(); 67 68 virtual void setGroupID(const LLUUID& id); 69 70private: 71 static void onClickRemoveAttachment(void* data); 72 static void onClickOpenAttachment(void* data); 73 static void onClickSendMessage(void* data); 74 static void onClickNewMessage(void* data); 75 static void onClickRefreshNotices(void* data); 76 77 void processNotices(LLMessageSystem* msg); 78 static void onSelectNotice(LLUICtrl* ctrl, void* data); 79 80 enum ENoticeView 81 { 82 VIEW_PAST_NOTICE, 83 CREATE_NEW_NOTICE 84 }; 85 86 void arrangeNoticeView(ENoticeView view_type); 87 88 LLPointer<LLInventoryItem> mInventoryItem; 89 90 LLLineEditor *mCreateSubject; 91 LLLineEditor *mCreateInventoryName; 92 LLTextEditor *mCreateMessage; 93 94 LLLineEditor *mViewSubject; 95 LLLineEditor *mViewInventoryName; 96 LLTextEditor *mViewMessage; 97 98 LLButton *mBtnSendMessage; 99 LLButton *mBtnNewMessage; 100 LLButton *mBtnRemoveAttachment; 101 LLButton *mBtnOpenAttachment; 102 LLButton *mBtnGetPastNotices; 103 104 LLPanel *mPanelCreateNotice; 105 LLPanel *mPanelViewNotice; 106 107 LLIconCtrl *mCreateInventoryIcon; 108 LLIconCtrl *mViewInventoryIcon; 109 110 LLScrollListCtrl *mNoticesList; 111 112 std::string mNoNoticesStr; 113 114 LLOfferInfo* mInventoryOffer; 115 116 static std::map<LLUUID,LLPanelGroupNotices*> sInstances; 117}; 118 119#endif