PageRenderTime 29ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llplacesinventorybridge.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 97 lines | 49 code | 12 blank | 36 comment | 0 complexity | e8b7f329c1df3c7f7acbb1600766d0f6 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llplacesinventorybridge.h
  3. * @brief Declaration of the Inventory-Folder-View-Bridge classes for Places Panel.
  4. *
  5. * $LicenseInfo:firstyear=2009&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_LLPLACESINVENTORYBRIDGE_H
  27. #define LL_LLPLACESINVENTORYBRIDGE_H
  28. #include "llinventorybridge.h"
  29. class LLFolderViewFolder;
  30. /**
  31. * Overridden version of the Inventory-Folder-View-Bridge for Places Panel (Landmarks Tab)
  32. */
  33. class LLPlacesLandmarkBridge : public LLLandmarkBridge
  34. {
  35. friend class LLPlacesInventoryBridgeBuilder;
  36. public:
  37. /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags);
  38. protected:
  39. LLPlacesLandmarkBridge(LLInventoryType::EType type,
  40. LLInventoryPanel* inventory,
  41. LLFolderView* root,
  42. const LLUUID& uuid,
  43. U32 flags = 0x00) :
  44. LLLandmarkBridge(inventory, root, uuid, flags)
  45. {
  46. mInvType = type;
  47. }
  48. };
  49. /**
  50. * Overridden version of the Inventory-Folder-View-Bridge for Folders
  51. */
  52. class LLPlacesFolderBridge : public LLFolderBridge
  53. {
  54. friend class LLPlacesInventoryBridgeBuilder;
  55. public:
  56. /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags);
  57. /*virtual*/ void performAction(LLInventoryModel* model, std::string action);
  58. protected:
  59. LLPlacesFolderBridge(LLInventoryType::EType type,
  60. LLInventoryPanel* inventory,
  61. LLFolderView* root,
  62. const LLUUID& uuid) :
  63. LLFolderBridge(inventory, root, uuid)
  64. {
  65. mInvType = type;
  66. }
  67. LLFolderViewFolder* getFolder();
  68. };
  69. /**
  70. * This class intended to override default InventoryBridgeBuilder for Inventory Panel.
  71. *
  72. * It builds Bridges for Landmarks and Folders in Places Landmarks Panel
  73. */
  74. class LLPlacesInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder
  75. {
  76. public:
  77. /*virtual*/ LLInvFVBridge* createBridge(LLAssetType::EType asset_type,
  78. LLAssetType::EType actual_asset_type,
  79. LLInventoryType::EType inv_type,
  80. LLInventoryPanel* inventory,
  81. LLFolderView* root,
  82. const LLUUID& uuid,
  83. U32 flags = 0x00) const;
  84. };
  85. #endif // LL_LLPLACESINVENTORYBRIDGE_H