/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. #include "linden_common.h"
  28. #include "llurlmatch.h"
  29. LLUrlMatch::LLUrlMatch() :
  30. mStart(0),
  31. mEnd(0),
  32. mUrl(""),
  33. mLabel(""),
  34. mTooltip(""),
  35. mIcon(""),
  36. mMenuName(""),
  37. mLocation(""),
  38. mUnderlineOnHoverOnly(false)
  39. {
  40. }
  41. void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
  42. const std::string &label, const std::string &tooltip,
  43. const std::string &icon, const LLStyle::Params& style,
  44. const std::string &menu, const std::string &location,
  45. const LLUUID& id, bool underline_on_hover_only)
  46. {
  47. mStart = start;
  48. mEnd = end;
  49. mUrl = url;
  50. mLabel = label;
  51. mTooltip = tooltip;
  52. mIcon = icon;
  53. mStyle = style;
  54. mStyle.link_href = url;
  55. mMenuName = menu;
  56. mLocation = location;
  57. mID = id;
  58. mUnderlineOnHoverOnly = underline_on_hover_only;
  59. }