PageRenderTime 221ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llscrollingpanelparam.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 85 lines | 44 code | 14 blank | 27 comment | 0 complexity | cb2e76a7c4f1aa5d267710c1a394137c MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llscrollingpanelparam.h
  3. * @brief the scrolling panel containing a list of visual param
  4. * panels
  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_SCROLLINGPANELPARAM_H
  28. #define LL_SCROLLINGPANELPARAM_H
  29. #include "llscrollingpanelparambase.h"
  30. class LLViewerJointMesh;
  31. class LLViewerVisualParam;
  32. class LLWearable;
  33. class LLVisualParamHint;
  34. class LLViewerVisualParam;
  35. class LLJoint;
  36. class LLScrollingPanelParam : public LLScrollingPanelParamBase
  37. {
  38. public:
  39. LLScrollingPanelParam( const LLPanel::Params& panel_params,
  40. LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = TRUE );
  41. virtual ~LLScrollingPanelParam();
  42. virtual void draw();
  43. virtual void setVisible( BOOL visible );
  44. virtual void updatePanel(BOOL allow_modify);
  45. static void onSliderMouseDown(LLUICtrl* ctrl, void* userdata);
  46. static void onSliderMouseUp(LLUICtrl* ctrl, void* userdata);
  47. static void onHintMinMouseDown(void* userdata);
  48. static void onHintMinHeldDown(void* userdata);
  49. static void onHintMaxMouseDown(void* userdata);
  50. static void onHintMaxHeldDown(void* userdata);
  51. static void onHintMinMouseUp(void* userdata);
  52. static void onHintMaxMouseUp(void* userdata);
  53. void onHintMouseDown( LLVisualParamHint* hint );
  54. void onHintHeldDown( LLVisualParamHint* hint );
  55. F32 weightToPercent( F32 weight );
  56. F32 percentToWeight( F32 percent );
  57. public:
  58. // Constants for LLPanelVisualParam
  59. const static F32 PARAM_STEP_TIME_THRESHOLD;
  60. const static S32 PARAM_HINT_WIDTH;
  61. const static S32 PARAM_HINT_HEIGHT;
  62. public:
  63. LLPointer<LLVisualParamHint> mHintMin;
  64. LLPointer<LLVisualParamHint> mHintMax;
  65. static S32 sUpdateDelayFrames;
  66. protected:
  67. LLTimer mMouseDownTimer; // timer for how long mouse has been held down on a hint.
  68. F32 mLastHeldTime;
  69. BOOL mAllowModify;
  70. };
  71. #endif