diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llnotify.h | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llnotify.h')
-rw-r--r-- | linden/indra/newview/llnotify.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/linden/indra/newview/llnotify.h b/linden/indra/newview/llnotify.h index f2d37c1..95d61eb 100644 --- a/linden/indra/newview/llnotify.h +++ b/linden/indra/newview/llnotify.h | |||
@@ -45,24 +45,24 @@ class LLNotifyBox : public LLPanel, public LLEventTimer | |||
45 | { | 45 | { |
46 | public: | 46 | public: |
47 | typedef void (*notify_callback_t)(S32 option, void* data); | 47 | typedef void (*notify_callback_t)(S32 option, void* data); |
48 | typedef std::vector<LLString> option_list_t; | 48 | typedef std::vector<std::string> option_list_t; |
49 | 49 | ||
50 | static LLNotifyBox* showXml( const LLString& xml_desc, | 50 | static LLNotifyBox* showXml( const std::string& xml_desc, |
51 | notify_callback_t callback = NULL, void *user_data = NULL); | 51 | notify_callback_t callback = NULL, void *user_data = NULL); |
52 | static LLNotifyBox* showXml( const LLString& xml_desc, const LLString::format_map_t& args, BOOL is_caution, | 52 | static LLNotifyBox* showXml( const std::string& xml_desc, const LLStringUtil::format_map_t& args, BOOL is_caution, |
53 | notify_callback_t callback = NULL, void *user_data = NULL); | 53 | notify_callback_t callback = NULL, void *user_data = NULL); |
54 | static LLNotifyBox* showXml( const LLString& xml_desc, const LLString::format_map_t& args, | 54 | static LLNotifyBox* showXml( const std::string& xml_desc, const LLStringUtil::format_map_t& args, |
55 | notify_callback_t callback = NULL, void *user_data = NULL); | 55 | notify_callback_t callback = NULL, void *user_data = NULL); |
56 | // For script notifications: | 56 | // For script notifications: |
57 | static LLNotifyBox* showXml( const LLString& xml_desc, const LLString::format_map_t& args, | 57 | static LLNotifyBox* showXml( const std::string& xml_desc, const LLStringUtil::format_map_t& args, |
58 | notify_callback_t callback, void *user_data, | 58 | notify_callback_t callback, void *user_data, |
59 | const option_list_t& options, | 59 | const option_list_t& options, |
60 | BOOL layout_script_dialog = FALSE); | 60 | BOOL layout_script_dialog = FALSE); |
61 | 61 | ||
62 | static bool parseNotify(const LLString& xml_filename); | 62 | static bool parseNotify(const std::string& xml_filename); |
63 | static const LLString getTemplateMessage(const LLString& xml_desc, const LLString::format_map_t& args); | 63 | static const std::string getTemplateMessage(const std::string& xml_desc, const LLStringUtil::format_map_t& args); |
64 | static const LLString getTemplateMessage(const LLString& xml_desc); | 64 | static const std::string getTemplateMessage(const std::string& xml_desc); |
65 | static BOOL getTemplateIsCaution(const LLString& xml_desc); | 65 | static BOOL getTemplateIsCaution(const std::string& xml_desc); |
66 | 66 | ||
67 | BOOL isTip() const { return mIsTip; } | 67 | BOOL isTip() const { return mIsTip; } |
68 | BOOL isCaution() const { return mIsCaution; } | 68 | BOOL isCaution() const { return mIsCaution; } |
@@ -74,10 +74,10 @@ public: | |||
74 | void close(); | 74 | void close(); |
75 | 75 | ||
76 | static void cleanup(); | 76 | static void cleanup(); |
77 | static void format(LLString& msg, const LLString::format_map_t& args); | 77 | static void format(std::string& msg, const LLStringUtil::format_map_t& args); |
78 | 78 | ||
79 | protected: | 79 | protected: |
80 | LLNotifyBox(LLPointer<LLNotifyBoxTemplate> notify_template, const LLString::format_map_t& args, | 80 | LLNotifyBox(LLPointer<LLNotifyBoxTemplate> notify_template, const LLStringUtil::format_map_t& args, |
81 | notify_callback_t callback, void* user_data, | 81 | notify_callback_t callback, void* user_data, |
82 | BOOL is_caution = FALSE, | 82 | BOOL is_caution = FALSE, |
83 | const option_list_t& extra_options = option_list_t(), | 83 | const option_list_t& extra_options = option_list_t(), |
@@ -97,7 +97,7 @@ protected: | |||
97 | // Returns the rect, relative to gNotifyView, where this | 97 | // Returns the rect, relative to gNotifyView, where this |
98 | // notify box should be placed. | 98 | // notify box should be placed. |
99 | static LLRect getNotifyRect(S32 num_options, BOOL layout_script_dialog, BOOL is_caution); | 99 | static LLRect getNotifyRect(S32 num_options, BOOL layout_script_dialog, BOOL is_caution); |
100 | static LLRect getNotifyTipRect(const LLString &message); | 100 | static LLRect getNotifyTipRect(const std::string &message); |
101 | 101 | ||
102 | // internal handler for button being clicked | 102 | // internal handler for button being clicked |
103 | static void onClickButton(void* data); | 103 | static void onClickButton(void* data); |
@@ -105,8 +105,8 @@ protected: | |||
105 | // for "next" button | 105 | // for "next" button |
106 | static void onClickNext(void* data); | 106 | static void onClickNext(void* data); |
107 | 107 | ||
108 | static LLPointer<LLNotifyBoxTemplate> getTemplate(const LLString& xml_desc); | 108 | static LLPointer<LLNotifyBoxTemplate> getTemplate(const std::string& xml_desc); |
109 | static LLNotifyBox* findExistingNotify(LLPointer<LLNotifyBoxTemplate> notify_template, const LLString::format_map_t& args); | 109 | static LLNotifyBox* findExistingNotify(LLPointer<LLNotifyBoxTemplate> notify_template, const LLStringUtil::format_map_t& args); |
110 | 110 | ||
111 | private: | 111 | private: |
112 | void drawBackground() const; | 112 | void drawBackground() const; |
@@ -114,7 +114,7 @@ private: | |||
114 | static LLPointer<LLNotifyBoxTemplate> sDefaultTemplate; | 114 | static LLPointer<LLNotifyBoxTemplate> sDefaultTemplate; |
115 | 115 | ||
116 | protected: | 116 | protected: |
117 | LLString mMessage; | 117 | std::string mMessage; |
118 | 118 | ||
119 | BOOL mIsTip; | 119 | BOOL mIsTip; |
120 | BOOL mIsCaution; // is this a caution notification? | 120 | BOOL mIsCaution; // is this a caution notification? |
@@ -150,21 +150,21 @@ protected: | |||
150 | }; | 150 | }; |
151 | std::vector<InstanceAndS32*> mBtnCallbackData; | 151 | std::vector<InstanceAndS32*> mBtnCallbackData; |
152 | 152 | ||
153 | typedef std::map<LLString, LLPointer<LLNotifyBoxTemplate> > template_map_t; | 153 | typedef std::map<std::string, LLPointer<LLNotifyBoxTemplate> > template_map_t; |
154 | static template_map_t sNotifyTemplates; // by mLabel | 154 | static template_map_t sNotifyTemplates; // by mLabel |
155 | 155 | ||
156 | static S32 sNotifyBoxCount; | 156 | static S32 sNotifyBoxCount; |
157 | static const LLFontGL* sFont; | 157 | static const LLFontGL* sFont; |
158 | static const LLFontGL* sFontSmall; | 158 | static const LLFontGL* sFontSmall; |
159 | 159 | ||
160 | typedef std::map<LLString, LLNotifyBox*> unique_map_t; | 160 | typedef std::map<std::string, LLNotifyBox*> unique_map_t; |
161 | static unique_map_t sOpenUniqueNotifyBoxes; | 161 | static unique_map_t sOpenUniqueNotifyBoxes; |
162 | }; | 162 | }; |
163 | 163 | ||
164 | class LLNotifyBoxView : public LLUICtrl | 164 | class LLNotifyBoxView : public LLUICtrl |
165 | { | 165 | { |
166 | public: | 166 | public: |
167 | LLNotifyBoxView(const LLString& name, const LLRect& rect, BOOL mouse_opaque, U32 follows=FOLLOWS_NONE); | 167 | LLNotifyBoxView(const std::string& name, const LLRect& rect, BOOL mouse_opaque, U32 follows=FOLLOWS_NONE); |
168 | void showOnly(LLView * ctrl); | 168 | void showOnly(LLView * ctrl); |
169 | LLNotifyBox * getFirstNontipBox() const; | 169 | LLNotifyBox * getFirstNontipBox() const; |
170 | 170 | ||
@@ -195,12 +195,12 @@ public: | |||
195 | mDefaultOption(0) | 195 | mDefaultOption(0) |
196 | {} | 196 | {} |
197 | 197 | ||
198 | void setMessage(const LLString& message) | 198 | void setMessage(const std::string& message) |
199 | { | 199 | { |
200 | mMessage = message; | 200 | mMessage = message; |
201 | } | 201 | } |
202 | 202 | ||
203 | void addOption(const LLString& label, BOOL is_default = FALSE) | 203 | void addOption(const std::string& label, BOOL is_default = FALSE) |
204 | { | 204 | { |
205 | if (is_default) | 205 | if (is_default) |
206 | { | 206 | { |
@@ -210,8 +210,8 @@ public: | |||
210 | } | 210 | } |
211 | 211 | ||
212 | public: | 212 | public: |
213 | LLString mLabel; // Handle for access from code, etc | 213 | std::string mLabel; // Handle for access from code, etc |
214 | LLString mMessage; // Message to display | 214 | std::string mMessage; // Message to display |
215 | BOOL mIsTip; | 215 | BOOL mIsTip; |
216 | BOOL mIsCaution; | 216 | BOOL mIsCaution; |
217 | BOOL mUnique; | 217 | BOOL mUnique; |