PageRenderTime 42ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llfloatereditwater.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 115 lines | 62 code | 25 blank | 28 comment | 0 complexity | 78ccd3cf99fbaa4c9b694fbb25115213 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llfloatereditwater.h
  3. * @brief Floater to create or edit a water preset
  4. *
  5. * $LicenseInfo:firstyear=2011&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2011, 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_LLFLOATEREDITWATER_H
  27. #define LL_LLFLOATEREDITWATER_H
  28. #include "llfloater.h"
  29. #include "llenvmanager.h" // for LLEnvKey
  30. class LLButton;
  31. class LLCheckBoxCtrl;
  32. class LLComboBox;
  33. class LLLineEditor;
  34. struct WaterVector2Control;
  35. struct WaterVector3Control;
  36. struct WaterColorControl;
  37. struct WaterFloatControl;
  38. struct WaterExpFloatControl;
  39. class LLFloaterEditWater : public LLFloater
  40. {
  41. LOG_CLASS(LLFloaterEditWater);
  42. public:
  43. LLFloaterEditWater(const LLSD &key);
  44. /*virtual*/ BOOL postBuild();
  45. /*virtual*/ void onOpen(const LLSD& key);
  46. /*virtual*/ void onClose(bool app_quitting);
  47. /*virtual*/ void draw();
  48. private:
  49. void initCallbacks(void);
  50. //-- WL stuff begins ------------------------------------------------------
  51. void syncControls(); /// sync up sliders with parameters
  52. // general purpose callbacks for dealing with color controllers
  53. void onColorControlRMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
  54. void onColorControlGMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
  55. void onColorControlBMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
  56. void onColorControlAMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
  57. void onColorControlIMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
  58. void onVector3ControlXMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl);
  59. void onVector3ControlYMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl);
  60. void onVector3ControlZMoved(LLUICtrl* ctrl, WaterVector3Control* vector_ctrl);
  61. void onVector2ControlXMoved(LLUICtrl* ctrl, WaterVector2Control* vector_ctrl);
  62. void onVector2ControlYMoved(LLUICtrl* ctrl, WaterVector2Control* vector_ctrl);
  63. void onFloatControlMoved(LLUICtrl* ctrl, WaterFloatControl* floatControl);
  64. void onExpFloatControlMoved(LLUICtrl* ctrl, WaterExpFloatControl* expFloatControl);
  65. void onWaterFogColorMoved(LLUICtrl* ctrl, WaterColorControl* color_ctrl);
  66. void onNormalMapPicked(LLUICtrl* ctrl); /// handle if they choose a new normal map
  67. //-- WL stuff ends --------------------------------------------------------
  68. void reset();
  69. bool isNewPreset() const;
  70. void refreshWaterPresetsList();
  71. void enableEditing(bool enable);
  72. void saveRegionWater();
  73. std::string getCurrentPresetName() const;
  74. LLEnvKey::EScope getCurrentScope() const;
  75. void getSelectedPreset(std::string& name, LLEnvKey::EScope& scope) const;
  76. void onWaterPresetNameEdited();
  77. void onWaterPresetSelected();
  78. bool onSaveAnswer(const LLSD& notification, const LLSD& response);
  79. void onSaveConfirmed();
  80. void onBtnSave();
  81. void onBtnCancel();
  82. void onWaterPresetListChange();
  83. void onRegionSettingsChange();
  84. void onRegionInfoUpdate();
  85. LLLineEditor* mWaterPresetNameEditor;
  86. LLComboBox* mWaterPresetCombo;
  87. LLCheckBoxCtrl* mMakeDefaultCheckBox;
  88. LLButton* mSaveButton;
  89. };
  90. #endif // LL_LLFLOATEREDITWATER_H