PageRenderTime 13ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llui/llf32uictrl.cpp

https://bitbucket.org/lindenlab/viewer-beta/
C++ | 51 lines | 15 code | 3 blank | 33 comment | 0 complexity | 1063a8ecc69c5ad50493cfd9077a81d2 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llf32uictrl.cpp
  3. * @author Nat Goodspeed
  4. * @date 2008-09-08
  5. * @brief Implementation for llf32uictrl.
  6. *
  7. * $LicenseInfo:firstyear=2008&license=viewerlgpl$
  8. * Second Life Viewer Source Code
  9. * Copyright (C) 2010, Linden Research, Inc.
  10. *
  11. * This library is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU Lesser General Public
  13. * License as published by the Free Software Foundation;
  14. * version 2.1 of the License only.
  15. *
  16. * This library is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * Lesser General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Lesser General Public
  22. * License along with this library; if not, write to the Free Software
  23. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  24. *
  25. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  26. * $/LicenseInfo$
  27. */
  28. // Precompiled header
  29. #include "linden_common.h"
  30. // associated header
  31. #include "llf32uictrl.h"
  32. // STL headers
  33. // std headers
  34. // external library headers
  35. // other Linden headers
  36. LLF32UICtrl::LLF32UICtrl(const Params& p)
  37. : LLUICtrl(p),
  38. mInitialValue(p.initial_value().asReal()),
  39. mMinValue(p.min_value),
  40. mMaxValue(p.max_value),
  41. mIncrement(p.increment)
  42. {
  43. mViewModel->setValue(p.initial_value);
  44. }
  45. F32 LLF32UICtrl::getValueF32() const
  46. {
  47. return mViewModel->getValue().asReal();
  48. }