llpanelobject.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLPANELOBJECT_H
00033 #define LL_LLPANELOBJECT_H
00034 
00035 #include "v3math.h"
00036 #include "llpanel.h"
00037 #include "llmemory.h"
00038 #include "llvolume.h"
00039 
00040 class LLSpinCtrl;
00041 class LLCheckBoxCtrl;
00042 class LLTextBox;
00043 class LLUICtrl;
00044 class LLButton;
00045 class LLViewerObject;
00046 class LLComboBox;
00047 class LLPanelInventory;
00048 class LLColorSwatchCtrl;
00049 class LLTextureCtrl;
00050 class LLInventoryItem;
00051 class LLUUID;
00052 
00053 class LLPanelObject : public LLPanel
00054 {
00055 public:
00056         LLPanelObject(const std::string& name);
00057         virtual ~LLPanelObject();
00058 
00059         virtual BOOL    postBuild();
00060         virtual void    draw();
00061         virtual void    clearCtrls();
00062 
00063         void                    refresh();
00064 
00065         static BOOL             precommitValidate(LLUICtrl* ctrl,void* userdata);
00066         
00067         static void             onCommitLock(LLUICtrl *ctrl, void *data);
00068         static void     onCommitPosition(               LLUICtrl* ctrl, void* userdata);
00069         static void     onCommitScale(                  LLUICtrl* ctrl, void* userdata);
00070         static void     onCommitRotation(               LLUICtrl* ctrl, void* userdata);
00071         static void     onCommitPhysics(                LLUICtrl* ctrl, void* userdata);
00072         static void     onCommitTemporary(              LLUICtrl* ctrl, void* userdata);
00073         static void     onCommitPhantom(                LLUICtrl* ctrl, void* userdata);
00074         static void     onCommitCastShadows(    LLUICtrl* ctrl, void* userdata);
00075 
00076         static void     onCommitParametric(LLUICtrl* ctrl, void* userdata);
00077 
00078         static void     onCommitMaterial(               LLUICtrl* ctrl, void* userdata);
00079 
00080         static void     onCommitSculpt(        LLUICtrl* ctrl, void* userdata);
00081         static void     onCancelSculpt(        LLUICtrl* ctrl, void* userdata);
00082         static void     onSelectSculpt(        LLUICtrl* ctrl, void* userdata);
00083         static BOOL     onDropSculpt(          LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
00084         static void     onCommitSculptType(    LLUICtrl *ctrl, void* userdata);
00085                 
00086         
00087 protected:
00088         void                    getState();
00089 
00090         void                    sendRotation();
00091         void                    sendScale();
00092         void                    sendPosition();
00093         void                    sendIsPhysical();
00094         void                    sendIsTemporary();
00095         void                    sendIsPhantom();
00096         void                    sendCastShadows();
00097         void            sendSculpt();
00098         
00099         void                    getVolumeParams(LLVolumeParams& volume_params);
00100         
00101 protected:
00102         S32                             mComboMaterialItemCount;
00103 
00104         LLTextBox*              mLabelMaterial;
00105         LLComboBox*             mComboMaterial;
00106         
00107         // Per-object options
00108         LLTextBox*              mLabelBaseType;
00109         LLComboBox*             mComboBaseType;
00110 
00111         LLTextBox*              mLabelCut;
00112         LLSpinCtrl*             mSpinCutBegin;
00113         LLSpinCtrl*             mSpinCutEnd;
00114 
00115         LLTextBox*              mLabelHollow;
00116         LLSpinCtrl*             mSpinHollow;
00117 
00118         LLTextBox*              mLabelHoleType;
00119         LLComboBox*             mComboHoleType;
00120 
00121         LLTextBox*              mLabelTwist;
00122         LLSpinCtrl*             mSpinTwist;
00123         LLSpinCtrl*             mSpinTwistBegin;
00124 
00125         LLSpinCtrl*             mSpinScaleX;
00126         LLSpinCtrl*             mSpinScaleY;
00127         
00128         LLTextBox*              mLabelSkew;
00129         LLSpinCtrl*             mSpinSkew;
00130 
00131         LLTextBox*              mLabelShear;
00132         LLSpinCtrl*             mSpinShearX;
00133         LLSpinCtrl*             mSpinShearY;
00134 
00135         // Advanced Path
00136         LLSpinCtrl*             mCtrlPathBegin;
00137         LLSpinCtrl*             mCtrlPathEnd;
00138 
00139         LLTextBox*              mLabelTaper;
00140         LLSpinCtrl*             mSpinTaperX;
00141         LLSpinCtrl*             mSpinTaperY;
00142 
00143         LLTextBox*              mLabelRadiusOffset;
00144         LLSpinCtrl*             mSpinRadiusOffset;
00145 
00146         LLTextBox*              mLabelRevolutions;
00147         LLSpinCtrl*             mSpinRevolutions;
00148 
00149         LLTextBox*              mLabelPosition;
00150         LLSpinCtrl*             mCtrlPosX;
00151         LLSpinCtrl*             mCtrlPosY;
00152         LLSpinCtrl*             mCtrlPosZ;
00153 
00154         LLTextBox*              mLabelSize;
00155         LLSpinCtrl*             mCtrlScaleX;
00156         LLSpinCtrl*             mCtrlScaleY;
00157         LLSpinCtrl*             mCtrlScaleZ;
00158 
00159         LLTextBox*              mLabelRotation;
00160         LLSpinCtrl*             mCtrlRotX;
00161         LLSpinCtrl*             mCtrlRotY;
00162         LLSpinCtrl*             mCtrlRotZ;
00163 
00164         LLCheckBoxCtrl  *mCheckLock;
00165         LLCheckBoxCtrl  *mCheckPhysics;
00166         LLCheckBoxCtrl  *mCheckTemporary;
00167         LLCheckBoxCtrl  *mCheckPhantom;
00168         LLCheckBoxCtrl  *mCheckCastShadows;
00169 
00170         LLTextureCtrl   *mCtrlSculptTexture;
00171         LLTextBox       *mLabelSculptType;
00172         LLComboBox      *mCtrlSculptType;
00173         
00174         LLVector3               mCurEulerDegrees;               // to avoid sending rotation when not changed
00175         BOOL                    mIsPhysical;                    // to avoid sending "physical" when not changed
00176         BOOL                    mIsTemporary;                   // to avoid sending "temporary" when not changed
00177         BOOL                    mIsPhantom;                             // to avoid sending "phantom" when not changed
00178         BOOL                    mCastShadows;                   // to avoid sending "cast shadows" when not changed
00179         S32                             mSelectedType;                  // So we know what selected type we last were
00180 
00181         LLUUID          mSculptTextureRevert;   // so we can revert the sculpt texture on cancel
00182         U8              mSculptTypeRevert;      // so we can revert the sculpt type on cancel
00183         
00184         LLPointer<LLViewerObject> mObject;
00185         LLPointer<LLViewerObject> mRootObject;
00186 };
00187 
00188 #endif

Generated on Fri May 16 08:33:55 2008 for SecondLife by  doxygen 1.5.5