From 35962b54e0afa14cd89eb028efb13787802c18a0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 13 Sep 2010 20:39:15 +0100 Subject: Start to break the lltextbox toast into its own toast class instead of mega-overloading the generic notification panel. --- indra/newview/lltoastscripttextbox.h | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 indra/newview/lltoastscripttextbox.h (limited to 'indra/newview/lltoastscripttextbox.h') diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h new file mode 100644 index 0000000000..4890ee1dea --- /dev/null +++ b/indra/newview/lltoastscripttextbox.h @@ -0,0 +1,79 @@ +/** + * @file lltoastscripttextbox.h + * @brief Panel for script llTextBox dialogs + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLTOASTSCRIPTTEXTBOX_H +#define LL_LLTOASTSCRIPTTEXTBOX_H + +#include "llfontgl.h" +#include "lltoastpanel.h" +#include "lldarray.h" +#include "lltimer.h" +#include "llviewermessage.h" +#include "llnotificationptr.h" + +class LLButton; + +/** + * Toast panel for group notification. + * + * Replaces class LLGroupNotifyBox. + */ +class LLToastGroupNotifyPanel +: public LLToastPanel +{ +public: + void close(); + + static bool onNewNotification(const LLSD& notification); + + + // Non-transient messages. You can specify non-default button + // layouts (like one for script dialogs) by passing various + // numbers in for "layout". + LLToastGroupNotifyPanel(LLNotificationPtr& notification); + + /*virtual*/ ~LLToastGroupNotifyPanel(); +protected: + void onClickOk(); + void onClickAttachment(); +private: + static bool isAttachmentOpenable(LLAssetType::EType); + + static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; + + LLButton* mSaveInventoryBtn; + + LLUUID mGroupID; + LLOfferInfo* mInventoryOffer; +}; + +// This view contains the stack of notification windows. +//extern LLView* gGroupNotifyBoxView; + +const S32 GROUP_LAYOUT_DEFAULT = 0; +const S32 GROUP_LAYOUT_SCRIPT_DIALOG = 1; + +#endif -- cgit v1.2.3 From 34a55f2f05036d465ae1ddad5031a3e3f892d549 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 20 Sep 2010 13:04:56 +0100 Subject: make this at least build, but no real flesh yet. --- indra/newview/lltoastscripttextbox.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltoastscripttextbox.h') diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h index 4890ee1dea..2d942939bc 100644 --- a/indra/newview/lltoastscripttextbox.h +++ b/indra/newview/lltoastscripttextbox.h @@ -41,7 +41,7 @@ class LLButton; * * Replaces class LLGroupNotifyBox. */ -class LLToastGroupNotifyPanel +class LLToastScriptTextbox : public LLToastPanel { public: @@ -53,9 +53,9 @@ public: // Non-transient messages. You can specify non-default button // layouts (like one for script dialogs) by passing various // numbers in for "layout". - LLToastGroupNotifyPanel(LLNotificationPtr& notification); + LLToastScriptTextbox(LLNotificationPtr& notification); - /*virtual*/ ~LLToastGroupNotifyPanel(); + /*virtual*/ ~LLToastScriptTextbox(); protected: void onClickOk(); void onClickAttachment(); -- cgit v1.2.3 From b6a498c3018976b97c2353be066502e4a298e156 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 28 Sep 2010 13:41:46 +0100 Subject: iterate iterate. --- indra/newview/lltoastscripttextbox.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoastscripttextbox.h') diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h index 2d942939bc..86fe93cf66 100644 --- a/indra/newview/lltoastscripttextbox.h +++ b/indra/newview/lltoastscripttextbox.h @@ -28,7 +28,7 @@ #define LL_LLTOASTSCRIPTTEXTBOX_H #include "llfontgl.h" -#include "lltoastpanel.h" +#include "lltoastnotifypanel.h" #include "lldarray.h" #include "lltimer.h" #include "llviewermessage.h" @@ -42,7 +42,7 @@ class LLButton; * Replaces class LLGroupNotifyBox. */ class LLToastScriptTextbox -: public LLToastPanel +: public LLToastNotifyPanel { public: void close(); -- cgit v1.2.3 From dd6a77c9e1baeec7276d3599b73d5cde384e810f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 30 Sep 2010 12:01:36 +0100 Subject: xui / panel format cleanup. --- indra/newview/lltoastscripttextbox.h | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'indra/newview/lltoastscripttextbox.h') diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h index 86fe93cf66..ae3b545e0a 100644 --- a/indra/newview/lltoastscripttextbox.h +++ b/indra/newview/lltoastscripttextbox.h @@ -27,19 +27,13 @@ #ifndef LL_LLTOASTSCRIPTTEXTBOX_H #define LL_LLTOASTSCRIPTTEXTBOX_H -#include "llfontgl.h" #include "lltoastnotifypanel.h" -#include "lldarray.h" -#include "lltimer.h" -#include "llviewermessage.h" #include "llnotificationptr.h" class LLButton; /** - * Toast panel for group notification. - * - * Replaces class LLGroupNotifyBox. + * Toast panel for scripted llTextbox notifications. */ class LLToastScriptTextbox : public LLToastNotifyPanel @@ -49,7 +43,6 @@ public: static bool onNewNotification(const LLSD& notification); - // Non-transient messages. You can specify non-default button // layouts (like one for script dialogs) by passing various // numbers in for "layout". @@ -57,23 +50,9 @@ public: /*virtual*/ ~LLToastScriptTextbox(); protected: - void onClickOk(); - void onClickAttachment(); + void onClickSubmit(); private: - static bool isAttachmentOpenable(LLAssetType::EType); - static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; - - LLButton* mSaveInventoryBtn; - - LLUUID mGroupID; - LLOfferInfo* mInventoryOffer; }; -// This view contains the stack of notification windows. -//extern LLView* gGroupNotifyBoxView; - -const S32 GROUP_LAYOUT_DEFAULT = 0; -const S32 GROUP_LAYOUT_SCRIPT_DIALOG = 1; - #endif -- cgit v1.2.3