From f87a49991a0a96c8cf11cbc9461711794aae3a72 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 16 Sep 2010 00:39:21 -0700 Subject: refactored notification template into own header file --- indra/llui/llnotifications.cpp | 302 ++++++++---------------------------- indra/llui/llnotifications.h | 205 +++++++++++------------- indra/llui/llnotificationtemplate.h | 274 ++++++++++++++++++++++++++++++++ 3 files changed, 432 insertions(+), 349 deletions(-) create mode 100644 indra/llui/llnotificationtemplate.h (limited to 'indra') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index cf93243eeb..bdc094bf47 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -27,6 +27,7 @@ #include "linden_common.h" #include "llnotifications.h" +#include "llnotificationtemplate.h" #include "llinstantmessage.h" #include "llxmlnode.h" @@ -55,233 +56,6 @@ void NotificationPriorityValues::declareValues() } -namespace LLNotificationTemplateParams -{ - using namespace LLInitParam; - - struct GlobalString : public Block - { - Mandatory name, - value; - - GlobalString() - : name("name"), - value("value") - {} - }; - - struct UniquenessContext : public Block - { - Mandatory key; - - UniquenessContext() - : key("key") - {} - - }; - - struct UniquenessConstraint : public Block - { - Multiple contexts; - - UniquenessConstraint() - : contexts("context") - {} - }; - - struct FormElementBase : public Block - { - Mandatory name; - - FormElementBase() - : name("name") - {} - }; - - struct FormIgnore : public Block - { - Optional text; - Optional save_option; - - FormIgnore() - : text("text"), - save_option("save_option", false) - {} - }; - - struct FormButton : public Block - { - Mandatory index; - Mandatory text; - Optional ignore; - Optional is_default; - - Mandatory type; - - FormButton() - : index("index"), - text("text"), - ignore("ignore"), - is_default("default"), - type("type") - { - // set type here so it gets serialized - type = "button"; - } - }; - - struct FormInput : public Block - { - Mandatory type; - Optional width; - - FormInput() - : type("type"), - width("width", 0) - {} - }; - - struct FormElement : public Choice - { - Alternative button; - Alternative input; - - FormElement() - : button("button"), - input("input") - {} - }; - - struct FormElements : public Block - { - Multiple elements; - FormElements() - : elements("") - {} - }; - - struct Form : public Block
- { - Optional name; - Optional ignore; - Optional form_elements; - - Form() - : name("form"), - ignore("ignore"), - form_elements("") - {} - }; - - // Templates are used to define common form types, such as OK/Cancel dialogs, etc. - - struct Template : public Block