llfloateropenobject.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**
  2. * @file llfloateropenobject.h
  3. * @brief LLFloaterOpenObject class definition
  4. *
  5. * $LicenseInfo:firstyear=2004&license=viewergpl$
  6. *
  7. * Copyright (c) 2004-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. * Shows the contents of an object and their permissions when you click
  34. * "Buy..." on an object with "Sell Contents" checked.
  35. */
  36. #ifndef LL_LLFLOATEROPENOBJECT_H
  37. #define LL_LLFLOATEROPENOBJECT_H
  38. #include "llfloater.h"
  39. #include "llsafehandle.h"
  40. class LLObjectSelection;
  41. class LLPanelInventory;
  42. class LLTextBox;
  43. class LLFloaterOpenObject final
  44. : public LLFloater,
  45. public LLFloaterSingleton<LLFloaterOpenObject>
  46. {
  47. friend class LLUISingleton<LLFloaterOpenObject,
  48. VisibilityPolicy<LLFloater> >;
  49. public:
  50. bool postBuild() override;
  51. void refresh() override;
  52. void draw() override;
  53. static void show();
  54. static void dirty();
  55. struct LLCatAndWear
  56. {
  57. LLUUID mCatID;
  58. bool mWear;
  59. bool mFolderResponded;
  60. };
  61. private:
  62. LLFloaterOpenObject(const LLSD&);
  63. void moveToInventory(bool wear);
  64. static void onClickMoveToInventory(void* data);
  65. static void onClickMoveAndWear(void* data);
  66. static void callbackCreateCategory(const LLUUID& category_id,
  67. LLUUID object_id, bool wear);
  68. static void callbackMoveInventory(S32 result, void* data);
  69. static void* createPanelInventory(void* data);
  70. private:
  71. LLPanelInventory* mPanelInventory;
  72. LLTextBox* mDescription;
  73. LLSafeHandle<LLObjectSelection> mObjectSelection;
  74. U32 mLastCount;
  75. bool mDirty;
  76. };
  77. #endif