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

/indra/llui/llflyoutbutton.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 68 lines | 29 code | 11 blank | 28 comment | 0 complexity | 2625bf16e63c576b589a6f15ac533a44 MD5 | raw file
 1/** 
 2 * @file llflyoutbutton.h
 3 * @brief LLFlyoutButton base class
 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// A control that displays the name of the chosen item, which when clicked
28// shows a scrolling box of choices.
29
30#ifndef LL_LLFLYOUTBUTTON_H
31#define LL_LLFLYOUTBUTTON_H
32
33#include "llcombobox.h"
34
35// Classes
36
37class LLFlyoutButton : public LLComboBox
38{
39public:
40	struct Params : public LLInitParam::Block<Params, LLComboBox::Params>
41	{
42		Optional<LLButton::Params> action_button;
43		Deprecated                 allow_text_entry;
44
45		Params()
46		:	action_button("action_button"),
47		    allow_text_entry("allow_text_entry")
48		{
49			changeDefault(LLComboBox::Params::allow_text_entry, false);
50		}
51
52	};
53protected:
54	LLFlyoutButton(const Params&);
55	friend class LLUICtrlFactory;
56public:
57	virtual void	draw();
58
59	void setToggleState(BOOL state);
60
61	void onActionButtonClick(const LLSD& data);
62
63protected:
64	LLButton*				mActionButton;
65	BOOL					mToggleState;
66};
67
68#endif // LL_LLFLYOUTBUTTON_H