/indra/newview/llfloatereditsky.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 113 lines · 56 code · 22 blank · 35 comment · 0 complexity · 840214334132917ffad0ae8e40eb5332 MD5 · raw file

  1. /**
  2. * @file llfloatereditsky.h
  3. * @brief Floater to create or edit a sky 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_LLFLOATEREDITSKY_H
  27. #define LL_LLFLOATEREDITSKY_H
  28. #include "llfloater.h"
  29. #include "llwlparammanager.h"
  30. class LLButton;
  31. class LLCheckBoxCtrl;
  32. class LLComboBox;
  33. class LLLineEditor;
  34. /**
  35. * Floater for creating or editing a sky preset.
  36. */
  37. class LLFloaterEditSky : public LLFloater
  38. {
  39. LOG_CLASS(LLFloaterEditSky);
  40. public:
  41. LLFloaterEditSky(const LLSD &key);
  42. /*virtual*/ BOOL postBuild();
  43. /*virtual*/ void onOpen(const LLSD& key);
  44. /*virtual*/ void onClose(bool app_quitting);
  45. /*virtual*/ void draw();
  46. private:
  47. void initCallbacks(void);
  48. //-- WL stuff begins ------------------------------------------------------
  49. void syncControls(); /// sync up sliders with parameters
  50. void setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k);
  51. // general purpose callbacks for dealing with color controllers
  52. void onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl);
  53. void onColorControlRMoved(LLUICtrl* ctrl, void* userdata);
  54. void onColorControlGMoved(LLUICtrl* ctrl, void* userdata);
  55. void onColorControlBMoved(LLUICtrl* ctrl, void* userdata);
  56. void onFloatControlMoved(LLUICtrl* ctrl, void* userdata);
  57. // lighting callbacks for glow
  58. void onGlowRMoved(LLUICtrl* ctrl, void* userdata);
  59. void onGlowBMoved(LLUICtrl* ctrl, void* userdata);
  60. // lighting callbacks for sun
  61. void onSunMoved(LLUICtrl* ctrl, void* userdata);
  62. void onTimeChanged();
  63. // for handling when the star slider is moved to adjust the alpha
  64. void onStarAlphaMoved(LLUICtrl* ctrl);
  65. // handle cloud scrolling
  66. void onCloudScrollXMoved(LLUICtrl* ctrl);
  67. void onCloudScrollYMoved(LLUICtrl* ctrl);
  68. void onCloudScrollXToggled(LLUICtrl* ctrl);
  69. void onCloudScrollYToggled(LLUICtrl* ctrl);
  70. //-- WL stuff ends --------------------------------------------------------
  71. void reset(); /// reset the floater to its initial state
  72. bool isNewPreset() const;
  73. void refreshSkyPresetsList();
  74. void enableEditing(bool enable);
  75. void saveRegionSky();
  76. LLWLParamKey getSelectedSkyPreset();
  77. void onSkyPresetNameEdited();
  78. void onSkyPresetSelected();
  79. bool onSaveAnswer(const LLSD& notification, const LLSD& response);
  80. void onSaveConfirmed();
  81. void onBtnSave();
  82. void onBtnCancel();
  83. void onSkyPresetListChange();
  84. void onRegionSettingsChange();
  85. void onRegionInfoUpdate();
  86. LLLineEditor* mSkyPresetNameEditor;
  87. LLComboBox* mSkyPresetCombo;
  88. LLCheckBoxCtrl* mMakeDefaultCheckBox;
  89. LLButton* mSaveButton;
  90. };
  91. #endif // LL_LLFLOATEREDITSKY_H