PageRenderTime 244ms CodeModel.GetById 131ms app.highlight 5ms RepoModel.GetById 106ms app.codeStats 0ms

/indra/newview/llplacesinventorybridge.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 97 lines | 49 code | 12 blank | 36 comment | 0 complexity | e8b7f329c1df3c7f7acbb1600766d0f6 MD5 | raw file
 1/** 
 2 * @file llplacesinventorybridge.h
 3 * @brief Declaration of the Inventory-Folder-View-Bridge classes for Places Panel.
 4 *
 5 * $LicenseInfo:firstyear=2009&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LL_LLPLACESINVENTORYBRIDGE_H
28#define LL_LLPLACESINVENTORYBRIDGE_H
29
30#include "llinventorybridge.h"
31
32class LLFolderViewFolder;
33
34/**
35 * Overridden version of the Inventory-Folder-View-Bridge for Places Panel (Landmarks Tab)
36 */
37class LLPlacesLandmarkBridge : public LLLandmarkBridge
38{
39	friend class LLPlacesInventoryBridgeBuilder;
40
41public:
42	/*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags);
43
44protected:
45	LLPlacesLandmarkBridge(LLInventoryType::EType type, 
46						   LLInventoryPanel* inventory,
47						   LLFolderView* root,
48						   const LLUUID& uuid, 
49						   U32 flags = 0x00) :
50		LLLandmarkBridge(inventory, root, uuid, flags)
51	{
52		mInvType = type;
53	}
54};
55
56/**
57 * Overridden version of the Inventory-Folder-View-Bridge for Folders
58 */
59class LLPlacesFolderBridge : public LLFolderBridge
60{
61	friend class LLPlacesInventoryBridgeBuilder;
62
63public:
64	/*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags);
65	/*virtual*/ void performAction(LLInventoryModel* model, std::string action);
66
67protected:
68	LLPlacesFolderBridge(LLInventoryType::EType type, 
69						 LLInventoryPanel* inventory,
70						 LLFolderView* root,						 
71						 const LLUUID& uuid) :
72		LLFolderBridge(inventory, root, uuid)
73	{
74		mInvType = type;
75	}
76	LLFolderViewFolder* getFolder();
77};
78
79
80/**
81 * This class intended to override default InventoryBridgeBuilder for Inventory Panel.
82 *
83 * It builds Bridges for Landmarks and Folders in Places Landmarks Panel
84 */
85class LLPlacesInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder
86{
87public:
88	/*virtual*/ LLInvFVBridge* createBridge(LLAssetType::EType asset_type,
89											LLAssetType::EType actual_asset_type,
90											LLInventoryType::EType inv_type,
91											LLInventoryPanel* inventory,
92											LLFolderView* root,
93											const LLUUID& uuid,
94											U32 flags = 0x00) const;
95};
96
97#endif // LL_LLPLACESINVENTORYBRIDGE_H