PageRenderTime 50ms CodeModel.GetById 46ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llfloaterbuy.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 74 lines | 32 code | 12 blank | 30 comment | 0 complexity | b06d038c6456b6852769ed59d707f633 MD5 | raw file
 1/** 
 2 * @file llfloaterbuy.h
 3 * @author James Cook
 4 * @brief LLFloaterBuy class definition
 5 *
 6 * $LicenseInfo:firstyear=2004&license=viewerlgpl$
 7 * Second Life Viewer Source Code
 8 * Copyright (C) 2010, Linden Research, Inc.
 9 * 
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation;
13 * version 2.1 of the License only.
14 * 
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 * 
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 * 
24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
25 * $/LicenseInfo$
26 */
27
28/**
29 * Floater that appears when buying an object, giving a preview
30 * of its contents and their permissions.
31 */ 
32
33#ifndef LL_LLFLOATERBUY_H
34#define LL_LLFLOATERBUY_H
35
36#include "llfloater.h"
37#include "llvoinventorylistener.h"
38#include "llsaleinfo.h"
39#include "llinventory.h"
40
41class LLViewerObject;
42class LLSaleInfo;
43class LLObjectSelection;
44
45class LLFloaterBuy
46: public LLFloater, public LLVOInventoryListener
47{
48public:
49	LLFloaterBuy(const LLSD& key);
50	~LLFloaterBuy();
51	
52	/*virtual*/	BOOL postBuild();
53	/*virtual*/ void onClose(bool app_quitting);
54	
55	static void show(const LLSaleInfo& sale_info);
56
57protected:
58	void reset();
59
60	void requestObjectInventories();
61	/*virtual*/ void inventoryChanged(LLViewerObject* obj,
62								 LLInventoryObject::object_list_t* inv,
63								 S32 serial_num,
64								 void* data);
65
66	void onClickBuy();
67	void onClickCancel();
68
69private:
70	LLSafeHandle<LLObjectSelection>	mObjectSelection;
71	LLSaleInfo mSaleInfo;
72};
73
74#endif