diff options
Diffstat (limited to 'linden/indra/newview/llpanelinventory.h')
-rw-r--r-- | linden/indra/newview/llpanelinventory.h | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelinventory.h b/linden/indra/newview/llpanelinventory.h new file mode 100644 index 0000000..e6c000e --- /dev/null +++ b/linden/indra/newview/llpanelinventory.h | |||
@@ -0,0 +1,108 @@ | |||
1 | /** | ||
2 | * @file llpanelinventory.h | ||
3 | * @brief LLPanelInventory class definition | ||
4 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | //***************************************************************************** | ||
29 | // | ||
30 | // This class represents the panel used to view and control a | ||
31 | // particular task's inventory. | ||
32 | // | ||
33 | //***************************************************************************** | ||
34 | |||
35 | #ifndef LL_LLPANELINVENTORY_H | ||
36 | #define LL_LLPANELINVENTORY_H | ||
37 | |||
38 | #include "llinventory.h" | ||
39 | #include "lluuid.h" | ||
40 | #include "llmap.h" | ||
41 | #include "llviewerobject.h" | ||
42 | #include "llvoinventorylistener.h" | ||
43 | #include "llpanel.h" | ||
44 | |||
45 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
46 | // Class LLPanelInventory | ||
47 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
48 | |||
49 | class LLScrollableContainerView; | ||
50 | class LLFolderView; | ||
51 | class LLFolderViewFolder; | ||
52 | class LLViewerObject; | ||
53 | class LLFolderViewEventListener; | ||
54 | //class LLVOInventoryListener; | ||
55 | |||
56 | // Utility function to hide all entries except those in the list | ||
57 | class LLMenuGL; | ||
58 | void hideContextEntries(LLMenuGL& menu, | ||
59 | const std::vector<LLString> &entries_to_show, | ||
60 | const std::vector<LLString> &disabled_entries); | ||
61 | |||
62 | class LLPanelInventory : public LLPanel, public LLVOInventoryListener | ||
63 | { | ||
64 | protected: | ||
65 | LLScrollableContainerView* mScroller; | ||
66 | LLFolderView* mFolders; | ||
67 | LLLinkedList<LLFolderViewEventListener> mBridge; | ||
68 | |||
69 | LLUUID mTaskUUID; | ||
70 | BOOL mHaveInventory; | ||
71 | BOOL mIsInventoryEmpty; | ||
72 | BOOL mInventoryNeedsUpdate; | ||
73 | |||
74 | protected: | ||
75 | void reset(); | ||
76 | /*virtual*/ void inventoryChanged(LLViewerObject* object, | ||
77 | InventoryObjectList* inventory, | ||
78 | S32 serial_num, | ||
79 | void* user_data); | ||
80 | void updateInventory(); | ||
81 | void createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents); | ||
82 | void createViewsForCategory(InventoryObjectList* inventory, | ||
83 | LLInventoryObject* parent, | ||
84 | LLFolderViewFolder* folder); | ||
85 | |||
86 | void clearContents(); | ||
87 | |||
88 | public: | ||
89 | LLPanelInventory(const LLString& name, const LLRect& rect); | ||
90 | virtual ~LLPanelInventory(); | ||
91 | |||
92 | void refresh(); | ||
93 | const LLUUID& getTaskUUID() { return mTaskUUID;} | ||
94 | void removeSelectedItem(); | ||
95 | void startRenamingSelectedItem(); | ||
96 | |||
97 | LLFolderView* getRootFolder() const { return mFolders; } | ||
98 | |||
99 | virtual void draw(); | ||
100 | virtual void deleteAllChildren(); | ||
101 | virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, LLString& tooltip_msg); | ||
102 | |||
103 | static void idle(void* user_data); | ||
104 | }; | ||
105 | |||
106 | void init_object_inventory_panel_actions(LLPanelInventory *panel); | ||
107 | |||
108 | #endif // LL_LLPANELINVENTORY_H | ||