PageRenderTime 23ms CodeModel.GetById 17ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llchatmsgbox.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 65 lines | 24 code | 9 blank | 32 comment | 0 complexity | c158fc3cd7195ba8cd96257d61d0ceb0 MD5 | raw file
 1/** 
 2 * @file llchatmsgbox.h
 3 * @author Martin Reddy
 4 * @brief chat history text box, able to show array of strings with separator
 5 *
 6 * $LicenseInfo:firstyear=2009&license=viewerlgpl$
 7 * Second Life Viewer Source Code
 8 * Copyright (C) 2010, Linden Research, Inc.
 9 * 
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation;
13 * version 2.1 of the License only.
14 * 
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 * 
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 * 
24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
25 * $/LicenseInfo$
26 */
27
28#ifndef LL_LLCHATMSGBOX_H
29#define LL_LLCHATMSGBOX_H
30
31#include "lltextbox.h"
32#include "lluictrl.h"
33#include "v4color.h"
34#include "llstring.h"
35
36///
37/// LLChatMsgBox provides a text box with support for multiple blocks
38/// of text that can be added incrementally. Each block of text is
39/// visual separated from the previous block (e.g., with a horizontal
40/// line).
41///
42class LLChatMsgBox :
43	public LLTextBox
44{
45public:
46	struct Params : public LLInitParam::Block<Params, LLTextBox::Params>
47	{
48		Optional<S32>	block_spacing;
49
50		Params();
51	};
52
53protected:
54	LLChatMsgBox(const Params&);
55	friend class LLUICtrlFactory;
56
57public:
58	void				addText(const LLStringExplicit &text, const LLStyle::Params& input_params = LLStyle::Params());
59	
60private:
61	S32					mBlockSpacing;
62};
63
64#endif
65