PageRenderTime 14ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 1ms

/indra/newview/llpanelavatartag.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 87 lines | 33 code | 12 blank | 42 comment | 0 complexity | 67217aaf46a8efba489220d412baa06d MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpanelavatartag.h
  3. * @brief Avatar row 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_LLPANELAVATARTAG_H
  27. #define LL_LLPANELAVATARTAG_H
  28. #include "llpanel.h"
  29. #include "llavatarpropertiesprocessor.h"
  30. class LLAvatarIconCtrl;
  31. class LLTextBox;
  32. /**
  33. * Avatar Tag panel.
  34. *
  35. * Test.
  36. *
  37. * Contains avatar name
  38. * Provide methods for setting avatar id, state, muted status and speech power.
  39. */
  40. class LLPanelAvatarTag : public LLPanel
  41. {
  42. public:
  43. LLPanelAvatarTag(const LLUUID& key, const std::string im_time);
  44. virtual ~LLPanelAvatarTag();
  45. /**
  46. * Set avatar ID.
  47. *
  48. * After the ID is set, it is possible to track the avatar status and get its name.
  49. */
  50. void setAvatarId(const LLUUID& avatar_id);
  51. void setTime (const std::string& time);
  52. const LLUUID& getAvatarId() const { return mAvatarId; }
  53. /*virtual*/ BOOL postBuild();
  54. /*virtual*/ void draw();
  55. virtual boost::signals2::connection setLeftButtonClickCallback(
  56. const commit_callback_t& cb);
  57. virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
  58. void onClick();
  59. private:
  60. void setName(const std::string& name);
  61. /**
  62. * Called by LLCacheName when the avatar name gets updated.
  63. */
  64. void nameUpdatedCallback(
  65. const LLUUID& id,
  66. const std::string& first,
  67. const std::string& last,
  68. BOOL is_group);
  69. LLAvatarIconCtrl* mIcon; /// status tracking avatar icon
  70. LLTextBox* mName; /// displays avatar name
  71. LLTextBox* mTime; /// displays time
  72. LLUUID mAvatarId;
  73. // LLFrameTimer mFadeTimer;
  74. };
  75. #endif