llpanelinventory.h

Go to the documentation of this file.
00001 
00032 //*****************************************************************************
00033 //
00034 // This class represents the panel used to view and control a
00035 // particular task's inventory.
00036 //
00037 //*****************************************************************************
00038 
00039 #ifndef LL_LLPANELINVENTORY_H
00040 #define LL_LLPANELINVENTORY_H
00041 
00042 #include "llinventory.h"
00043 #include "lluuid.h"
00044 #include "llmap.h"
00045 #include "llviewerobject.h"
00046 #include "llvoinventorylistener.h"
00047 #include "llpanel.h"
00048 
00049 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00050 // Class LLPanelInventory
00051 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00052 
00053 class LLScrollableContainerView;
00054 class LLFolderView;
00055 class LLFolderViewFolder;
00056 class LLViewerObject;
00057 class LLFolderViewEventListener;
00058 //class LLVOInventoryListener;
00059 
00060 // Utility function to hide all entries except those in the list
00061 class LLMenuGL;
00062 void hideContextEntries(LLMenuGL& menu, 
00063                 const std::vector<LLString> &entries_to_show, 
00064                 const std::vector<LLString> &disabled_entries);
00065 
00066 class LLPanelInventory : public LLPanel, public LLVOInventoryListener
00067 {
00068 protected:
00069         LLScrollableContainerView* mScroller;
00070         LLFolderView* mFolders;
00071         
00072         LLUUID mTaskUUID;
00073         BOOL mHaveInventory;
00074         BOOL mIsInventoryEmpty;
00075         BOOL mInventoryNeedsUpdate;
00076 
00077 protected:
00078         void reset();
00079         /*virtual*/ void inventoryChanged(LLViewerObject* object,
00080                                                                  InventoryObjectList* inventory,
00081                                                                  S32 serial_num,
00082                                                                  void* user_data);
00083         void updateInventory();
00084         void createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents);
00085         void createViewsForCategory(InventoryObjectList* inventory,
00086                                                                 LLInventoryObject* parent,
00087                                                                 LLFolderViewFolder* folder);
00088 
00089         void clearContents();
00090 
00091 public:
00092         LLPanelInventory(const LLString& name, const LLRect& rect);
00093         virtual ~LLPanelInventory();
00094 
00095         void refresh();
00096         const LLUUID& getTaskUUID() { return mTaskUUID;}
00097         void removeSelectedItem();
00098         void startRenamingSelectedItem();
00099 
00100         LLFolderView* getRootFolder() const { return mFolders; }
00101 
00102         virtual void draw();
00103         virtual void deleteAllChildren();
00104         virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, LLString& tooltip_msg);
00105         
00106         static void idle(void* user_data);
00107 };
00108 
00109 void init_object_inventory_panel_actions(LLPanelInventory *panel);
00110 
00111 #endif // LL_LLPANELINVENTORY_H

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