summaryrefslogtreecommitdiff
path: root/indra/newview/llnetmap.h
diff options
context:
space:
mode:
authorChristian Goetze <cg@lindenlab.com>2009-03-13 21:28:40 +0000
committerChristian Goetze <cg@lindenlab.com>2009-03-13 21:28:40 +0000
commit1aa0416aef379bb3ad1012441588b6d7fab81b40 (patch)
tree14a247470bd0d508aba923dc00e940b961d304da /indra/newview/llnetmap.h
parent7573288ab3ede23f97bff2f5caefcb622e7e9842 (diff)
svn merge -r114093:114412 svn+ssh://svn.lindenlab.com/svn/linden/branches/featurettes/featurettes-batch5-merge
Melinda (coco): 5th and final batch of featurettes. My work here is done.
Diffstat (limited to 'indra/newview/llnetmap.h')
-rw-r--r--indra/newview/llnetmap.h82
1 files changed, 50 insertions, 32 deletions
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index fd6635cb4c..a5bf9f0fb5 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -33,59 +33,55 @@
#ifndef LL_LLNETMAP_H
#define LL_LLNETMAP_H
-#include "llmath.h"
-#include "lluictrl.h"
+#include "llpanel.h"
+#include "llmemberlistener.h"
#include "v3math.h"
#include "v3dmath.h"
#include "v4color.h"
#include "llimage.h"
#include "llimagegl.h"
-class LLColor4U;
-class LLCoordGL;
+
class LLTextBox;
-class LLMenuGL;
-class LLNetMap : public LLUICtrl
+class LLNetMap : public LLPanel
{
public:
- LLNetMap(const std::string& name, const LLRect& rect, const LLColor4& bg_color );
+ LLNetMap(const std::string& name);
virtual ~LLNetMap();
virtual void draw();
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual BOOL handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rect_screen );
+ void renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius );
+
+private:
+
void setScale( F32 scale );
+
+ // *TODO: Enable panning of the mini-map
void translatePan( F32 delta_x, F32 delta_y );
void setPan( F32 x, F32 y ) { mTargetPanX = x; mTargetPanY = y; }
- const LLVector3d& getObjectImageCenterGlobal() { return mObjectImageCenterGlobal; }
void renderPoint(const LLVector3 &pos, const LLColor4U &color,
S32 diameter, S32 relative_height = 0);
- void renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &color, F32 radius );
-
- LLVector3 globalPosToView(const LLVector3d& global_pos);
- LLVector3d viewPosToGlobal(S32 x,S32 y);
-
- static void setRotateMap( BOOL b ) { LLNetMap::sRotateMap = b; }
- static void handleZoomLevel(void* which);
+ LLVector3 globalPosToView(const LLVector3d& global_pos, BOOL rotated);
+ LLVector3d viewPosToGlobal(S32 x,S32 y, BOOL rotated);
- void drawTracking( const LLVector3d& pos_global,
- const LLColor4& color,
- BOOL draw_arrow = TRUE);
+ void drawTracking( const LLVector3d& pos_global,
+ BOOL rotated,
+ const LLColor4& color,
+ BOOL draw_arrow = TRUE);
-protected:
void setDirectionPos( LLTextBox* text_box, F32 rotation );
+ void updateMinorDirections();
void createObjectImage();
- static void teleport( const LLVector3d& destination );
- static void fly( const LLVector3d& destination );
-public:
LLHandle<LLView> mPopupMenuHandle;
- LLColor4 mBackgroundColor;
F32 mScale; // Size of a region in pixels
F32 mPixelsPerMeter; // world meters to map pixels
@@ -99,15 +95,6 @@ public:
LLVector3d mObjectImageCenterGlobal;
LLPointer<LLImageRaw> mObjectRawImagep;
LLPointer<LLImageGL> mObjectImagep;
- LLTextBox* mTextBoxEast;
- LLTextBox* mTextBoxNorth;
- LLTextBox* mTextBoxWest;
- LLTextBox* mTextBoxSouth;
-
- LLTextBox* mTextBoxSouthEast;
- LLTextBox* mTextBoxNorthEast;
- LLTextBox* mTextBoxNorthWest;
- LLTextBox* mTextBoxSouthWest;
private:
LLUUID mClosestAgentToCursor;
@@ -117,6 +104,37 @@ private:
static LLNetMap* sInstance;
static BOOL isAgentUnderCursor(void*) { return sInstance && sInstance->mClosestAgentToCursor.notNull(); }
static void showAgentProfile(void*);
+ BOOL isAgentUnderCursor() { return mClosestAgentToCursor.notNull(); }
+
+ class LLScaleMap : public LLMemberListener<LLNetMap>
+ {
+ public:
+ /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
+ };
+
+ class LLStopTracking : public LLMemberListener<LLNetMap>
+ {
+ public:
+ /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
+ };
+
+ class LLEnableTracking : public LLMemberListener<LLNetMap>
+ {
+ public:
+ /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
+ };
+
+ class LLShowAgentProfile : public LLMemberListener<LLNetMap>
+ {
+ public:
+ /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
+ };
+
+ class LLEnableProfile : public LLMemberListener<LLNetMap>
+ {
+ public:
+ /*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
+ };
};