PageRenderTime 42ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llnameeditor.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 79 lines | 37 code | 16 blank | 26 comment | 0 complexity | 4e4c5d45e313139e4dd924ca1bb5b5a9 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llnameeditor.h
  3. * @brief display and refresh a name from the name cache
  4. *
  5. * $LicenseInfo:firstyear=2003&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. #ifndef LL_LLNAMEEDITOR_H
  27. #define LL_LLNAMEEDITOR_H
  28. #include <set>
  29. #include "llview.h"
  30. #include "v4color.h"
  31. #include "llstring.h"
  32. #include "llfontgl.h"
  33. #include "lllineeditor.h"
  34. class LLNameEditor
  35. : public LLLineEditor
  36. {
  37. public:
  38. struct Params : public LLInitParam::Block<Params, LLLineEditor::Params>
  39. {
  40. Optional<bool> is_group;
  41. Optional<LLUUID> name_id;
  42. Params()
  43. : is_group("is_group"),
  44. name_id("name_id")
  45. {}
  46. };
  47. protected:
  48. LLNameEditor(const Params&);
  49. friend class LLUICtrlFactory;
  50. public:
  51. virtual ~LLNameEditor();
  52. void setNameID(const LLUUID& name_id, BOOL is_group);
  53. void refresh(const LLUUID& id, const std::string& full_name, bool is_group);
  54. static void refreshAll(const LLUUID& id, const std::string& full_name, bool is_group);
  55. // Take/return agent UUIDs
  56. virtual void setValue( const LLSD& value );
  57. virtual LLSD getValue() const;
  58. private:
  59. static std::set<LLNameEditor*> sInstances;
  60. private:
  61. LLUUID mNameID;
  62. };
  63. #endif