PageRenderTime 30ms CodeModel.GetById 14ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llfloatermediabrowser.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 86 lines | 46 code | 14 blank | 26 comment | 0 complexity | a9231f81acf063a3bd6e5e64241ffa74 MD5 | raw file
 1/** 
 2 * @file llfloatermediabrowser.h
 3 * @brief media browser floater - uses embedded media browser control
 4 *
 5 * $LicenseInfo:firstyear=2006&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_LLFLOATERMEDIABROWSER_H
28#define LL_LLFLOATERMEDIABROWSER_H
29
30#include "llfloater.h"
31#include "llmediactrl.h"
32
33
34class LLComboBox;
35class LLMediaCtrl;
36class LLNotification;
37
38class LLFloaterMediaBrowser : 
39	public LLFloater, 
40	public LLViewerMediaObserver
41{
42public:
43    LOG_CLASS(LLFloaterMediaBrowser);
44	LLFloaterMediaBrowser(const LLSD& key);
45
46	static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null);
47
48	static void closeRequest(const std::string &uuid);
49	static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height);
50	void geometryChanged(S32 x, S32 y, S32 width, S32 height);
51	
52	/*virtual*/ BOOL postBuild();
53	/*virtual*/ void onClose(bool app_quitting);
54	/*virtual*/ void draw();
55
56	// inherited from LLViewerMediaObserver
57	/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
58
59	void openMedia(const std::string& media_url, const std::string& target);
60	void buildURLHistory();
61	std::string getSupportURL();
62	void setCurrentURL(const std::string& url);
63
64	static void onEnterAddress(LLUICtrl* ctrl, void* user_data);
65	static void onClickRefresh(void* user_data);
66	static void onClickBack(void* user_data);
67	static void onClickForward(void* user_data);
68	static void onClickGo(void* user_data);
69	static void onClickClose(void* user_data);
70	static void onClickOpenWebBrowser(void* user_data);
71	static void onClickAssign(void* user_data);
72	static void onClickRewind(void* user_data);
73	static void onClickPlay(void* user_data);
74	static void onClickStop(void* user_data);
75	static void onClickSeek(void* user_data);
76
77private:
78	LLMediaCtrl* mBrowser;
79	LLComboBox* mAddressCombo;
80	std::string mCurrentURL;
81	boost::shared_ptr<LLNotification> mCurNotification;
82	std::string mUUID;
83};
84
85#endif  // LL_LLFLOATERMEDIABROWSER_H
86