aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermediafocus.h
diff options
context:
space:
mode:
authorArmin Weatherwax2010-06-14 12:04:49 +0200
committerArmin Weatherwax2010-09-23 15:38:25 +0200
commit35df5441d3e2789663532c948731aff3a1e04728 (patch)
treeac7674289784a5f96106ea507637055a8dada78a /linden/indra/newview/llviewermediafocus.h
parentChanged version to Experimental 2010.09.18 (diff)
downloadmeta-impy-35df5441d3e2789663532c948731aff3a1e04728.zip
meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.gz
meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.bz2
meta-impy-35df5441d3e2789663532c948731aff3a1e04728.tar.xz
llmediaplugins first step
Diffstat (limited to 'linden/indra/newview/llviewermediafocus.h')
-rw-r--r--linden/indra/newview/llviewermediafocus.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewermediafocus.h b/linden/indra/newview/llviewermediafocus.h
new file mode 100644
index 0000000..ed9597e
--- /dev/null
+++ b/linden/indra/newview/llviewermediafocus.h
@@ -0,0 +1,91 @@
1/**
2 * @file llpanelmsgs.h
3 * @brief Message popup preferences panel
4 *
5 * $LicenseInfo:firstyear=2003&license=viewergpl$
6 *
7 * Copyright (c) 2003-2009, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33#ifndef LL_VIEWERMEDIAFOCUS_H
34#define LL_VIEWERMEDIAFOCUS_H
35
36// includes for LLViewerMediaFocus
37#include "llfocusmgr.h"
38#include "llviewermedia.h"
39#include "llviewerobject.h"
40#include "llviewerwindow.h"
41#include "llselectmgr.h"
42
43class LLViewerMediaImpl;
44class LLPanelMediaHUD;
45
46class LLViewerMediaFocus :
47 public LLFocusableElement,
48 public LLSingleton<LLViewerMediaFocus>
49{
50public:
51 LLViewerMediaFocus();
52 ~LLViewerMediaFocus();
53
54 static void cleanupClass();
55
56 void setFocusFace(BOOL b, LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl);
57 void clearFocus() { setFocusFace(false, NULL, 0, NULL); }
58 /*virtual*/ bool getFocus();
59 /*virtual*/ // void onNavigateComplete( const EventType& event_in );
60
61 /*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
62 /*virtual*/ BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent);
63 BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
64
65 LLUUID getSelectedUUID();
66 LLObjectSelectionHandle getSelection() { return mFocus; }
67
68 void update();
69
70 void setCameraZoom(F32 padding_factor);
71 void setMouseOverFlag(bool b, viewer_media_t media_impl = NULL);
72 bool getMouseOverFlag() { return mMouseOverFlag; }
73 void setPickInfo(LLPickInfo pick_info) { mPickInfo = pick_info; }
74 F32 getBBoxAspectRatio(const LLBBox& bbox, const LLVector3& normal, F32* height, F32* width, F32* depth);
75
76protected:
77 /*virtual*/ void onFocusReceived();
78 /*virtual*/ void onFocusLost();
79
80private:
81 LLObjectSelectionHandle mFocus;
82 std::string mLastURL;
83 bool mMouseOverFlag;
84 LLPickInfo mPickInfo;
85 LLHandle<LLPanelMediaHUD> mMediaHUD;
86 LLUUID mObjectID;
87 viewer_media_t mMediaImpl;
88};
89
90
91#endif // LL_VIEWERMEDIAFOCUS_H