PageRenderTime 42ms CodeModel.GetById 20ms app.highlight 5ms RepoModel.GetById 15ms app.codeStats 0ms

/indra/newview/llpanelmarketplaceoutbox.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 90 lines | 40 code | 24 blank | 26 comment | 0 complexity | aab97427ff2f1f703178af7456ef9143 MD5 | raw file
 1/** 
 2 * @file llpanelmarketplaceoutbox.h
 3 * @brief Panel for marketplace outbox
 4 *
 5* $LicenseInfo:firstyear=2011&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_LLPANELMARKETPLACEOUTBOX_H
28#define LL_LLPANELMARKETPLACEOUTBOX_H
29
30#include "llpanel.h"
31
32
33class LLButton;
34class LLInventoryPanel;
35class LLLoadingIndicator;
36
37
38class LLPanelMarketplaceOutbox : public LLPanel
39{
40public:
41	
42	struct Params :	public LLInitParam::Block<Params, LLPanel::Params>
43	{};
44	
45	LOG_CLASS(LLPanelMarketplaceOutbox);
46
47	// RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8
48	static const LLPanelMarketplaceOutbox::Params& getDefaultParams();
49	
50	LLPanelMarketplaceOutbox(const Params& p = getDefaultParams());
51	~LLPanelMarketplaceOutbox();
52
53	/*virtual*/ BOOL postBuild();
54
55	/*virtual*/ void draw();
56
57	LLInventoryPanel * setupInventoryPanel();
58
59	U32 getTotalItemCount() const;
60
61	bool isOutboxEmpty() const;
62	bool isSyncInProgress() const;
63
64	void onSyncComplete(bool goodStatus, const LLSD& content);
65
66	/*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
67								   EDragAndDropType cargo_type,
68								   void* cargo_data,
69								   EAcceptance* accept,
70								   std::string& tooltip_msg);
71
72protected:
73	void onSyncButtonClicked();
74	void updateSyncButtonStatus();
75
76	void handleLoginComplete();
77	void onFocusReceived();
78	void onSelectionChange();
79
80private:
81	LLInventoryPanel *		mInventoryPanel;
82
83	LLButton *				mSyncButton;
84	LLLoadingIndicator *	mSyncIndicator;
85	bool					mSyncInProgress;
86};
87
88
89#endif //LL_LLPANELMARKETPLACEOUTBOX_H
90