PageRenderTime 37ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llpanelobject.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 178 lines | 114 code | 37 blank | 27 comment | 0 complexity | e3c1905ce668c4954014753523366745 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpanelobject.h
  3. * @brief Object editing (position, scale, etc.) in the tools floater
  4. *
  5. * $LicenseInfo:firstyear=2004&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_LLPANELOBJECT_H
  27. #define LL_LLPANELOBJECT_H
  28. #include "v3math.h"
  29. #include "llpanel.h"
  30. #include "llpointer.h"
  31. #include "llvolume.h"
  32. class LLSpinCtrl;
  33. class LLCheckBoxCtrl;
  34. class LLTextBox;
  35. class LLUICtrl;
  36. class LLButton;
  37. class LLViewerObject;
  38. class LLComboBox;
  39. class LLColorSwatchCtrl;
  40. class LLTextureCtrl;
  41. class LLInventoryItem;
  42. class LLUUID;
  43. class LLPanelObject : public LLPanel
  44. {
  45. public:
  46. LLPanelObject();
  47. virtual ~LLPanelObject();
  48. virtual BOOL postBuild();
  49. virtual void draw();
  50. virtual void clearCtrls();
  51. void refresh();
  52. static bool precommitValidate(const LLSD& data);
  53. static void onCommitLock(LLUICtrl *ctrl, void *data);
  54. static void onCommitPosition( LLUICtrl* ctrl, void* userdata);
  55. static void onCommitScale( LLUICtrl* ctrl, void* userdata);
  56. static void onCommitRotation( LLUICtrl* ctrl, void* userdata);
  57. static void onCommitTemporary( LLUICtrl* ctrl, void* userdata);
  58. static void onCommitPhantom( LLUICtrl* ctrl, void* userdata);
  59. static void onCommitCastShadows( LLUICtrl* ctrl, void* userdata);
  60. static void onCommitPhysics( LLUICtrl* ctrl, void* userdata);
  61. static void onCommitParametric(LLUICtrl* ctrl, void* userdata);
  62. void onCommitSculpt(const LLSD& data);
  63. void onCancelSculpt(const LLSD& data);
  64. void onSelectSculpt(const LLSD& data);
  65. BOOL onDropSculpt(LLInventoryItem* item);
  66. static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
  67. protected:
  68. void getState();
  69. void sendRotation(BOOL btn_down);
  70. void sendScale(BOOL btn_down);
  71. void sendPosition(BOOL btn_down);
  72. void sendIsPhysical();
  73. void sendIsTemporary();
  74. void sendIsPhantom();
  75. void sendCastShadows();
  76. void sendSculpt();
  77. void getVolumeParams(LLVolumeParams& volume_params);
  78. protected:
  79. // Per-object options
  80. LLComboBox* mComboBaseType;
  81. LLTextBox* mLabelCut;
  82. LLSpinCtrl* mSpinCutBegin;
  83. LLSpinCtrl* mSpinCutEnd;
  84. LLTextBox* mLabelHollow;
  85. LLSpinCtrl* mSpinHollow;
  86. LLTextBox* mLabelHoleType;
  87. LLComboBox* mComboHoleType;
  88. LLTextBox* mLabelTwist;
  89. LLSpinCtrl* mSpinTwist;
  90. LLSpinCtrl* mSpinTwistBegin;
  91. LLSpinCtrl* mSpinScaleX;
  92. LLSpinCtrl* mSpinScaleY;
  93. LLTextBox* mLabelSkew;
  94. LLSpinCtrl* mSpinSkew;
  95. LLTextBox* mLabelShear;
  96. LLSpinCtrl* mSpinShearX;
  97. LLSpinCtrl* mSpinShearY;
  98. // Advanced Path
  99. LLSpinCtrl* mCtrlPathBegin;
  100. LLSpinCtrl* mCtrlPathEnd;
  101. LLTextBox* mLabelTaper;
  102. LLSpinCtrl* mSpinTaperX;
  103. LLSpinCtrl* mSpinTaperY;
  104. LLTextBox* mLabelRadiusOffset;
  105. LLSpinCtrl* mSpinRadiusOffset;
  106. LLTextBox* mLabelRevolutions;
  107. LLSpinCtrl* mSpinRevolutions;
  108. LLTextBox* mLabelPosition;
  109. LLSpinCtrl* mCtrlPosX;
  110. LLSpinCtrl* mCtrlPosY;
  111. LLSpinCtrl* mCtrlPosZ;
  112. LLTextBox* mLabelSize;
  113. LLSpinCtrl* mCtrlScaleX;
  114. LLSpinCtrl* mCtrlScaleY;
  115. LLSpinCtrl* mCtrlScaleZ;
  116. LLTextBox* mLabelRotation;
  117. LLSpinCtrl* mCtrlRotX;
  118. LLSpinCtrl* mCtrlRotY;
  119. LLSpinCtrl* mCtrlRotZ;
  120. LLCheckBoxCtrl *mCheckLock;
  121. LLCheckBoxCtrl *mCheckPhysics;
  122. LLCheckBoxCtrl *mCheckTemporary;
  123. LLCheckBoxCtrl *mCheckPhantom;
  124. LLCheckBoxCtrl *mCheckCastShadows;
  125. LLTextureCtrl *mCtrlSculptTexture;
  126. LLTextBox *mLabelSculptType;
  127. LLComboBox *mCtrlSculptType;
  128. LLCheckBoxCtrl *mCtrlSculptMirror;
  129. LLCheckBoxCtrl *mCtrlSculptInvert;
  130. LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
  131. BOOL mIsPhysical; // to avoid sending "physical" when not changed
  132. BOOL mIsTemporary; // to avoid sending "temporary" when not changed
  133. BOOL mIsPhantom; // to avoid sending "phantom" when not changed
  134. BOOL mCastShadows; // to avoid sending "cast shadows" when not changed
  135. S32 mSelectedType; // So we know what selected type we last were
  136. LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel
  137. U8 mSculptTypeRevert; // so we can revert the sculpt type on cancel
  138. LLPointer<LLViewerObject> mObject;
  139. LLPointer<LLViewerObject> mRootObject;
  140. };
  141. #endif