Annotation of /trunk/linden/indra/newview/llgroupnotify.h
Parent Directory
|
Revision Log
Revision 57 -
(view)
(download)
Original Path: linden_release/linden/indra/newview/llgroupnotify.h
| 1 : | mjm | 57 | /** |
| 2 : | * @file llgroupnotify.h | ||
| 3 : | * @brief Non-blocking notification that doesn't take keyboard focus. | ||
| 4 : | * | ||
| 5 : | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
| 6 : | * | ||
| 7 : | * Copyright (c) 2006-2008, Linden Research, Inc. | ||
| 8 : | * | ||
| 9 : | * Second Life Viewer Source Code | ||
| 10 : | * The source code in this file ("Source Code") is provided by Linden Lab | ||
| 11 : | * to you under the terms of the GNU General Public License, version 2.0 | ||
| 12 : | * ("GPL"), unless you have obtained a separate licensing agreement | ||
| 13 : | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
| 14 : | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
| 15 : | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
| 16 : | * | ||
| 17 : | * There are special exceptions to the terms and conditions of the GPL as | ||
| 18 : | * it is applied to this Source Code. View the full text of the exception | ||
| 19 : | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
| 20 : | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
| 21 : | * | ||
| 22 : | * By copying, modifying or distributing this software, you acknowledge | ||
| 23 : | * that you have read and understood your obligations described above, | ||
| 24 : | * and agree to abide by those obligations. | ||
| 25 : | * | ||
| 26 : | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
| 27 : | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
| 28 : | * COMPLETENESS OR PERFORMANCE. | ||
| 29 : | * $/LicenseInfo$ | ||
| 30 : | */ | ||
| 31 : | |||
| 32 : | #ifndef LL_LLGROUPNOTIFY_H | ||
| 33 : | #define LL_LLGROUPNOTIFY_H | ||
| 34 : | |||
| 35 : | #include "llfontgl.h" | ||
| 36 : | #include "llpanel.h" | ||
| 37 : | #include "lldarray.h" | ||
| 38 : | #include "lltimer.h" | ||
| 39 : | #include "llviewermessage.h" | ||
| 40 : | |||
| 41 : | class LLButton; | ||
| 42 : | |||
| 43 : | // NotifyBox - for notifications that require a response from the | ||
| 44 : | // user. Replaces LLMessageBox. | ||
| 45 : | class LLGroupNotifyBox | ||
| 46 : | : public LLPanel | ||
| 47 : | { | ||
| 48 : | public: | ||
| 49 : | static LLGroupNotifyBox* show(const std::string& subject, | ||
| 50 : | const std::string& message, | ||
| 51 : | const std::string& from_name, | ||
| 52 : | const LLUUID& group_id, | ||
| 53 : | const U32& time_stamp, | ||
| 54 : | const bool& has_inventory = FALSE, | ||
| 55 : | const std::string& inventory_name = std::string(), | ||
| 56 : | LLOfferInfo* inventory_offer = NULL); | ||
| 57 : | void close(); | ||
| 58 : | |||
| 59 : | protected: | ||
| 60 : | // Non-transient messages. You can specify non-default button | ||
| 61 : | // layouts (like one for script dialogs) by passing various | ||
| 62 : | // numbers in for "layout". | ||
| 63 : | LLGroupNotifyBox(const std::string& subject, | ||
| 64 : | const std::string& message, | ||
| 65 : | const std::string& from_name, | ||
| 66 : | const LLUUID& group_id, | ||
| 67 : | const LLUUID& group_insignia, | ||
| 68 : | const std::string& group_name, | ||
| 69 : | const U32& t, | ||
| 70 : | const bool& has_inventory = FALSE, | ||
| 71 : | const std::string& inventory_name = std::string(), | ||
| 72 : | LLOfferInfo* inventory_offer = NULL); | ||
| 73 : | |||
| 74 : | /*virtual*/ ~LLGroupNotifyBox(); | ||
| 75 : | |||
| 76 : | // JC - removed support for clicking in background to dismiss | ||
| 77 : | // the dialogs. | ||
| 78 : | // /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); | ||
| 79 : | // /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); | ||
| 80 : | // /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); | ||
| 81 : | /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); | ||
| 82 : | |||
| 83 : | // Animate as sliding onto the screen. | ||
| 84 : | /*virtual*/ void draw(); | ||
| 85 : | |||
| 86 : | void moveToBack(); | ||
| 87 : | |||
| 88 : | // Returns the rect, relative to gNotifyView, where this | ||
| 89 : | // notify box should be placed. | ||
| 90 : | static LLRect getGroupNotifyRect(); | ||
| 91 : | |||
| 92 : | // internal handler for button being clicked | ||
| 93 : | static void onClickOk(void* data); | ||
| 94 : | static void onClickGroupInfo(void* data); | ||
| 95 : | static void onClickSaveInventory(void* data); | ||
| 96 : | |||
| 97 : | // for "next" button | ||
| 98 : | static void onClickNext(void* data); | ||
| 99 : | |||
| 100 : | protected: | ||
| 101 : | // Are we sliding onscreen? | ||
| 102 : | BOOL mAnimating; | ||
| 103 : | |||
| 104 : | // Time since this notification was displayed. | ||
| 105 : | // This is an LLTimer not a frame timer because I am concerned | ||
| 106 : | // that I could be out-of-sync by one frame in the animation. | ||
| 107 : | LLTimer mTimer; | ||
| 108 : | |||
| 109 : | LLButton* mNextBtn; | ||
| 110 : | LLButton* mSaveInventoryBtn; | ||
| 111 : | |||
| 112 : | static S32 sGroupNotifyBoxCount; | ||
| 113 : | |||
| 114 : | LLUUID mGroupID; | ||
| 115 : | BOOL mHasInventory; | ||
| 116 : | LLOfferInfo* mInventoryOffer; | ||
| 117 : | }; | ||
| 118 : | |||
| 119 : | // This view contains the stack of notification windows. | ||
| 120 : | //extern LLView* gGroupNotifyBoxView; | ||
| 121 : | |||
| 122 : | const S32 GROUP_LAYOUT_DEFAULT = 0; | ||
| 123 : | const S32 GROUP_LAYOUT_SCRIPT_DIALOG = 1; | ||
| 124 : | |||
| 125 : | #endif |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

