PageRenderTime 278ms CodeModel.GetById 115ms app.highlight 6ms RepoModel.GetById 155ms 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
  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
 27#ifndef LL_LLPANELMEDIAMEDIASETTINGSGENERAL_H
 28#define LL_LLPANELMEDIAMEDIASETTINGSGENERAL_H
 29
 30#include "llpanel.h"
 31
 32class LLButton;
 33class LLCheckBoxCtrl;
 34class LLLineEditor;
 35class LLSpinCtrl;
 36class LLTextureCtrl;
 37class LLMediaCtrl;
 38class LLTextBox;
 39class LLFloaterMediaSettings;
 40
 41class LLPanelMediaSettingsGeneral : public LLPanel
 42{
 43public:
 44	LLPanelMediaSettingsGeneral();
 45	~LLPanelMediaSettingsGeneral();
 46	
 47	// XXX TODO: put these into a common parent class?
 48	// Hook that the floater calls before applying changes from the panel
 49	void preApply();
 50	// Function that asks the panel to fill in values associated with the panel
 51	// 'include_tentative' means fill in tentative values as well, otherwise do not
 52	void getValues(LLSD &fill_me_in, bool include_tentative = true);
 53	// Hook that the floater calls after applying changes to the panel
 54	void postApply();
 55	
 56	BOOL postBuild();
 57	/*virtual*/ void draw();
 58	/*virtual*/ void onClose(bool app_quitting);
 59
 60	void setParent( LLFloaterMediaSettings* parent );
 61	static void initValues( void* userdata, const LLSD& media_settings ,bool editable);
 62	static void clearValues( void* userdata, bool editable);
 63	
 64	// Navigates the current selected face to the Home URL.
 65	// If 'only_if_current_is_empty' is "true", it only performs
 66	// the operation if: 1) the current URL is empty, and 2) auto play is true.
 67	bool navigateHomeSelectedFace(bool only_if_current_is_empty);
 68	
 69	void updateMediaPreview();
 70
 71	const std::string getHomeUrl();
 72	
 73protected:
 74	LLFloaterMediaSettings* mParent;
 75	bool mMediaEditable;
 76
 77private:
 78	void updateCurrentUrl();
 79	
 80	static void onBtnResetCurrentUrl(LLUICtrl* ctrl, void *userdata);
 81	static void onCommitHomeURL(LLUICtrl* ctrl, void *userdata );
 82	
 83	static bool isMultiple();
 84
 85	void checkHomeUrlPassesWhitelist();
 86
 87	LLCheckBoxCtrl* mAutoLoop;
 88	LLCheckBoxCtrl* mFirstClick;
 89	LLCheckBoxCtrl* mAutoZoom;
 90	LLCheckBoxCtrl* mAutoPlay;
 91	LLCheckBoxCtrl* mAutoScale;
 92	LLSpinCtrl* mWidthPixels;
 93	LLSpinCtrl* mHeightPixels;
 94	LLLineEditor* mHomeURL;
 95	LLTextBox* mCurrentURL;
 96	LLMediaCtrl* mPreviewMedia;
 97	LLTextBox* mFailWhiteListText;
 98};
 99
100#endif  // LL_LLPANELMEDIAMEDIASETTINGSGENERAL_H