PageRenderTime 25ms CodeModel.GetById 12ms app.highlight 8ms 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
 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
27#ifndef LL_LLVIEWERCHAT_H
28#define LL_LLVIEWERCHAT_H
29
30#include "llchat.h"
31#include "llfontgl.h"
32#include "v4color.h"
33
34
35class LLViewerChat 
36{
37public:
38	typedef boost::signals2::signal<void (LLFontGL*)> font_change_signal_t;
39
40	static void getChatColor(const LLChat& chat, LLColor4& r_color);
41	static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha);
42	static LLFontGL* getChatFont();
43	static S32 getChatFontSize();
44	static void formatChatMsg(const LLChat& chat, std::string& formated_msg);
45	static std::string getSenderSLURL(const LLChat& chat, const LLSD& args);
46
47	static boost::signals2::connection setFontChangedCallback(const font_change_signal_t::slot_type& cb);
48	static void signalChatFontChanged();
49
50private:
51	static std::string getObjectImSLURL(const LLChat& chat, const LLSD& args);
52	static font_change_signal_t sChatFontChangedSignal;
53
54};
55
56#endif