00001
00032
00033
00034
00035
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
00051
00052
00053 class LLScrollableContainerView;
00054 class LLFolderView;
00055 class LLFolderViewFolder;
00056 class LLViewerObject;
00057 class LLFolderViewEventListener;
00058
00059
00060
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 LLLinkedList<LLFolderViewEventListener> mBridge;
00072
00073 LLUUID mTaskUUID;
00074 BOOL mHaveInventory;
00075 BOOL mIsInventoryEmpty;
00076 BOOL mInventoryNeedsUpdate;
00077
00078 protected:
00079 void reset();
00080 void inventoryChanged(LLViewerObject* object,
00081 InventoryObjectList* inventory,
00082 S32 serial_num,
00083 void* user_data);
00084 void updateInventory();
00085 void createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents);
00086 void createViewsForCategory(InventoryObjectList* inventory,
00087 LLInventoryObject* parent,
00088 LLFolderViewFolder* folder);
00089
00090 void clearContents();
00091
00092 public:
00093 LLPanelInventory(const LLString& name, const LLRect& rect);
00094 virtual ~LLPanelInventory();
00095
00096 void refresh();
00097 const LLUUID& getTaskUUID() { return mTaskUUID;}
00098 void removeSelectedItem();
00099 void startRenamingSelectedItem();
00100
00101 LLFolderView* getRootFolder() const { return mFolders; }
00102
00103 virtual void draw();
00104 virtual void deleteAllChildren();
00105 virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, LLString& tooltip_msg);
00106
00107 static void idle(void* user_data);
00108 };
00109
00110 void init_object_inventory_panel_actions(LLPanelInventory *panel);
00111
00112 #endif // LL_LLPANELINVENTORY_H