PageRenderTime 37ms CodeModel.GetById 15ms RepoModel.GetById 1ms 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
Possible License(s): LGPL-2.1
  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. #ifndef LL_LLPANELFACE_H
  27. #define LL_LLPANELFACE_H
  28. #include "v4color.h"
  29. #include "llpanel.h"
  30. class LLButton;
  31. class LLCheckBoxCtrl;
  32. class LLColorSwatchCtrl;
  33. class LLComboBox;
  34. class LLInventoryItem;
  35. class LLLineEditor;
  36. class LLSpinCtrl;
  37. class LLTextBox;
  38. class LLTextureCtrl;
  39. class LLUICtrl;
  40. class LLViewerObject;
  41. class LLFloater;
  42. class LLPanelFace : public LLPanel
  43. {
  44. public:
  45. virtual BOOL postBuild();
  46. LLPanelFace();
  47. virtual ~LLPanelFace();
  48. void refresh();
  49. void setMediaURL(const std::string& url);
  50. void setMediaType(const std::string& mime_type);
  51. protected:
  52. void getState();
  53. void sendTexture(); // applies and sends texture
  54. void sendTextureInfo(); // applies and sends texture scale, offset, etc.
  55. void sendColor(); // applies and sends color
  56. void sendAlpha(); // applies and sends transparency
  57. void sendBump(); // applies and sends bump map
  58. void sendTexGen(); // applies and sends bump map
  59. void sendShiny(); // applies and sends shininess
  60. void sendFullbright(); // applies and sends full bright
  61. void sendGlow();
  62. void sendMedia();
  63. // this function is to return TRUE if the drag should succeed.
  64. static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item);
  65. void onCommitTexture(const LLSD& data);
  66. void onCancelTexture(const LLSD& data);
  67. void onSelectTexture(const LLSD& data);
  68. void onCommitColor(const LLSD& data);
  69. void onCommitAlpha(const LLSD& data);
  70. void onCancelColor(const LLSD& data);
  71. void onSelectColor(const LLSD& data);
  72. static void onCommitTextureInfo( LLUICtrl* ctrl, void* userdata);
  73. static void onCommitBump( LLUICtrl* ctrl, void* userdata);
  74. static void onCommitTexGen( LLUICtrl* ctrl, void* userdata);
  75. static void onCommitShiny( LLUICtrl* ctrl, void* userdata);
  76. static void onCommitFullbright( LLUICtrl* ctrl, void* userdata);
  77. static void onCommitGlow( LLUICtrl* ctrl, void *userdata);
  78. static void onCommitPlanarAlign( LLUICtrl* ctrl, void* userdata);
  79. static void onClickApply(void*);
  80. static void onClickAutoFix(void*);
  81. static F32 valueGlow(LLViewerObject* object, S32 face);
  82. };
  83. #endif