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