llfloatercustomize.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLFLOATERCUSTOMIZE_H
00033 #define LL_LLFLOATERCUSTOMIZE_H
00034 
00035 #include <map>
00036 
00037 #include "llfloater.h"
00038 #include "llstring.h"
00039 #include "v3dmath.h"
00040 #include "lltimer.h"
00041 #include "doublelinkedlist.h"
00042 #include "llundo.h"
00043 #include "llviewermenu.h"
00044 #include "llvoavatar.h"
00045 #include "llwearable.h"
00046 #include "lliconctrl.h"
00047 
00048 class LLButton;
00049 class LLIconCtrl;
00050 class LLColorSwatchCtrl;
00051 class LLGenePool;
00052 class LLInventoryObserver;
00053 class LLJoint;
00054 class LLLineEditor;
00055 class LLMakeOutfitDialog;
00056 class LLRadioGroup;
00057 class LLScrollableContainerView;
00058 class LLScrollingPanelList;
00059 class LLTabContainerVertical;
00060 class LLTextBox;
00061 class LLTextureCtrl;
00062 class LLViewerJointMesh;
00063 class LLViewerVisualParam;
00064 class LLVisualParam;
00065 class LLVisualParamReset;
00066 class LLWearableSaveAsDialog;
00067 class LLPanelEditWearable;
00068 
00070 // LLFloaterCustomize
00071 
00072 class LLFloaterCustomize : public LLFloater
00073 {
00074 public:
00075         typedef std::pair<BOOL, LLViewerVisualParam*> editable_param;
00076         typedef std::map<F32, editable_param> param_map;
00077 
00078 public:
00079         LLFloaterCustomize();
00080         virtual ~LLFloaterCustomize();
00081         virtual BOOL    postBuild();
00082 
00083         // Inherted methods from LLFloater (and above)
00084         virtual void    onClose(bool app_quitting);
00085         virtual void    draw();
00086 
00087         // New methods
00088         void                    clearScrollingPanelList();
00089         void                    generateVisualParamHints(LLViewerJointMesh* joint_mesh,
00090                                                                                          param_map& params);
00091 
00092         const LLString& getEditGroup();
00093         void                    addVisualParamToUndoBuffer( LLViewerVisualParam* param, F32 current_weight );
00094 
00095         void                    updateScrollingPanelList(BOOL allow_modify);
00096 
00097         void                    setWearable(EWearableType type, LLWearable* wearable, U32 perm_mask, BOOL is_complete);
00098         //const char*           getWearableDescription( EWearableType type );
00099         LLPanelEditWearable* getCurrentWearablePanel() { return mWearablePanelList[ sCurrentWearableType ]; }
00100 
00101         virtual BOOL    isDirty() const;
00102 
00103         void                    askToSaveAllIfDirty( void(*next_step_callback)(BOOL proceed, void* userdata), void* userdata );
00104 
00105         void                    spawnWearableAppearance( EWearableType type );
00106 
00107         void                    switchToDefaultSubpart();
00108 
00109         static void             setCurrentWearableType( EWearableType type );
00110         static EWearableType getCurrentWearableType()                                   { return sCurrentWearableType; }
00111 
00112         // Callbacks
00113         static void             onBtnSaveAll( void* userdata );
00114         static void             onBtnSnapshot( void* userdata );
00115         static void             onBtnMakeOutfit( void* userdata );
00116         static void             onMakeOutfitCommit( LLMakeOutfitDialog* dialog, void* userdata );
00117 
00118         static void             onTabChanged( void* userdata, bool from_click );
00119         static void             onSaveAllDialog( S32 option, void* userdata );
00120 
00121         void fetchInventory();
00122         void updateInventoryUI();
00123         void updateScrollingPanelUI();
00124 
00125 protected:
00126         LLPanelEditWearable*    mWearablePanelList[ WT_COUNT ];
00127 
00128         static EWearableType    sCurrentWearableType;
00129 
00130         LLScrollingPanelList*   mScrollingPanelList;
00131         LLScrollableContainerView* mScrollContainer;
00132         LLGenePool*                             mGenePool;
00133         LLVisualParamReset*             mResetParams;
00134 
00135         LLInventoryObserver* mInventoryObserver;
00136 
00137         void                                    (*mNextStepAfterSaveAllCallback)(BOOL proceed, void* userdata);
00138         void*                                   mNextStepAfterSaveAllUserdata;
00139 
00140 
00141 protected:
00142         
00143         static void* createWearablePanel(void* userdata);
00144         
00145         void                    initWearablePanels();
00146         void                    initScrollingPanelList();
00147 };
00148 
00149 extern LLFloaterCustomize* gFloaterCustomize;
00150 
00151 
00152 #endif  // LL_LLFLOATERCUSTOMIZE_H

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