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

/indra/newview/llviewerchat.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 56 lines | 22 code | 9 blank | 25 comment | 0 complexity | 04e34af4a06ad9fc6b5d3c816b117466 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llviewerchat.h
  3. * @brief wrapper of LLChat in viewer
  4. *
  5. * $LicenseInfo:firstyear=2002&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_LLVIEWERCHAT_H
  27. #define LL_LLVIEWERCHAT_H
  28. #include "llchat.h"
  29. #include "llfontgl.h"
  30. #include "v4color.h"
  31. class LLViewerChat
  32. {
  33. public:
  34. typedef boost::signals2::signal<void (LLFontGL*)> font_change_signal_t;
  35. static void getChatColor(const LLChat& chat, LLColor4& r_color);
  36. static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha);
  37. static LLFontGL* getChatFont();
  38. static S32 getChatFontSize();
  39. static void formatChatMsg(const LLChat& chat, std::string& formated_msg);
  40. static std::string getSenderSLURL(const LLChat& chat, const LLSD& args);
  41. static boost::signals2::connection setFontChangedCallback(const font_change_signal_t::slot_type& cb);
  42. static void signalChatFontChanged();
  43. private:
  44. static std::string getObjectImSLURL(const LLChat& chat, const LLSD& args);
  45. static font_change_signal_t sChatFontChangedSignal;
  46. };
  47. #endif