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/llfloaterworldmap.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/llfloaterworldmap.h')
-rw-r--r-- | linden/indra/newview/llfloaterworldmap.h | 189 |
1 files changed, 189 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterworldmap.h b/linden/indra/newview/llfloaterworldmap.h new file mode 100644 index 0000000..67386c9 --- /dev/null +++ b/linden/indra/newview/llfloaterworldmap.h | |||
@@ -0,0 +1,189 @@ | |||
1 | /** | ||
2 | * @file llfloaterworldmap.h | ||
3 | * @brief LLFloaterWorldMap class definition | ||
4 | * | ||
5 | * Copyright (c) 2003-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 | /* | ||
29 | * Map of the entire world, with multiple background images, | ||
30 | * avatar tracking, teleportation by double-click, etc. | ||
31 | */ | ||
32 | |||
33 | #ifndef LL_LLFLOATERWORLDMAP_H | ||
34 | #define LL_LLFLOATERWORLDMAP_H | ||
35 | |||
36 | #include "lldarray.h" | ||
37 | #include "llfloater.h" | ||
38 | #include "llhudtext.h" | ||
39 | #include "llmapimagetype.h" | ||
40 | #include "lltracker.h" | ||
41 | |||
42 | class LLEventInfo; | ||
43 | class LLFriendObserver; | ||
44 | class LLInventoryModel; | ||
45 | class LLInventoryObserver; | ||
46 | class LLItemInfo; | ||
47 | class LLTabContainer; | ||
48 | class LLWorldMapView; | ||
49 | |||
50 | class LLFloaterWorldMap : public LLFloater | ||
51 | { | ||
52 | public: | ||
53 | LLFloaterWorldMap(); | ||
54 | virtual ~LLFloaterWorldMap(); | ||
55 | |||
56 | static void *createWorldMapView(void* data); | ||
57 | BOOL postBuild(); | ||
58 | |||
59 | virtual void onClose(bool app_quitting); | ||
60 | |||
61 | static void show(void*, BOOL center_on_target ); | ||
62 | static void reloadIcons(void*); | ||
63 | static void toggle(void*); | ||
64 | static void hide(void*); | ||
65 | |||
66 | virtual void reshape( S32 width, S32 height, BOOL called_from_parent = TRUE ); | ||
67 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | ||
68 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | ||
69 | virtual void setVisible(BOOL visible); | ||
70 | virtual void draw(); | ||
71 | |||
72 | // methods for dealing with inventory. The observe() method is | ||
73 | // called during program startup. inventoryUpdated() will be | ||
74 | // called by a helper object when an interesting change has | ||
75 | // occurred. | ||
76 | void observeInventory(LLInventoryModel* inventory); | ||
77 | void inventoryChanged(); | ||
78 | |||
79 | // Calls for dealing with changes in friendship | ||
80 | void observeFriends(); | ||
81 | void friendsChanged(); | ||
82 | |||
83 | // tracking methods | ||
84 | void trackAvatar( const LLUUID& avatar_id, const LLString& name ); | ||
85 | void trackLandmark( const LLUUID& landmark_item_id ); | ||
86 | void trackLocation(const LLVector3d& pos); | ||
87 | void trackEvent(const LLItemInfo &event_info); | ||
88 | void trackGenericItem(const LLItemInfo &item); | ||
89 | void trackURL(const LLString& region_name, S32 x_coord, S32 y_coord, S32 z_coord); | ||
90 | |||
91 | static const LLUUID& getHomeID() { return sHomeID; } | ||
92 | |||
93 | // A z_attenuation of 0.0f collapses the distance into the X-Y plane | ||
94 | F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; | ||
95 | |||
96 | void clearLocationSelection(BOOL clear_ui = FALSE); | ||
97 | void clearAvatarSelection(BOOL clear_ui = FALSE); | ||
98 | void clearLandmarkSelection(BOOL clear_ui = FALSE); | ||
99 | |||
100 | // Adjust the maximally zoomed out limit of the zoom slider so you can | ||
101 | // see the whole world, plus a little. | ||
102 | void adjustZoomSliderBounds(); | ||
103 | |||
104 | // Catch changes in the sim list | ||
105 | void updateSims(bool found_null_sim); | ||
106 | |||
107 | protected: | ||
108 | static void onPanBtn( void* userdata ); | ||
109 | |||
110 | static void onGoHome(void* data); | ||
111 | |||
112 | static void onLandmarkComboPrearrange( LLUICtrl* ctrl, void* data ); | ||
113 | static void onLandmarkComboCommit( LLUICtrl* ctrl, void* data ); | ||
114 | |||
115 | static void onAvatarComboPrearrange( LLUICtrl* ctrl, void* data ); | ||
116 | static void onAvatarComboCommit( LLUICtrl* ctrl, void* data ); | ||
117 | |||
118 | static void onCommitBackground(void* data, bool from_click); | ||
119 | |||
120 | static void onClearBtn(void*); | ||
121 | static void onFlyBtn(void*); | ||
122 | static void onTeleportBtn(void*); | ||
123 | static void onShowTargetBtn(void*); | ||
124 | static void onShowAgentBtn(void*); | ||
125 | static void onCopySLURL(void*); | ||
126 | |||
127 | static void onCheckEvents(LLUICtrl* ctrl, void*); | ||
128 | |||
129 | void centerOnTarget(BOOL animate); | ||
130 | void updateLocation(); | ||
131 | |||
132 | // fly to the tracked item, if there is one | ||
133 | void fly(); | ||
134 | |||
135 | // teleport to the tracked item, if there is one | ||
136 | void teleport(); | ||
137 | |||
138 | void buildLandmarkIDLists(); | ||
139 | static void onGoToLandmarkDialog(S32 option,void* userdata); | ||
140 | void flyToLandmark(); | ||
141 | void teleportToLandmark(); | ||
142 | void setLandmarkVisited(); | ||
143 | |||
144 | void buildAvatarIDList(); | ||
145 | void flyToAvatar(); | ||
146 | void teleportToAvatar(); | ||
147 | |||
148 | static void updateSearchEnabled( LLUICtrl* ctrl, void* userdata ); | ||
149 | static void onLocationCommit( void* userdata ); | ||
150 | static void onCommitLocation( LLUICtrl* ctrl, void* userdata ); | ||
151 | static void onCommitSearchResult( LLUICtrl* ctrl, void* userdata ); | ||
152 | |||
153 | void cacheLandmarkPosition(); | ||
154 | |||
155 | protected: | ||
156 | LLTabContainerCommon* mTabs; | ||
157 | |||
158 | // Sets gMapScale, in pixels per region | ||
159 | F32 mCurZoomVal; | ||
160 | LLFrameTimer mZoomTimer; | ||
161 | |||
162 | LLDynamicArray<LLUUID> mLandmarkAssetIDList; | ||
163 | LLDynamicArray<LLUUID> mLandmarkItemIDList; | ||
164 | BOOL mHasLandmarkPosition; | ||
165 | |||
166 | static const LLUUID sHomeID; | ||
167 | |||
168 | LLInventoryModel* mInventory; | ||
169 | LLInventoryObserver* mInventoryObserver; | ||
170 | LLFriendObserver* mFriendObserver; | ||
171 | |||
172 | LLString mCompletingRegionName; | ||
173 | LLString mLastRegionName; | ||
174 | BOOL mWaitingForTracker; | ||
175 | BOOL mExactMatch; | ||
176 | |||
177 | BOOL mIsClosing; | ||
178 | |||
179 | LLVector3d mTrackedLocation; | ||
180 | LLTracker::ETrackingStatus mTrackedStatus; | ||
181 | LLString mTrackedSimName; | ||
182 | LLString mTrackedAvatarName; | ||
183 | LLString mSLURL; | ||
184 | }; | ||
185 | |||
186 | extern LLFloaterWorldMap* gFloaterWorldMap; | ||
187 | |||
188 | #endif | ||
189 | |||