llcompass.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLCOMPASS_H
00033 #define LL_LLCOMPASS_H
00034 
00035 #include "llmath.h"
00036 #include "llview.h"
00037 #include "llviewerimage.h"
00038 #ifndef LL_V4COLOR_H
00039 #include "v4color.h"
00040 #endif
00041 
00042 //const char TAB = '\t';
00043 //const char DIVIDER[] = " / ";
00044 
00045 
00046 class LLCompass : public LLView
00047 {
00048 protected:
00049         LLPointer<LLViewerImage>        mTexture;
00050         LLPointer<LLViewerImage>        mBkgndTexture;
00051 public:
00052         LLCompass( const std::string& name, const LLRect& rect);
00053         
00054         void                    setTexture(LLUUID image_id);
00055         void                    setBkgndTexture(LLUUID image_id);
00056         virtual void    draw();
00057 
00058         inline friend std::ostream& operator<<(std::ostream& s, LLCompass &compass)
00059         {
00060 #if 0
00061                                                 s << "X,Y" << TAB;
00062                 s.width(10);    s << "In (new/total)";
00063                 s.width(0);             s << DIVIDER;
00064                 s.width(10);            s << "Lost (new/total)";
00065                 s.width(0);             s << DIVIDER;
00066                 s.width(5);             s << "Ping";
00067                 s.width(0);             s << DIVIDER;
00068                 s.width(6);             s << "Bandwidth";
00069                 s.width(0);             s << TAB << "IP:port" << endl;
00070                 for (LLCompassInfo* p = compass.mCompassList.getFirstData(); p != NULL; p = compass.mCompassList.getNextData())
00071                 {
00072                         s << *p;
00073                 }
00074 #endif
00075                 return s;
00076         }
00077 };
00078 
00079 class LLHorizontalCompass : public LLView
00080 {
00081 protected:
00082         LLColor4 mFocusColor;
00083         LLPointer<LLViewerImage>        mTexture;
00084 
00085 public:
00086         LLHorizontalCompass( const std::string& name, const LLRect& rect,
00087                                                  const LLColor4& focus_color,
00088                                                  const LLUUID& image_id );
00089         virtual ~LLHorizontalCompass( void ) {}
00090 
00091         void setTexture( const LLUUID& image_id );
00092         virtual void draw();
00093 };
00094 
00095 #endif

Generated on Thu Jul 1 06:08:22 2010 for Second Life Viewer by  doxygen 1.4.7