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

/indra/llui/llurlmatch.cpp

https://bitbucket.org/lindenlab/viewer-beta/
C++ | 62 lines | 33 code | 3 blank | 26 comment | 0 complexity | ab2312142d36036f02ca9e8bc9fb89a3 MD5 | raw file
 1/** 
 2 * @file llurlmatch.cpp
 3 * @author Martin Reddy
 4 * @brief Specifies a matched Url in a string, as returned by LLUrlRegistry
 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#include "linden_common.h"
29#include "llurlmatch.h"
30
31LLUrlMatch::LLUrlMatch() :
32	mStart(0),
33	mEnd(0),
34	mUrl(""),
35	mLabel(""),
36	mTooltip(""),
37	mIcon(""),
38	mMenuName(""),
39	mLocation(""),
40	mUnderlineOnHoverOnly(false)
41{
42}
43
44void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
45						   const std::string &label, const std::string &tooltip,
46						   const std::string &icon, const LLStyle::Params& style,
47						   const std::string &menu, const std::string &location,
48						   const LLUUID& id, bool underline_on_hover_only)
49{
50	mStart = start;
51	mEnd = end;
52	mUrl = url;
53	mLabel = label;
54	mTooltip = tooltip;
55	mIcon = icon;
56	mStyle = style;
57	mStyle.link_href = url;
58	mMenuName = menu;
59	mLocation = location;
60	mID = id;
61	mUnderlineOnHoverOnly = underline_on_hover_only;
62}