/indra/newview/llpanelgroupnotices.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 119 lines · 64 code · 26 blank · 29 comment · 0 complexity · 7170949830753b27c99cc5d5d965ddbc MD5 · raw file

  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. #ifndef LL_LLPANELGROUPNOTICES_H
  27. #define LL_LLPANELGROUPNOTICES_H
  28. #include "llpanelgroup.h"
  29. #include "llpointer.h"
  30. #include "llinventory.h"
  31. class LLLineEditor;
  32. class LLTextEditor;
  33. class LLButton;
  34. class LLIconCtrl;
  35. class LLCheckBoxCtrl;
  36. class LLScrollListCtrl;
  37. class LLPanelGroupNotices : public LLPanelGroupTab
  38. {
  39. public:
  40. LLPanelGroupNotices();
  41. virtual ~LLPanelGroupNotices();
  42. // LLPanelGroupTab
  43. virtual void activate();
  44. //virtual bool needsApply(std::string& mesg);
  45. //virtual bool apply(std::string& mesg);
  46. //virtual void update();
  47. virtual BOOL postBuild();
  48. virtual BOOL isVisibleByAgent(LLAgent* agentp);
  49. void setItem(LLPointer<LLInventoryItem> inv_item);
  50. static void processGroupNoticesListReply(LLMessageSystem* msg, void** data);
  51. void showNotice(const std::string& subject,
  52. const std::string& message,
  53. const bool& has_inventory,
  54. const std::string& inventory_name,
  55. LLOfferInfo* inventory_offer);
  56. void refreshNotices();
  57. virtual void setGroupID(const LLUUID& id);
  58. private:
  59. static void onClickRemoveAttachment(void* data);
  60. static void onClickOpenAttachment(void* data);
  61. static void onClickSendMessage(void* data);
  62. static void onClickNewMessage(void* data);
  63. static void onClickRefreshNotices(void* data);
  64. void processNotices(LLMessageSystem* msg);
  65. static void onSelectNotice(LLUICtrl* ctrl, void* data);
  66. enum ENoticeView
  67. {
  68. VIEW_PAST_NOTICE,
  69. CREATE_NEW_NOTICE
  70. };
  71. void arrangeNoticeView(ENoticeView view_type);
  72. LLPointer<LLInventoryItem> mInventoryItem;
  73. LLLineEditor *mCreateSubject;
  74. LLLineEditor *mCreateInventoryName;
  75. LLTextEditor *mCreateMessage;
  76. LLLineEditor *mViewSubject;
  77. LLLineEditor *mViewInventoryName;
  78. LLTextEditor *mViewMessage;
  79. LLButton *mBtnSendMessage;
  80. LLButton *mBtnNewMessage;
  81. LLButton *mBtnRemoveAttachment;
  82. LLButton *mBtnOpenAttachment;
  83. LLButton *mBtnGetPastNotices;
  84. LLPanel *mPanelCreateNotice;
  85. LLPanel *mPanelViewNotice;
  86. LLIconCtrl *mCreateInventoryIcon;
  87. LLIconCtrl *mViewInventoryIcon;
  88. LLScrollListCtrl *mNoticesList;
  89. std::string mNoNoticesStr;
  90. LLOfferInfo* mInventoryOffer;
  91. static std::map<LLUUID,LLPanelGroupNotices*> sInstances;
  92. };
  93. #endif