llpanellandmedia.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /**
  2. * @file llpanellandmedia.h
  3. * @brief Allows configuration of "media" for a land parcel,
  4. * for example movies, web pages, and audio.
  5. *
  6. * $LicenseInfo:firstyear=2007&license=viewergpl$
  7. *
  8. * Copyright (c) 2007-2009, Linden Research, Inc.
  9. *
  10. * Second Life Viewer Source Code
  11. * The source code in this file ("Source Code") is provided by Linden Lab
  12. * to you under the terms of the GNU General Public License, version 2.0
  13. * ("GPL"), unless you have obtained a separate licensing agreement
  14. * ("Other License"), formally executed by you and Linden Lab. Terms of
  15. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  16. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  17. *
  18. * There are special exceptions to the terms and conditions of the GPL as
  19. * it is applied to this Source Code. View the full text of the exception
  20. * in the file doc/FLOSS-exception.txt in this software distribution, or
  21. * online at
  22. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  23. *
  24. * By copying, modifying or distributing this software, you acknowledge
  25. * that you have read and understood your obligations described above,
  26. * and agree to abide by those obligations.
  27. *
  28. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  29. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  30. * COMPLETENESS OR PERFORMANCE.
  31. * $/LicenseInfo$
  32. */
  33. #ifndef LLPANELLANDMEDIA_H
  34. #define LLPANELLANDMEDIA_H
  35. #include "llfloater.h"
  36. #include "llparcelselection.h"
  37. class LLButton;
  38. class LLCheckBoxCtrl;
  39. class LLComboBox;
  40. class LLLineEditor;
  41. class LLRadioGroup;
  42. class LLSpinCtrl;
  43. class LLTextureCtrl;
  44. class LLPanelLandMedia final : public LLPanel
  45. {
  46. public:
  47. LLPanelLandMedia(LLSafeHandle<LLParcelSelection>& parcelp);
  48. bool postBuild() override;
  49. void refresh() override;
  50. void setMediaType(const std::string& media_type);
  51. void setMediaURL(const std::string& media_type);
  52. std::string getMediaURL();
  53. private:
  54. void populateMIMECombo();
  55. static void onCommitAny(LLUICtrl* ctrl, void* userdata);
  56. static void onCommitType(LLUICtrl* ctrl, void* userdata);
  57. static void onSetBtn(void* userdata);
  58. static void onResetBtn(void* userdata);
  59. private:
  60. LLLineEditor* mMediaURLEdit;
  61. LLLineEditor* mMediaDescEdit;
  62. LLComboBox* mMediaTypeCombo;
  63. LLButton* mSetURLButton;
  64. LLButton* mResetURLButton;
  65. LLSpinCtrl* mMediaResetCtrl;
  66. LLSpinCtrl* mMediaHeightCtrl;
  67. LLSpinCtrl* mMediaWidthCtrl;
  68. LLTextureCtrl* mMediaTextureCtrl;
  69. LLCheckBoxCtrl* mMediaAutoScaleCheck;
  70. LLCheckBoxCtrl* mMediaLoopCheck;
  71. LLCheckBoxCtrl* mCheckObscureMOAP;
  72. LLRadioGroup* mRadioNavigateControl;
  73. LLHandle<LLFloater> mURLEntryFloater;
  74. LLSafeHandle<LLParcelSelection>& mParcel;
  75. };
  76. #endif