PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llplacesinventorypanel.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 92 lines | 41 code | 17 blank | 34 comment | 0 complexity | d92b73823c6b1813a526baa62fe9f531 MD5 | raw file
 1/** 
 2 * @file llplacesinventorypanel.h
 3 * @brief LLPlacesInventoryPanel class declaration
 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_LLINVENTORYSUBTREEPANEL_H
28#define LL_LLINVENTORYSUBTREEPANEL_H
29
30#include "llfloaterinventory.h"
31#include "llinventorypanel.h"
32#include "llfolderview.h"
33
34class LLLandmarksPanel;
35
36class LLPlacesInventoryPanel : public LLInventoryPanel
37{
38public:
39	struct Params 
40		:	public LLInitParam::Block<Params, LLInventoryPanel::Params>
41	{
42		Params()
43		{}
44	};
45
46	LLPlacesInventoryPanel(const Params& p);
47	~LLPlacesInventoryPanel();
48
49	/*virtual*/ void buildFolderView(const LLInventoryPanel::Params& params);
50
51	void saveFolderState();
52	void restoreFolderState();
53
54	virtual S32	notify(const LLSD& info) ;
55
56private:
57	LLSaveFolderState*			mSavedFolderState;
58};
59
60
61class LLPlacesFolderView : public LLFolderView
62{
63public:
64	LLPlacesFolderView(const LLFolderView::Params& p);
65	/**
66	 *	Handles right mouse down
67	 *
68	 * Contains workaround for EXT-2786: sets current selected list for landmark
69	 * panel using @c mParentLandmarksPanel which is set in @c LLLandmarksPanel::initLandmarksPanel
70	 */
71	/*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
72
73	void setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle);
74
75	void setParentLandmarksPanel(LLLandmarksPanel* panel)
76	{
77		mParentLandmarksPanel = panel;
78	}
79
80	S32 getSelectedCount() { return (S32)mSelectedItems.size(); }
81
82private:
83	/**
84	 * holds pointer to landmark panel. This pointer is used in @c LLPlacesFolderView::handleRightMouseDown
85	 */
86	LLLandmarksPanel* mParentLandmarksPanel;
87	typedef std::map<LLInventoryType::EType, LLHandle<LLView> > inventory_type_menu_handle_t;
88	inventory_type_menu_handle_t mMenuHandlesByInventoryType;
89
90};
91
92#endif //LL_LLINVENTORYSUBTREEPANEL_H