diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llfloaterimagepreview.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/llfloaterimagepreview.h')
-rw-r--r-- | linden/indra/newview/llfloaterimagepreview.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterimagepreview.h b/linden/indra/newview/llfloaterimagepreview.h new file mode 100644 index 0000000..a53cd88 --- /dev/null +++ b/linden/indra/newview/llfloaterimagepreview.h | |||
@@ -0,0 +1,102 @@ | |||
1 | /** | ||
2 | * @file llfloaterimagepreview.h | ||
3 | * @brief LLFloaterImagePreview class definition | ||
4 | * | ||
5 | * Copyright (c) 2004-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LLFLOATERIMAGEPREVIEW_H | ||
29 | #define LL_LLFLOATERIMAGEPREVIEW_H | ||
30 | |||
31 | #include "llfloaternamedesc.h" | ||
32 | #include "lldynamictexture.h" | ||
33 | #include "llquaternion.h" | ||
34 | |||
35 | class LLComboBox; | ||
36 | class LLJoint; | ||
37 | class LLViewerJointMesh; | ||
38 | class LLVOAvatar; | ||
39 | class LLTextBox; | ||
40 | |||
41 | class LLImagePreviewAvatar : public LLDynamicTexture | ||
42 | { | ||
43 | public: | ||
44 | LLImagePreviewAvatar(S32 width, S32 height); | ||
45 | virtual ~LLImagePreviewAvatar(); | ||
46 | |||
47 | void setPreviewTarget(const char* joint_name, const char *mesh_name, LLImageRaw* imagep, F32 distance, BOOL male); | ||
48 | void setTexture(U32 name) { mTextureName = name; } | ||
49 | |||
50 | BOOL render(); | ||
51 | void refresh(); | ||
52 | void rotate(F32 yaw_radians, F32 pitch_radians); | ||
53 | void zoom(F32 zoom_amt); | ||
54 | void pan(F32 right, F32 up); | ||
55 | virtual BOOL needsRender() { return mNeedsUpdate; } | ||
56 | |||
57 | protected: | ||
58 | BOOL mNeedsUpdate; | ||
59 | LLJoint* mTargetJoint; | ||
60 | LLViewerJointMesh* mTargetMesh; | ||
61 | F32 mCameraDistance; | ||
62 | F32 mCameraYaw; | ||
63 | F32 mCameraPitch; | ||
64 | F32 mCameraZoom; | ||
65 | LLVector3 mCameraOffset; | ||
66 | LLPointer<LLVOAvatar> mDummyAvatar; | ||
67 | U32 mTextureName; | ||
68 | }; | ||
69 | |||
70 | class LLFloaterImagePreview : public LLFloaterNameDesc | ||
71 | { | ||
72 | public: | ||
73 | LLFloaterImagePreview(const char* filename); | ||
74 | virtual ~LLFloaterImagePreview(); | ||
75 | |||
76 | virtual BOOL postBuild(); | ||
77 | |||
78 | BOOL handleMouseDown(S32 x, S32 y, MASK mask); | ||
79 | BOOL handleMouseUp(S32 x, S32 y, MASK mask); | ||
80 | BOOL handleHover(S32 x, S32 y, MASK mask); | ||
81 | BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | ||
82 | |||
83 | static void onMouseCaptureLost(LLMouseHandler*); | ||
84 | static void setUploadAmount(S32 amount) { sUploadAmount = amount; } | ||
85 | |||
86 | protected: | ||
87 | static void onPreviewTypeCommit(LLUICtrl*,void*); | ||
88 | void draw(); | ||
89 | bool loadImage(const char* filename); | ||
90 | |||
91 | LLPointer<LLImageRaw> mRawImagep; | ||
92 | LLImagePreviewAvatar* mAvatarPreview; | ||
93 | S32 mLastMouseX; | ||
94 | S32 mLastMouseY; | ||
95 | LLRect mPreviewRect; | ||
96 | LLRectf mPreviewImageRect; | ||
97 | GLuint mGLName; | ||
98 | |||
99 | static S32 sUploadAmount; | ||
100 | }; | ||
101 | |||
102 | #endif // LL_LLFLOATERIMAGEPREVIEW_H | ||