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

/indra/newview/llpopupview.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 61 lines | 29 code | 7 blank | 25 comment | 0 complexity | 77a6bbdd5858234ba61e62c26d45aaa2 MD5 | raw file
 1/** 
 2 * @file llpopupview.h
 3 * @brief Holds transient popups
 4 *
 5 * $LicenseInfo:firstyear=2001&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_LLPOPUPVIEW_H
28#define LL_LLPOPUPVIEW_H
29
30#include "llpanel.h"
31
32class LLPopupView : public LLPanel
33{
34public:
35	LLPopupView(const Params& p = LLPanel::Params());
36	~LLPopupView();
37
38	/*virtual*/ void draw();
39	/*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
40	/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
41	/*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
42	/*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
43	/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
44	/*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
45	/*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
46	/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
47	/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
48	/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
49
50	void addPopup(LLView* popup);
51	void removePopup(LLView* popup);
52	void clearPopups();
53
54	typedef std::list<LLHandle<LLView> > popup_list_t;
55	popup_list_t getCurrentPopups() { return mPopups; }
56
57private:
58	BOOL handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
59	popup_list_t mPopups;
60};
61#endif //LL_LLROOTVIEW_H