aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/floaterbusy.h
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-04-06 22:27:24 -0700
committerMcCabe Maxsted2010-04-06 22:27:24 -0700
commitc6fbf529fce49017cbb7f3cbbfd3a11d611aa137 (patch)
tree23b0f3cf4f21a42a5da77a6e05a207f04792ae28 /linden/indra/newview/floaterbusy.h
parentCreated new Advanced preferences panel, ready for filling (diff)
downloadmeta-impy-c6fbf529fce49017cbb7f3cbbfd3a11d611aa137.zip
meta-impy-c6fbf529fce49017cbb7f3cbbfd3a11d611aa137.tar.gz
meta-impy-c6fbf529fce49017cbb7f3cbbfd3a11d611aa137.tar.bz2
meta-impy-c6fbf529fce49017cbb7f3cbbfd3a11d611aa137.tar.xz
Ported IM autoresponse options from Emerald, added them to a new window in Preferences > IM
Diffstat (limited to 'linden/indra/newview/floaterbusy.h')
-rw-r--r--linden/indra/newview/floaterbusy.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/linden/indra/newview/floaterbusy.h b/linden/indra/newview/floaterbusy.h
new file mode 100644
index 0000000..821d00d
--- /dev/null
+++ b/linden/indra/newview/floaterbusy.h
@@ -0,0 +1,88 @@
1/**
2* @file floaterbusy.h
3* @brief Custom busy mode settings for Imprudence
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2010, McCabe Maxsted
8*
9* Imprudence Viewer Source Code
10* The source code in this file ("Source Code") is provided to you
11* under the terms of the GNU General Public License, version 2.0
12* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
13* this distribution, or online at
14* http://secondlifegrid.net/programs/open_source/licensing/gplv2
15*
16* There are special exceptions to the terms and conditions of the GPL as
17* it is applied to this Source Code. View the full text of the exception
18* in the file doc/FLOSS-exception.txt in this software distribution, or
19* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20*
21* By copying, modifying or distributing this software, you acknowledge
22* that you have read and understood your obligations described above,
23* and agree to abide by those obligations.
24*
25* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
26* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$
29*/
30
31#ifndef FLOATERBUSY_H
32#define FLOATERBUSY_H
33
34#include "llfloater.h"
35
36class LLViewerInventoryItem;
37
38////////begin drop utility/////////////
39//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40// Class InvDropTarget
41//
42// This handy class is a simple way to drop something on another
43// view. It handles drop events, always setting itself to the size of
44// its parent.
45//
46// altered to support a callback so i can slap it in things and it just return the item to a func of my choice
47//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48class InvDropTarget : public LLView
49{
50public:
51 InvDropTarget(const std::string& name, const LLRect& rect, void (*callback)(LLViewerInventoryItem*));
52 ~InvDropTarget();
53
54 void doDrop(EDragAndDropType cargo_type, void* cargo_data);
55
56 //
57 // LLView functionality
58 virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
59 EDragAndDropType cargo_type,
60 void* cargo_data,
61 EAcceptance* accept,
62 std::string& tooltip_msg);
63protected:
64 void (*mDownCallback)(LLViewerInventoryItem*);
65};
66////////end drop utility///////////////
67
68class FloaterBusy : public LLFloater, public LLFloaterSingleton<FloaterBusy>
69{
70public:
71 FloaterBusy(const LLSD& seed);
72 virtual ~FloaterBusy();
73
74 BOOL postBuild();
75
76 void apply();
77 void cancel();
78
79private:
80 static InvDropTarget* mObjectDropTarget;
81
82 static void onClickOK(void* userdata);
83 static void onClickCancel(void* userdata);
84
85 static void IMAutoResponseItemDrop(LLViewerInventoryItem* item);
86};
87
88#endif FLOATERBUSY_H