PageRenderTime 26ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llpanelprofile.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 102 lines | 48 code | 24 blank | 30 comment | 0 complexity | 67696084665804b886206a24679e013e MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpanelprofile.h
  3. * @brief Profile 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_LLPANELPROFILE_H
  27. #define LL_LLPANELPROFILE_H
  28. #include "llpanel.h"
  29. #include "llpanelavatar.h"
  30. class LLTabContainer;
  31. std::string getProfileURL(const std::string& agent_name);
  32. /**
  33. * Base class for Profile View and My Profile.
  34. */
  35. class LLPanelProfile : public LLPanel
  36. {
  37. LOG_CLASS(LLPanelProfile);
  38. public:
  39. /*virtual*/ BOOL postBuild();
  40. /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
  41. /*virtual*/ void onOpen(const LLSD& key);
  42. virtual void openPanel(LLPanel* panel, const LLSD& params);
  43. virtual void closePanel(LLPanel* panel);
  44. S32 notifyParent(const LLSD& info);
  45. protected:
  46. LLPanelProfile();
  47. virtual void onTabSelected(const LLSD& param);
  48. const LLUUID& getAvatarId() { return mAvatarId; }
  49. void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }
  50. typedef std::map<std::string, LLPanelProfileTab*> profile_tabs_t;
  51. profile_tabs_t& getTabContainer() { return mTabContainer; }
  52. private:
  53. //-- ChildStack begins ----------------------------------------------------
  54. class ChildStack
  55. {
  56. LOG_CLASS(LLPanelProfile::ChildStack);
  57. public:
  58. ChildStack();
  59. ~ChildStack();
  60. void setParent(LLPanel* parent);
  61. bool push();
  62. bool pop();
  63. void preParentReshape();
  64. void postParentReshape();
  65. private:
  66. void dump();
  67. typedef LLView::child_list_t view_list_t;
  68. typedef std::list<view_list_t> stack_t;
  69. stack_t mStack;
  70. stack_t mSavedStack;
  71. LLPanel* mParent;
  72. };
  73. //-- ChildStack ends ------------------------------------------------------
  74. profile_tabs_t mTabContainer;
  75. ChildStack mChildStack;
  76. LLUUID mAvatarId;
  77. };
  78. #endif //LL_LLPANELPROFILE_H