/indra/newview/lltoastimpanel.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 80 lines · 41 code · 14 blank · 25 comment · 0 complexity · 154edc7d653aa5e28bc3da38e089f0a4 MD5 · raw file

  1. /**
  2. * @file lltoastimpanel.h
  3. * @brief Panel for IM toasts.
  4. *
  5. * $LicenseInfo:firstyear=2001&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 LLTOASTIMPANEL_H_
  27. #define LLTOASTIMPANEL_H_
  28. #include "lltoastpanel.h"
  29. #include "lltextbox.h"
  30. #include "llbutton.h"
  31. #include "llavatariconctrl.h"
  32. class LLGroupIconCtrl;
  33. class LLToastIMPanel: public LLToastPanel
  34. {
  35. public:
  36. struct Params
  37. {
  38. LLNotificationPtr notification;
  39. LLUUID avatar_id;
  40. LLUUID session_id;
  41. std::string from;
  42. std::string time;
  43. std::string message;
  44. Params() {}
  45. };
  46. LLToastIMPanel(LLToastIMPanel::Params &p);
  47. virtual ~LLToastIMPanel();
  48. /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
  49. /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
  50. private:
  51. void showInspector();
  52. void spawnNameToolTip();
  53. void spawnGroupIconToolTip();
  54. void initIcon();
  55. static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT;
  56. LLNotificationPtr mNotification;
  57. LLUUID mSessionID;
  58. LLUUID mAvatarID;
  59. LLAvatarIconCtrl* mAvatarIcon;
  60. LLGroupIconCtrl* mGroupIcon;
  61. LLAvatarIconCtrl* mAdhocIcon;
  62. LLTextBox* mAvatarName;
  63. LLTextBox* mTime;
  64. LLTextBox* mMessage;
  65. };
  66. #endif // LLTOASTIMPANEL_H_