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/llhoverview.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 '')
-rw-r--r-- | linden/indra/newview/llhoverview.h | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/linden/indra/newview/llhoverview.h b/linden/indra/newview/llhoverview.h new file mode 100644 index 0000000..1fd1a2e --- /dev/null +++ b/linden/indra/newview/llhoverview.h | |||
@@ -0,0 +1,126 @@ | |||
1 | /** | ||
2 | * @file llhoverview.h | ||
3 | * @brief LLHoverView class definition | ||
4 | * | ||
5 | * Copyright (c) 2001-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_LLHOVERVIEW_H | ||
29 | #define LL_LLHOVERVIEW_H | ||
30 | |||
31 | // Library includes | ||
32 | #include "lluuid.h" | ||
33 | #include "llview.h" | ||
34 | #include "llframetimer.h" | ||
35 | #include "llstring.h" | ||
36 | #include "linked_lists.h" | ||
37 | #include "llcoord.h" | ||
38 | #include "v3dmath.h" | ||
39 | |||
40 | #include "lldarray.h" | ||
41 | #include "llhudconnector.h" | ||
42 | |||
43 | class LLSelectNodeList; | ||
44 | class LLTool; | ||
45 | |||
46 | // | ||
47 | // Classes | ||
48 | // | ||
49 | class LLHoverView : public LLView | ||
50 | { | ||
51 | public: | ||
52 | LLHoverView(const std::string& name, const LLRect& rect); | ||
53 | ~LLHoverView(); | ||
54 | |||
55 | virtual EWidgetType getWidgetType() const; | ||
56 | virtual LLString getWidgetTag() const; | ||
57 | |||
58 | /*virtual*/ void draw(); | ||
59 | |||
60 | void updateHover(LLTool* current_tool); | ||
61 | void cancelHover(); | ||
62 | |||
63 | // The last hovered object is retained even after the hover is | ||
64 | // cancelled, so allow it to be specifically reset. JC | ||
65 | void resetLastHoverObject(); | ||
66 | |||
67 | void setHoverActive(const BOOL active); | ||
68 | |||
69 | // We don't do hover picks while the user is typing. In fact, we stop | ||
70 | // until the mouse is moved. | ||
71 | void setTyping(BOOL b); | ||
72 | |||
73 | BOOL isHovering() const | ||
74 | { return isHoveringLand() || isHoveringObject(); } | ||
75 | |||
76 | BOOL isHoveringObject() const; | ||
77 | BOOL isHoveringLand() const; | ||
78 | |||
79 | LLViewerObject* getLastHoverObject() const; | ||
80 | |||
81 | static void pickCallback(S32 x, S32 y, MASK mask); | ||
82 | |||
83 | protected: | ||
84 | void updateText(); | ||
85 | |||
86 | protected: | ||
87 | LLFrameTimer mStartHoverTimer; | ||
88 | BOOL mStartHoverPickTimer; | ||
89 | BOOL mDoneHoverPick; | ||
90 | |||
91 | BOOL mHoverActive; | ||
92 | LLCoordGL mHoverPos; | ||
93 | |||
94 | // How long has the hover popup been visible? | ||
95 | LLFrameTimer mHoverTimer; | ||
96 | |||
97 | LLLinkedList<LLString> mText; | ||
98 | |||
99 | BOOL mUseHover; | ||
100 | |||
101 | // If not null and not dead, we're over an object. | ||
102 | LLPointer<LLViewerObject> mLastHoverObject; | ||
103 | |||
104 | // If not LLVector3d::zero, we're over land. | ||
105 | LLVector3d mHoverLandGlobal; | ||
106 | LLVector3d mHoverOffset; | ||
107 | |||
108 | LLDynamicArrayPtr<LLPointer<LLHUDConnector> > mConnectors; | ||
109 | |||
110 | BOOL mTyping; | ||
111 | |||
112 | public: | ||
113 | // Show in-world hover tips. Allow to turn off for movie making, game playing. | ||
114 | // Public so menu can directly toggle. | ||
115 | static BOOL sShowHoverTips; | ||
116 | }; | ||
117 | |||
118 | |||
119 | // | ||
120 | // Globals | ||
121 | // | ||
122 | |||
123 | extern LLHoverView *gHoverView; | ||
124 | |||
125 | |||
126 | #endif | ||