diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelface.h | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelface.h b/linden/indra/newview/llpanelface.h new file mode 100644 index 0000000..c68e996 --- /dev/null +++ b/linden/indra/newview/llpanelface.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /** | ||
2 | * @file llpanelface.h | ||
3 | * @brief Panel in the tools floater for editing face textures, colors, etc. | ||
4 | * | ||
5 | * Copyright (c) 2001-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_LLPANELFACE_H | ||
29 | #define LL_LLPANELFACE_H | ||
30 | |||
31 | #include "v4color.h" | ||
32 | #include "llpanel.h" | ||
33 | |||
34 | class LLButton; | ||
35 | class LLCheckBoxCtrl; | ||
36 | class LLColorSwatchCtrl; | ||
37 | class LLComboBox; | ||
38 | class LLInventoryItem; | ||
39 | class LLLineEditor; | ||
40 | class LLSpinCtrl; | ||
41 | class LLTextBox; | ||
42 | class LLTextureCtrl; | ||
43 | class LLUICtrl; | ||
44 | class LLViewerObject; | ||
45 | |||
46 | class LLPanelFace : public LLPanel | ||
47 | { | ||
48 | public: | ||
49 | virtual BOOL postBuild(); | ||
50 | LLPanelFace(const std::string& name); | ||
51 | virtual ~LLPanelFace(); | ||
52 | |||
53 | void refresh(); | ||
54 | |||
55 | protected: | ||
56 | // Given a callback function that returns an F32, figures out | ||
57 | // if that F32 is the same for all selected faces. "value" | ||
58 | // contains the identical value, or the first object's value. | ||
59 | BOOL allFacesSameValue( F32 (get_face_value(LLViewerObject*, S32)), F32 *value); | ||
60 | |||
61 | void getState(); | ||
62 | |||
63 | void sendTexture(); // applies and sends texture | ||
64 | void sendTextureInfo(); // applies and sends texture scale, offset, etc. | ||
65 | void sendColor(); // applies and sends color | ||
66 | void sendAlpha(); // applies and sends transparency | ||
67 | void sendBump(); // applies and sends bump map | ||
68 | void sendTexGen(); // applies and sends bump map | ||
69 | void sendShiny(); // applies and sends shininess | ||
70 | void sendFullbright(); // applies and sends full bright | ||
71 | |||
72 | // this function is to return TRUE if the dra should succeed. | ||
73 | static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item, void* ud); | ||
74 | |||
75 | static void onCommitTexture( LLUICtrl* ctrl, void* userdata); | ||
76 | static void onCancelTexture( LLUICtrl* ctrl, void* userdata); | ||
77 | static void onSelectTexture( LLUICtrl* ctrl, void* userdata); | ||
78 | static void onCommitTextureInfo( LLUICtrl* ctrl, void* userdata); | ||
79 | static void onCommitColor( LLUICtrl* ctrl, void* userdata); | ||
80 | static void onCommitAlpha( LLUICtrl* ctrl, void* userdata); | ||
81 | static void onCancelColor( LLUICtrl* ctrl, void* userdata); | ||
82 | static void onSelectColor( LLUICtrl* ctrl, void* userdata); | ||
83 | static void onCommitBump( LLUICtrl* ctrl, void* userdata); | ||
84 | static void onCommitTexGen( LLUICtrl* ctrl, void* userdata); | ||
85 | static void onCommitShiny( LLUICtrl* ctrl, void* userdata); | ||
86 | static void onCommitFullbright( LLUICtrl* ctrl, void* userdata); | ||
87 | |||
88 | static void onClickApply(void*); | ||
89 | static void onClickAutoFix(void*); | ||
90 | |||
91 | static F32 valueScaleS(LLViewerObject* object, S32 face); | ||
92 | static F32 valueScaleT(LLViewerObject* object, S32 face); | ||
93 | static F32 valueOffsetS(LLViewerObject* object, S32 face); | ||
94 | static F32 valueOffsetT(LLViewerObject* object, S32 face); | ||
95 | static F32 valueTexRotation(LLViewerObject* object, S32 face); | ||
96 | static F32 valueRepeatsPerMeter(LLViewerObject* object, S32 face); | ||
97 | static F32 valueBump(LLViewerObject* object, S32 face); | ||
98 | static F32 valueTexGen(LLViewerObject* object, S32 face); | ||
99 | static F32 valueShiny(LLViewerObject* object, S32 face); | ||
100 | static F32 valueFullbright(LLViewerObject* object, S32 face); | ||
101 | }; | ||
102 | |||
103 | #endif | ||