/indra/newview/llpanelplaceinfo.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 128 lines · 66 code · 22 blank · 40 comment · 0 complexity · 08abb1ec6f29ce73aa1cb78e254c4442 MD5 · raw file

  1. /**
  2. * @file llpanelplaceinfo.h
  3. * @brief Base class for place information in Side Tray.
  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_LLPANELPLACEINFO_H
  27. #define LL_LLPANELPLACEINFO_H
  28. #include "llpanel.h"
  29. #include "v3dmath.h"
  30. #include "lluuid.h"
  31. #include "llremoteparcelrequest.h"
  32. class LLAvatarName;
  33. class LLExpandableTextBox;
  34. class LLIconCtrl;
  35. class LLInventoryItem;
  36. class LLPanelPickEdit;
  37. class LLParcel;
  38. class LLScrollContainer;
  39. class LLTextBox;
  40. class LLTextureCtrl;
  41. class LLViewerRegion;
  42. class LLViewerInventoryCategory;
  43. class LLPanelPlaceInfo : public LLPanel, LLRemoteParcelInfoObserver
  44. {
  45. public:
  46. enum EInfoType
  47. {
  48. UNKNOWN,
  49. AGENT,
  50. CREATE_LANDMARK,
  51. LANDMARK,
  52. PLACE,
  53. TELEPORT_HISTORY
  54. };
  55. LLPanelPlaceInfo();
  56. /*virtual*/ ~LLPanelPlaceInfo();
  57. /*virtual*/ BOOL postBuild();
  58. // Ignore all old location information, useful if you are
  59. // recycling an existing dialog and need to clear it.
  60. virtual void resetLocation();
  61. // Sends a request for data about the given parcel, which will
  62. // only update the location if there is none already available.
  63. /*virtual*/ void setParcelID(const LLUUID& parcel_id);
  64. // Depending on how the panel was triggered
  65. // (from landmark or current location, or other)
  66. // sets a corresponding title and contents.
  67. virtual void setInfoType(EInfoType type);
  68. // Requests remote parcel info by parcel ID.
  69. void sendParcelInfoRequest();
  70. // Displays information about a remote parcel.
  71. // Sends a request to the server.
  72. void displayParcelInfo(const LLUUID& region_id,
  73. const LLVector3d& pos_global);
  74. /*virtual*/ void setErrorStatus(U32 status, const std::string& reason);
  75. /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
  76. /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
  77. // Create a pick for the location specified
  78. // by global_pos.
  79. void createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel);
  80. protected:
  81. static void onNameCache(LLTextBox* text, const std::string& full_name);
  82. static void onAvatarNameCache(const LLUUID& agent_id,
  83. const LLAvatarName& av_name,
  84. LLTextBox* text);
  85. /**
  86. * mParcelID is valid only for remote places, in other cases it's null. See resetLocation()
  87. */
  88. LLUUID mParcelID;
  89. LLUUID mRequestedID;
  90. LLVector3 mPosRegion;
  91. std::string mParcelTitle; // used for pick title without coordinates
  92. std::string mCurrentTitle;
  93. S32 mScrollingPanelMinHeight;
  94. S32 mScrollingPanelWidth;
  95. EInfoType mInfoType;
  96. LLScrollContainer* mScrollContainer;
  97. LLPanel* mScrollingPanel;
  98. LLTextBox* mTitle;
  99. LLTextureCtrl* mSnapshotCtrl;
  100. LLTextBox* mRegionName;
  101. LLTextBox* mParcelName;
  102. LLExpandableTextBox* mDescEditor;
  103. LLIconCtrl* mMaturityRatingIcon;
  104. LLTextBox* mMaturityRatingText;
  105. };
  106. #endif // LL_LLPANELPLACEINFO_H