aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llalertdialog.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llalertdialog.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/linden/indra/llui/llalertdialog.h b/linden/indra/llui/llalertdialog.h
index ddf4112..07d20dc 100644
--- a/linden/indra/llui/llalertdialog.h
+++ b/linden/indra/llui/llalertdialog.h
@@ -50,6 +50,18 @@ public:
50 typedef bool (*display_callback_t)(S32 modal); 50 typedef bool (*display_callback_t)(S32 modal);
51 enum { IGNORE_USE_DEFAULT=1, IGNORE_USE_SAVED=2, IGNORE_SHOW_AGAIN=3 }; 51 enum { IGNORE_USE_DEFAULT=1, IGNORE_USE_SAVED=2, IGNORE_SHOW_AGAIN=3 };
52 52
53 class URLLoader
54 {
55 public:
56 virtual void load(const std::string& url) = 0;
57 virtual ~URLLoader() {}
58 };
59
60 static void setURLLoader(URLLoader* loader)
61 {
62 sURLLoader = loader;
63 };
64
53protected: 65protected:
54 struct ButtonData 66 struct ButtonData
55 { 67 {
@@ -98,7 +110,7 @@ public:
98 LLAlertDialog( const LLAlertDialogTemplate* xml_template, const LLString::format_map_t& args, 110 LLAlertDialog( const LLAlertDialogTemplate* xml_template, const LLString::format_map_t& args,
99 alert_callback_t callback = NULL, void *user_data = NULL); 111 alert_callback_t callback = NULL, void *user_data = NULL);
100 112
101 static void format(LLString& msg, const LLString::format_map_t& args); 113 void format(LLString& msg, const LLString::format_map_t& args);
102 114
103protected: 115protected:
104 void createDialog(const std::vector<LLString>* options, S32 default_option, 116 void createDialog(const std::vector<LLString>* options, S32 default_option,
@@ -126,6 +138,9 @@ protected:
126 // For Dialogs that take a line as text as input: 138 // For Dialogs that take a line as text as input:
127 LLLineEditor* mLineEditor; 139 LLLineEditor* mLineEditor;
128 alert_text_callback_t mTextCallback; 140 alert_text_callback_t mTextCallback;
141 // For Dialogs linked to a URL
142 LLString mURL; // Some alerts will direct the resident to a URL
143 S32 mURLOption;
129 144
130public: 145public:
131 // use LLPointer so they delete themselves when sTemplates is destroyed 146 // use LLPointer so they delete themselves when sTemplates is destroyed
@@ -138,6 +153,9 @@ public:
138 153
139 static LLString sStringSkipNextTime; 154 static LLString sStringSkipNextTime;
140 static LLString sStringAlwaysChoose; 155 static LLString sStringAlwaysChoose;
156
157private:
158 static URLLoader* sURLLoader;
141}; 159};
142 160
143//============================================================================ 161//============================================================================
@@ -145,7 +163,7 @@ public:
145class LLAlertDialogTemplate : public LLRefCount 163class LLAlertDialogTemplate : public LLRefCount
146{ 164{
147public: 165public:
148 LLAlertDialogTemplate() : mTitle(), mModal(FALSE), mUnique(FALSE), mIgnorable(0), mDefaultOption(0) {} 166 LLAlertDialogTemplate() : mTitle(), mURLOption(0), mModal(FALSE), mUnique(FALSE), mIgnorable(0), mDefaultOption(0) {}
149 167
150 void addOption(const LLString& label, const LLString& ignore_text, BOOL is_default = FALSE) 168 void addOption(const LLString& label, const LLString& ignore_text, BOOL is_default = FALSE)
151 { 169 {
@@ -184,6 +202,8 @@ public:
184 LLString mMessage; // Message to display 202 LLString mMessage; // Message to display
185 LLString mIgnoreListText; // Text to display in enable/disable dialog (if mIgnorable == TRUE) 203 LLString mIgnoreListText; // Text to display in enable/disable dialog (if mIgnorable == TRUE)
186 LLString mIgnoreLabel; // Handle for ignore variable (may be shared by multiple templates) 204 LLString mIgnoreLabel; // Handle for ignore variable (may be shared by multiple templates)
205 LLString mURL; // Some alerts will direct the resident to a URL
206 S32 mURLOption;
187 BOOL mModal; 207 BOOL mModal;
188 BOOL mUnique; 208 BOOL mUnique;
189 S32 mIgnorable; // 0 = Never Ignore, 1 = Do default option, 2 = Do saved option 209 S32 mIgnorable; // 0 = Never Ignore, 1 = Do default option, 2 = Do saved option