PageRenderTime 222ms CodeModel.GetById 26ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLCHATMSGBOX_H
  28. #define LL_LLCHATMSGBOX_H
  29. #include "lltextbox.h"
  30. #include "lluictrl.h"
  31. #include "v4color.h"
  32. #include "llstring.h"
  33. ///
  34. /// LLChatMsgBox provides a text box with support for multiple blocks
  35. /// of text that can be added incrementally. Each block of text is
  36. /// visual separated from the previous block (e.g., with a horizontal
  37. /// line).
  38. ///
  39. class LLChatMsgBox :
  40. public LLTextBox
  41. {
  42. public:
  43. struct Params : public LLInitParam::Block<Params, LLTextBox::Params>
  44. {
  45. Optional<S32> block_spacing;
  46. Params();
  47. };
  48. protected:
  49. LLChatMsgBox(const Params&);
  50. friend class LLUICtrlFactory;
  51. public:
  52. void addText(const LLStringExplicit &text, const LLStyle::Params& input_params = LLStyle::Params());
  53. private:
  54. S32 mBlockSpacing;
  55. };
  56. #endif