diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llnameeditor.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/llnameeditor.h')
-rw-r--r-- | linden/indra/newview/llnameeditor.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/linden/indra/newview/llnameeditor.h b/linden/indra/newview/llnameeditor.h new file mode 100644 index 0000000..1ad1e8c --- /dev/null +++ b/linden/indra/newview/llnameeditor.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /** | ||
2 | * @file llnameeditor.h | ||
3 | * @brief display and refresh a name from the name cache | ||
4 | * | ||
5 | * Copyright (c) 2003-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LLNAMEEDITOR_H | ||
29 | #define LL_LLNAMEEDITOR_H | ||
30 | |||
31 | #include <set> | ||
32 | |||
33 | #include "llview.h" | ||
34 | #include "v4color.h" | ||
35 | #include "llstring.h" | ||
36 | #include "llfontgl.h" | ||
37 | #include "linked_lists.h" | ||
38 | #include "lllineeditor.h" | ||
39 | |||
40 | |||
41 | class LLNameEditor | ||
42 | : public LLLineEditor | ||
43 | { | ||
44 | public: | ||
45 | LLNameEditor(const std::string& name, const LLRect& rect, | ||
46 | const LLUUID& name_id = LLUUID::null, | ||
47 | BOOL is_group = FALSE, | ||
48 | const LLFontGL* glfont = NULL, | ||
49 | S32 max_text_length = 254, | ||
50 | void (*commit_callback)(LLUICtrl* caller, void* user_data) = NULL, | ||
51 | void (*keystroke_callback)(LLLineEditor* caller, void* user_data) = NULL, | ||
52 | void (*focus_lost_callback)(LLLineEditor* caller, void* user_data) = NULL, | ||
53 | void* userdata = NULL, | ||
54 | LLLinePrevalidateFunc prevalidate_func = NULL, | ||
55 | LLViewBorder::EBevel border_bevel = LLViewBorder::BEVEL_IN, | ||
56 | LLViewBorder::EStyle border_style = LLViewBorder::STYLE_LINE, | ||
57 | S32 border_thickness = 1); | ||
58 | // By default, follows top and left and is mouse-opaque. | ||
59 | // If no text, text = name. | ||
60 | // If no font, uses default system font. | ||
61 | |||
62 | virtual ~LLNameEditor(); | ||
63 | |||
64 | static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); | ||
65 | |||
66 | void setNameID(const LLUUID& name_id, BOOL is_group); | ||
67 | |||
68 | void refresh(const LLUUID& id, const char* first, const char* last, | ||
69 | BOOL is_group); | ||
70 | |||
71 | static void refreshAll(const LLUUID& id, const char* firstname, | ||
72 | const char* lastname, BOOL is_group); | ||
73 | |||
74 | virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_NAME_EDITOR; } | ||
75 | virtual LLString getWidgetTag() const { return LL_NAME_EDITOR_TAG; } | ||
76 | |||
77 | // Take/return agent UUIDs | ||
78 | virtual void setValue( LLSD value ); | ||
79 | virtual LLSD getValue() const; | ||
80 | |||
81 | private: | ||
82 | static std::set<LLNameEditor*> sInstances; | ||
83 | |||
84 | private: | ||
85 | LLUUID mNameID; | ||
86 | |||
87 | }; | ||
88 | |||
89 | #endif | ||