PageRenderTime 36ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llpanelmediasettingsgeneral.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 100 lines | 50 code | 17 blank | 33 comment | 0 complexity | 8ca737df8b515e4430efce7d0f7fce07 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpanelmediasettingsgeneral.h
  3. * @brief LLPanelMediaSettingsGeneral class definition
  4. *
  5. * $LicenseInfo:firstyear=2007&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, 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_LLPANELMEDIAMEDIASETTINGSGENERAL_H
  27. #define LL_LLPANELMEDIAMEDIASETTINGSGENERAL_H
  28. #include "llpanel.h"
  29. class LLButton;
  30. class LLCheckBoxCtrl;
  31. class LLLineEditor;
  32. class LLSpinCtrl;
  33. class LLTextureCtrl;
  34. class LLMediaCtrl;
  35. class LLTextBox;
  36. class LLFloaterMediaSettings;
  37. class LLPanelMediaSettingsGeneral : public LLPanel
  38. {
  39. public:
  40. LLPanelMediaSettingsGeneral();
  41. ~LLPanelMediaSettingsGeneral();
  42. // XXX TODO: put these into a common parent class?
  43. // Hook that the floater calls before applying changes from the panel
  44. void preApply();
  45. // Function that asks the panel to fill in values associated with the panel
  46. // 'include_tentative' means fill in tentative values as well, otherwise do not
  47. void getValues(LLSD &fill_me_in, bool include_tentative = true);
  48. // Hook that the floater calls after applying changes to the panel
  49. void postApply();
  50. BOOL postBuild();
  51. /*virtual*/ void draw();
  52. /*virtual*/ void onClose(bool app_quitting);
  53. void setParent( LLFloaterMediaSettings* parent );
  54. static void initValues( void* userdata, const LLSD& media_settings ,bool editable);
  55. static void clearValues( void* userdata, bool editable);
  56. // Navigates the current selected face to the Home URL.
  57. // If 'only_if_current_is_empty' is "true", it only performs
  58. // the operation if: 1) the current URL is empty, and 2) auto play is true.
  59. bool navigateHomeSelectedFace(bool only_if_current_is_empty);
  60. void updateMediaPreview();
  61. const std::string getHomeUrl();
  62. protected:
  63. LLFloaterMediaSettings* mParent;
  64. bool mMediaEditable;
  65. private:
  66. void updateCurrentUrl();
  67. static void onBtnResetCurrentUrl(LLUICtrl* ctrl, void *userdata);
  68. static void onCommitHomeURL(LLUICtrl* ctrl, void *userdata );
  69. static bool isMultiple();
  70. void checkHomeUrlPassesWhitelist();
  71. LLCheckBoxCtrl* mAutoLoop;
  72. LLCheckBoxCtrl* mFirstClick;
  73. LLCheckBoxCtrl* mAutoZoom;
  74. LLCheckBoxCtrl* mAutoPlay;
  75. LLCheckBoxCtrl* mAutoScale;
  76. LLSpinCtrl* mWidthPixels;
  77. LLSpinCtrl* mHeightPixels;
  78. LLLineEditor* mHomeURL;
  79. LLTextBox* mCurrentURL;
  80. LLMediaCtrl* mPreviewMedia;
  81. LLTextBox* mFailWhiteListText;
  82. };
  83. #endif // LL_LLPANELMEDIAMEDIASETTINGSGENERAL_H