diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelmediahud.h | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelmediahud.h b/linden/indra/newview/llpanelmediahud.h new file mode 100644 index 0000000..5f12ebc --- /dev/null +++ b/linden/indra/newview/llpanelmediahud.h | |||
@@ -0,0 +1,110 @@ | |||
1 | /** | ||
2 | * @file llpanelmediahud.h | ||
3 | * @brief Media hud 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_PANELMEDIAHUD_H | ||
34 | #define LL_PANELMEDIAHUD_H | ||
35 | |||
36 | #include "llpanel.h" | ||
37 | #include "llviewermedia.h" | ||
38 | |||
39 | class LLCoordWindow; | ||
40 | class LLViewerMediaImpl; | ||
41 | |||
42 | class LLPanelMediaHUD : public LLPanel | ||
43 | { | ||
44 | public: | ||
45 | LLPanelMediaHUD(viewer_media_t media_impl); | ||
46 | virtual ~LLPanelMediaHUD(); | ||
47 | /*virtual*/ BOOL postBuild(); | ||
48 | virtual void draw(); | ||
49 | virtual void setAlpha(F32 alpha); | ||
50 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | ||
51 | void updateShape(); | ||
52 | bool isMouseOver(); | ||
53 | void setMediaFocus(bool b) { mMediaFocus = b; } | ||
54 | void nextZoomLevel(); | ||
55 | void resetZoomLevel() { mCurrentZoom = ZOOM_NONE; } | ||
56 | |||
57 | LLHandle<LLPanelMediaHUD> getHandle() const { return mPanelHandle; } | ||
58 | void setMediaImpl(viewer_media_t media_impl) { mMediaImpl = media_impl; } | ||
59 | |||
60 | |||
61 | enum EZoomLevel | ||
62 | { | ||
63 | ZOOM_NONE = 0, | ||
64 | ZOOM_MEDIUM = 1, | ||
65 | ZOOM_END | ||
66 | }; | ||
67 | enum EScrollDir | ||
68 | { | ||
69 | SCROLL_UP = 0, | ||
70 | SCROLL_DOWN, | ||
71 | SCROLL_LEFT, | ||
72 | SCROLL_RIGHT, | ||
73 | SCROLL_NONE | ||
74 | }; | ||
75 | |||
76 | private: | ||
77 | static void onClickClose(void* user_data); | ||
78 | static void onClickBack(void* user_data); | ||
79 | static void onClickForward(void* user_data); | ||
80 | static void onClickHome(void* user_data); | ||
81 | static void onClickOpen(void* user_data); | ||
82 | static void onClickReload(void* user_data); | ||
83 | static void onClickPlay(void* user_data); | ||
84 | static void onClickPause(void* user_data); | ||
85 | static void onClickStop(void* user_data); | ||
86 | static void onClickZoom(void* user_data); | ||
87 | static void onScrollUp(void* user_data); | ||
88 | static void onScrollUpHeld(void* user_data); | ||
89 | static void onScrollLeft(void* user_data); | ||
90 | static void onScrollLeftHeld(void* user_data); | ||
91 | static void onScrollRight(void* user_data); | ||
92 | static void onScrollRightHeld(void* user_data); | ||
93 | static void onScrollDown(void* user_data); | ||
94 | static void onScrollDownHeld(void* user_data); | ||
95 | static void onScrollStop(void* user_data); | ||
96 | |||
97 | bool mMediaFocus; | ||
98 | LLMatrix4 mLastCameraMat; | ||
99 | EZoomLevel mCurrentZoom; | ||
100 | EScrollDir mScrollState; | ||
101 | LLCoordWindow mLastCursorPos; | ||
102 | LLFrameTimer mMouseMoveTimer; | ||
103 | LLFrameTimer mFadeTimer; | ||
104 | F32 mMouseInactiveTime; | ||
105 | F32 mControlFadeTime; | ||
106 | viewer_media_t mMediaImpl; | ||
107 | LLRootHandle<LLPanelMediaHUD> mPanelHandle; | ||
108 | }; | ||
109 | |||
110 | #endif // LL_PANELMEDIAHUD_H | ||