llfloatertools.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLFLOATERTOOLS_H
00033 #define LL_LLFLOATERTOOLS_H
00034 
00035 #include "llfloater.h"
00036 #include "llcoord.h"
00037 
00038 class LLButton;
00039 class LLTextBox;
00040 class LLTool;
00041 class LLCheckBoxCtrl;
00042 class LLTabContainer;
00043 class LLPanelPermissions;
00044 class LLPanelObject;
00045 class LLPanelVolume;
00046 class LLPanelContents;
00047 class LLPanelFace;
00048 class LLPanelLandInfo;
00049 class LLComboBox;
00050 class LLParcelSelection;
00051 class LLObjectSelection;
00052 
00053 typedef LLHandle<LLParcelSelection> LLParcelSelectionHandle;
00054 typedef LLHandle<LLObjectSelection> LLObjectSelectionHandle;
00055 
00056 class LLFloaterTools
00057 : public LLFloater
00058 {
00059 public:
00060         virtual BOOL    postBuild();
00061         static  void*   createPanelPermissions(void*    vdata);
00062         static  void*   createPanelObject(void* vdata);
00063         static  void*   createPanelVolume(void* vdata);
00064         static  void*   createPanelFace(void*   vdata);
00065         static  void*   createPanelContents(void*       vdata);
00066         static  void*   createPanelContentsInventory(void*      vdata);
00067         static  void*   createPanelLandInfo(void*       vdata);
00068 
00069         LLFloaterTools();
00070         virtual ~LLFloaterTools();
00071 
00072         virtual void onOpen();
00073         virtual void onClose(bool app_quitting);
00074         virtual BOOL canClose();
00075 
00076         // call this once per frame to handle visibility, rect location,
00077         // button highlights, etc.
00078         void updatePopup(LLCoordGL center, MASK mask);
00079 
00080         // When the floater is going away, reset any options that need to be 
00081         // cleared.
00082         void resetToolState();
00083 
00084         enum EInfoPanel
00085         {
00086                 PANEL_GENERAL=0,
00087                 PANEL_OBJECT,
00088                 PANEL_FEATURES,
00089                 PANEL_FACE,
00090                 PANEL_CONTENTS,
00091                 PANEL_COUNT
00092         };
00093 
00094         /*virtual*/  void draw();
00095 
00096         void dirty();
00097         void showMore(BOOL show_more);
00098         void showPanel(EInfoPanel panel);
00099 
00100         void setStatusText(const std::string& text);
00101         virtual void onFocusReceived();
00102         static void setEditTool(void* data);
00103         void saveLastTool();
00104 private:
00105         static void setObjectType( void* data );
00106         
00107         void refresh();
00108 
00109         static void onClickGridOptions(void* data);
00110 
00111 public:
00112 
00113         LLButton                *mBtnFocus;
00114         LLButton                *mBtnMove;
00115         LLButton                *mBtnEdit;
00116         LLButton                *mBtnCreate;
00117         LLButton                *mBtnLand;
00118 
00119         LLTextBox               *mTextStatus;
00120 
00121         // Focus buttons
00122         LLCheckBoxCtrl  *mRadioOrbit;
00123         LLCheckBoxCtrl  *mRadioZoom;
00124         LLCheckBoxCtrl  *mRadioPan;
00125 
00126         // Move buttons
00127         LLCheckBoxCtrl  *mRadioMove;
00128         LLCheckBoxCtrl  *mRadioLift;
00129         LLCheckBoxCtrl  *mRadioSpin;
00130 
00131         // Edit buttons
00132         LLCheckBoxCtrl  *mRadioPosition;
00133         LLCheckBoxCtrl  *mRadioRotate;
00134         LLCheckBoxCtrl  *mRadioStretch;
00135         LLCheckBoxCtrl  *mRadioSelectFace;
00136 
00137         LLCheckBoxCtrl  *mCheckSelectIndividual;
00138 
00139         LLCheckBoxCtrl* mCheckSnapToGrid;
00140         LLButton*               mBtnGridOptions;
00141         LLTextBox*              mTextGridMode;
00142         LLComboBox*             mComboGridMode;
00143         LLCheckBoxCtrl* mCheckStretchUniform;
00144         LLCheckBoxCtrl* mCheckStretchTexture;
00145 
00146         LLButton        *mBtnRotateLeft;
00147         LLButton        *mBtnRotateReset;
00148         LLButton        *mBtnRotateRight;
00149 
00150         LLButton        *mBtnDelete;
00151         LLButton        *mBtnDuplicate;
00152         LLButton        *mBtnDuplicateInPlace;
00153 
00154         // Create buttons
00155         LLCheckBoxCtrl  *mCheckSticky;
00156         LLCheckBoxCtrl  *mCheckCopySelection;
00157         LLCheckBoxCtrl  *mCheckCopyCenters;
00158         LLCheckBoxCtrl  *mCheckCopyRotates;
00159 
00160         // Land buttons
00161 //      LLCheckBoxCtrl  *mRadioEditLand;
00162         LLCheckBoxCtrl  *mRadioSelectLand;
00163 
00164         LLCheckBoxCtrl  *mRadioDozerFlatten;
00165         LLCheckBoxCtrl  *mRadioDozerRaise;
00166         LLCheckBoxCtrl  *mRadioDozerLower;
00167         LLCheckBoxCtrl  *mRadioDozerSmooth;
00168         LLCheckBoxCtrl  *mRadioDozerNoise;
00169         LLCheckBoxCtrl  *mRadioDozerRevert;
00170 
00171         LLComboBox              *mComboDozerSize;
00172         LLButton                *mBtnApplyToSelection;
00173         LLCheckBoxCtrl  *mCheckShowOwners;
00174 
00175         std::vector<LLButton*>  mButtons;//[ 15 ];
00176 
00177         LLTabContainerCommon    *mTab;
00178         LLPanelPermissions              *mPanelPermissions;
00179         LLPanelObject                   *mPanelObject;
00180         LLPanelVolume                   *mPanelVolume;
00181         LLPanelContents                 *mPanelContents;
00182         LLPanelFace                             *mPanelFace;
00183         LLPanelLandInfo                 *mPanelLandInfo;
00184 
00185         LLTabContainer*                 mTabLand;
00186 
00187         LLParcelSelectionHandle mParcelSelection;
00188         LLObjectSelectionHandle mObjectSelection;
00189 
00190 private:
00191         BOOL                                    mDirty;
00192         S32                                             mSmallHeight;
00193         S32                                             mLargeHeight;
00194 
00195         std::map<std::string, std::string> mStatusText;
00196 };
00197 
00198 extern LLFloaterTools *gFloaterTools;
00199 
00200 #endif

Generated on Thu Jul 1 06:08:36 2010 for Second Life Viewer by  doxygen 1.4.7