llpanelgroupgeneral.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /**
  2. * @file llpanelgroupgeneral.h
  3. * @brief General information about a group.
  4. *
  5. * $LicenseInfo:firstyear=2006&license=viewergpl$
  6. *
  7. * Copyright (c) 2006-2009, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_LLPANELGROUPGENERAL_H
  33. #define LL_LLPANELGROUPGENERAL_H
  34. #include "llpanelgroup.h"
  35. class LLButton;
  36. class LLCheckBoxCtrl;
  37. class LLComboBox;
  38. class LLLineEditor;
  39. class LLNameBox;
  40. class LLNameListCtrl;
  41. class LLSpinCtrl;
  42. class LLTextBox;
  43. class LLTextureCtrl;
  44. class LLTextEditor;
  45. class LLTimer;
  46. class LLPanelGroupGeneral : public LLPanelGroupTab
  47. {
  48. protected:
  49. LOG_CLASS(LLPanelGroupGeneral);
  50. public:
  51. LLPanelGroupGeneral(const std::string& name, const LLUUID& group_id);
  52. // LLPanelGroupTab
  53. static void* createTab(void* data);
  54. void activate() override;
  55. bool needsApply(std::string& mesg) override;
  56. bool apply(std::string& mesg) override;
  57. void cancel() override;
  58. bool createGroupCallback(const LLSD& notification, const LLSD& response);
  59. void update(LLGroupChange gc) override;
  60. bool postBuild() override;
  61. void draw() override;
  62. private:
  63. static void onFocusEdit(LLFocusableElement* ctrl, void* data);
  64. static void onCommitAny(LLUICtrl* ctrl, void* data);
  65. static void onCommitUserOnly(LLUICtrl* ctrl, void* data);
  66. static void onCommitTitle(LLUICtrl* ctrl, void* data);
  67. static void onCommitEnrollment(LLUICtrl* ctrl, void* data);
  68. static void onClickJoin(void* userdata);
  69. static void onClickInfo(void* userdata);
  70. static void onReceiveNotices(LLUICtrl* ctrl, void* data);
  71. static void openProfile(void* data);
  72. static bool joinDlgCB(const LLSD& notification, const LLSD& response);
  73. void updateMembers();
  74. void updateChanged();
  75. bool confirmMatureApply(const LLSD& notification, const LLSD& response);
  76. private:
  77. LLTimer mUpdateTimer;
  78. F32 mUpdateInterval;
  79. bool mSkipNextUpdate;
  80. bool mPendingMemberUpdate;
  81. bool mChanged;
  82. bool mFirstUse;
  83. std::string mIncompleteMemberDataStr;
  84. LLUUID mDefaultIconID;
  85. // Group information (include any updates in updateChanged)
  86. LLLineEditor* mGroupNameEditor;
  87. LLTextBox* mGroupName;
  88. LLNameBox* mFounderName;
  89. LLTextureCtrl* mInsignia;
  90. LLTextEditor* mEditCharter;
  91. LLButton* mBtnJoinGroup;
  92. LLButton* mBtnInfo;
  93. LLNameListCtrl* mListVisibleMembers;
  94. // Options (include any updates in updateChanged)
  95. LLCheckBoxCtrl* mCtrlShowInGroupList;
  96. LLCheckBoxCtrl* mCtrlOpenEnrollment;
  97. LLCheckBoxCtrl* mCtrlEnrollmentFee;
  98. LLSpinCtrl* mSpinEnrollmentFee;
  99. LLCheckBoxCtrl* mCtrlReceiveNotices;
  100. LLCheckBoxCtrl* mCtrlReceiveChat;
  101. LLCheckBoxCtrl* mCtrlListGroup;
  102. LLTextBox* mActiveTitleLabel;
  103. LLComboBox* mComboActiveTitle;
  104. LLComboBox* mComboMature;
  105. LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
  106. };
  107. #endif