llfloatergroupinfo.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**
  2. * @file llfloatergroupinfo.h
  3. * @brief LLFloaterGroupInfo class definition
  4. *
  5. * $LicenseInfo:firstyear=2002&license=viewergpl$
  6. *
  7. * Copyright (c) 2002-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. /**
  33. * Floater used both for display of group information and for
  34. * creating new groups.
  35. */
  36. #ifndef LL_LLFLOATERGROUPINFO_H
  37. #define LL_LLFLOATERGROUPINFO_H
  38. #include "llfloater.h"
  39. class LLOfferInfo;
  40. class LLPanelGroup;
  41. class LLFloaterGroupInfo final : public LLFloater
  42. {
  43. protected:
  44. LOG_CLASS(LLFloaterGroupInfo);
  45. public:
  46. ~LLFloaterGroupInfo() override;
  47. // This allow us to block the user from closing the floater
  48. // if there is information that needs to be applied.
  49. bool canClose() override;
  50. LL_INLINE LLUUID getGroupID() { return mGroupID;}
  51. void selectTabByName(std::string tab_name);
  52. static void showCreateGroup(void*);
  53. static void showMyGroupInfo(void*);
  54. static void showFromUUID(const LLUUID& group_id,
  55. const std::string& tab_name = std::string());
  56. static void closeCreateGroup();
  57. static void closeGroup(const LLUUID& group_id);
  58. static void refreshGroup(const LLUUID& group_id);
  59. static void showNotice(const std::string& subject,
  60. const std::string& message,
  61. const LLUUID& group_id, bool has_inventory,
  62. const std::string& inventory_name,
  63. LLOfferInfo* inventory_offer);
  64. protected:
  65. LLFloaterGroupInfo(const std::string& name, const std::string& rect_ctrl,
  66. const std::string& title,
  67. const LLUUID& group_id = LLUUID::null,
  68. const std::string& tab_name = std::string());
  69. private:
  70. static void callbackLoadGroupName(const LLUUID& id,
  71. const std::string& name, bool is_group);
  72. private:
  73. LLUUID mGroupID;
  74. LLPanelGroup* mPanelGroupp;
  75. typedef fast_hmap<LLUUID, LLFloaterGroupInfo*> instances_map_t;
  76. static instances_map_t sInstances;
  77. };
  78. #endif