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/llnetmap.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/llnetmap.h')
-rw-r--r-- | linden/indra/newview/llnetmap.h | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/linden/indra/newview/llnetmap.h b/linden/indra/newview/llnetmap.h new file mode 100644 index 0000000..ffc0717 --- /dev/null +++ b/linden/indra/newview/llnetmap.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /** | ||
2 | * @file llnetmap.h | ||
3 | * @brief A little map of the world with network information | ||
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_LLNETMAP_H | ||
29 | #define LL_LLNETMAP_H | ||
30 | |||
31 | #include "llmath.h" | ||
32 | #include "lluictrl.h" | ||
33 | #include "v3math.h" | ||
34 | #include "v3dmath.h" | ||
35 | #include "v4color.h" | ||
36 | #include "llimage.h" | ||
37 | #include "llimagegl.h" | ||
38 | |||
39 | class LLColor4U; | ||
40 | class LLCoordGL; | ||
41 | class LLTextBox; | ||
42 | class LLMenuGL; | ||
43 | |||
44 | class LLRotateNetMapListener : public LLSimpleListener | ||
45 | { | ||
46 | public: | ||
47 | bool handleEvent(LLPointer<LLEvent>, const LLSD& user_data); | ||
48 | }; | ||
49 | |||
50 | class LLNetMap : public LLUICtrl | ||
51 | { | ||
52 | public: | ||
53 | LLNetMap(const std::string& name, const LLRect& rect, const LLColor4& bg_color ); | ||
54 | virtual ~LLNetMap(); | ||
55 | |||
56 | virtual EWidgetType getWidgetType() const; | ||
57 | virtual LLString getWidgetTag() const; | ||
58 | |||
59 | virtual void draw(); | ||
60 | virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); | ||
61 | virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); | ||
62 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | ||
63 | virtual BOOL handleToolTip( S32 x, S32 y, LLString& msg, LLRect* sticky_rect_screen ); | ||
64 | |||
65 | void setScale( F32 scale ); | ||
66 | void translatePan( F32 delta_x, F32 delta_y ); | ||
67 | void setPan( F32 x, F32 y ) { mTargetPanX = x; mTargetPanY = y; } | ||
68 | |||
69 | const LLVector3d& getObjectImageCenterGlobal() { return mObjectImageCenterGlobal; } | ||
70 | void renderPoint(const LLVector3 &pos, const LLColor4U &color, | ||
71 | S32 diameter, S32 relative_height = 0); | ||
72 | void renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius ); | ||
73 | |||
74 | LLVector3 globalPosToView(const LLVector3d& global_pos); | ||
75 | LLVector3d viewPosToGlobal(S32 x,S32 y); | ||
76 | |||
77 | static void setRotateMap( BOOL b ) { LLNetMap::sRotateMap = b; } | ||
78 | static void handleZoomLevel(void* which); | ||
79 | |||
80 | void drawTracking( const LLVector3d& pos_global, | ||
81 | const LLColor4& color, | ||
82 | BOOL draw_arrow = TRUE); | ||
83 | |||
84 | protected: | ||
85 | void setDirectionPos( LLTextBox* text_box, F32 rotation ); | ||
86 | void createObjectImage(); | ||
87 | static void teleport( const LLVector3d& destination ); | ||
88 | static void fly( const LLVector3d& destination ); | ||
89 | |||
90 | public: | ||
91 | LLViewHandle mPopupMenuHandle; | ||
92 | LLColor4 mBackgroundColor; | ||
93 | |||
94 | F32 mScale; // Size of a region in pixels | ||
95 | F32 mPixelsPerMeter; // world meters to map pixels | ||
96 | F32 mObjectMapTPM; // texels per meter on map | ||
97 | F32 mObjectMapPixels; // Width of object map in pixels; | ||
98 | F32 mTargetPanX; | ||
99 | F32 mTargetPanY; | ||
100 | F32 mCurPanX; | ||
101 | F32 mCurPanY; | ||
102 | BOOL mUpdateNow; | ||
103 | LLVector3d mObjectImageCenterGlobal; | ||
104 | LLPointer<LLImageRaw> mObjectRawImagep; | ||
105 | LLPointer<LLImageGL> mObjectImagep; | ||
106 | LLTextBox* mTextBoxEast; | ||
107 | LLTextBox* mTextBoxNorth; | ||
108 | LLTextBox* mTextBoxWest; | ||
109 | LLTextBox* mTextBoxSouth; | ||
110 | |||
111 | LLTextBox* mTextBoxSouthEast; | ||
112 | LLTextBox* mTextBoxNorthEast; | ||
113 | LLTextBox* mTextBoxNorthWest; | ||
114 | LLTextBox* mTextBoxSouthWest; | ||
115 | |||
116 | LLRotateNetMapListener mNetMapListener; | ||
117 | |||
118 | static BOOL sRotateMap; | ||
119 | static LLNetMap* sInstance; | ||
120 | }; | ||
121 | |||
122 | |||
123 | #endif | ||