diff options
author | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:19 -0500 |
commit | b235c59d60472f818a9142c0886b95a0ff4191d7 (patch) | |
tree | d323c55587584b19cc43a03f58a178823f12d3cd /linden/indra/llui/llalertdialog.h | |
parent | Second Life viewer sources 1.18.5.3 (diff) | |
download | meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.zip meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.gz meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.bz2 meta-impy-b235c59d60472f818a9142c0886b95a0ff4191d7.tar.xz |
Second Life viewer sources 1.18.6.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/llalertdialog.h | 24 |
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 | |||
53 | protected: | 65 | protected: |
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 | ||
103 | protected: | 115 | protected: |
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 | ||
130 | public: | 145 | public: |
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 | |||
157 | private: | ||
158 | static URLLoader* sURLLoader; | ||
141 | }; | 159 | }; |
142 | 160 | ||
143 | //============================================================================ | 161 | //============================================================================ |
@@ -145,7 +163,7 @@ public: | |||
145 | class LLAlertDialogTemplate : public LLRefCount | 163 | class LLAlertDialogTemplate : public LLRefCount |
146 | { | 164 | { |
147 | public: | 165 | public: |
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 |