PageRenderTime 242ms CodeModel.GetById 101ms app.highlight 5ms RepoModel.GetById 75ms app.codeStats 0ms

/indra/newview/llsyswellitem.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 81 lines | 36 code | 16 blank | 29 comment | 0 complexity | 19b61342663217bdfb6be8f232b8d263 MD5 | raw file
 1/** 
 2 * @file llsyswellitem.h
 3 * @brief                                    // TODO
 4 *
 5 * $LicenseInfo:firstyear=2003&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_LLSYSWELLITEM_H
28#define LL_LLSYSWELLITEM_H
29
30#include "llpanel.h"
31#include "lltextbox.h"
32#include "llbutton.h"
33#include "lliconctrl.h"
34
35#include <string>
36
37class LLSysWellItem : public LLPanel
38{
39public:
40	struct Params :	public LLInitParam::Block<Params, LLPanel::Params>
41	{
42		LLUUID        	notification_id;
43		std::string		title;
44        Params()        {};
45	};
46
47
48	LLSysWellItem(const Params& p);
49	virtual	~LLSysWellItem();
50
51	// title
52	void setTitle( std::string title );
53
54	// get item's ID
55	LLUUID getID() { return mID; }
56
57	// handlers
58	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
59	virtual void onMouseEnter(S32 x, S32 y, MASK mask);
60	virtual void onMouseLeave(S32 x, S32 y, MASK mask);
61
62	//callbacks
63	typedef boost::function<void (LLSysWellItem* item)> syswell_item_callback_t;
64	typedef boost::signals2::signal<void (LLSysWellItem* item)> syswell_item_signal_t;
65	syswell_item_signal_t mOnItemClose;	
66	syswell_item_signal_t mOnItemClick;	
67	boost::signals2::connection setOnItemCloseCallback(syswell_item_callback_t cb) { return mOnItemClose.connect(cb); }
68	boost::signals2::connection setOnItemClickCallback(syswell_item_callback_t cb) { return mOnItemClick.connect(cb); }
69
70private:
71
72	void onClickCloseBtn();
73
74	LLTextBox*	mTitle;
75	LLButton*	mCloseBtn;
76	LLUUID		mID;
77};
78
79#endif // LL_LLSYSWELLITEM_H
80
81