PageRenderTime 404ms CodeModel.GetById 181ms app.highlight 7ms RepoModel.GetById 215ms app.codeStats 0ms

/indra/newview/llpanelface.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 96 lines | 57 code | 13 blank | 26 comment | 0 complexity | 6198a71761e8d7a6e00b42e8703c2d1f MD5 | raw file
 1/** 
 2 * @file llpanelface.h
 3 * @brief Panel in the tools floater for editing face textures, colors, etc.
 4 *
 5 * $LicenseInfo:firstyear=2001&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_LLPANELFACE_H
28#define LL_LLPANELFACE_H
29
30#include "v4color.h"
31#include "llpanel.h"
32
33class LLButton;
34class LLCheckBoxCtrl;
35class LLColorSwatchCtrl;
36class LLComboBox;
37class LLInventoryItem;
38class LLLineEditor;
39class LLSpinCtrl;
40class LLTextBox;
41class LLTextureCtrl;
42class LLUICtrl;
43class LLViewerObject;
44class LLFloater;
45
46class LLPanelFace : public LLPanel
47{
48public:
49	virtual BOOL	postBuild();
50	LLPanelFace();
51	virtual ~LLPanelFace();
52
53	void			refresh();
54	void			setMediaURL(const std::string& url);
55	void			setMediaType(const std::string& mime_type);
56
57protected:
58	void			getState();
59
60	void			sendTexture();			// applies and sends texture
61	void			sendTextureInfo();		// applies and sends texture scale, offset, etc.
62	void			sendColor();			// applies and sends color
63	void			sendAlpha();			// applies and sends transparency
64	void			sendBump();				// applies and sends bump map
65	void			sendTexGen();				// applies and sends bump map
66	void			sendShiny();			// applies and sends shininess
67	void			sendFullbright();		// applies and sends full bright
68	void            sendGlow();
69	void			sendMedia();
70
71	// this function is to return TRUE if the drag should succeed.
72	static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item);
73
74	void 	onCommitTexture(const LLSD& data);
75	void 	onCancelTexture(const LLSD& data);
76	void 	onSelectTexture(const LLSD& data);
77	void 	onCommitColor(const LLSD& data);
78	void 	onCommitAlpha(const LLSD& data);
79	void 	onCancelColor(const LLSD& data);
80	void 	onSelectColor(const LLSD& data);
81	
82	static 	void onCommitTextureInfo( 		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	static void     onCommitGlow(           LLUICtrl* ctrl, void *userdata);
88	static void		onCommitPlanarAlign(	LLUICtrl* ctrl, void* userdata);
89	
90	static void		onClickApply(void*);
91	static void		onClickAutoFix(void*);
92	static F32      valueGlow(LLViewerObject* object, S32 face);
93
94};
95
96#endif