PageRenderTime 82ms CodeModel.GetById 41ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/indra/newview/llviewchildren.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 65 lines | 20 code | 13 blank | 32 comment | 0 complexity | 63faeac23217a9d0f0565a1c8bbc4ada MD5 | raw file
 1/** 
 2 * @file llviewchildren.h
 3 * @brief LLViewChildren class header file
 4 *
 5 * $LicenseInfo:firstyear=2006&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_LLVIEWCHILDREN_H
28#define LL_LLVIEWCHILDREN_H
29
30class LLPanel;
31
32class LLViewChildren
33	// makes it easy to manipulate children of a view by id safely
34	// encapsulates common operations into simple, one line calls
35{
36public:
37	LLViewChildren(LLPanel& parent);
38	
39	// all views
40	void show(const std::string& id, bool visible = true);
41	void hide(const std::string& id) { show(id, false); }
42
43	void enable(const std::string& id, bool enabled = true);
44	void disable(const std::string& id) { enable(id, false); };
45
46	//
47	// LLTextBox
48	void setText(const std::string& id,
49		const std::string& text, bool visible = true);
50
51	// LLIconCtrl
52	enum Badge { BADGE_OK, BADGE_NOTE, BADGE_WARN, BADGE_ERROR };
53	
54	void setBadge(const std::string& id, Badge b, bool visible = true);
55
56	
57	// LLButton
58	void setAction(const std::string& id, void(*function)(void*), void* value);
59
60
61private:
62	LLPanel& mParent;
63};
64
65#endif