llstatusbar.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLSTATUSBAR_H
00033 #define LL_LLSTATUSBAR_H
00034 
00035 #include "llpanel.h"
00036 
00037 // "Constants" loaded from settings.xml at start time
00038 extern S32 STATUS_BAR_HEIGHT;
00039 
00040 class LLButton;
00041 class LLLineEditor;
00042 class LLMessageSystem;
00043 class LLTextBox;
00044 class LLTextEditor;
00045 class LLUICtrl;
00046 class LLUUID;
00047 class LLFrameTimer;
00048 class LLStatGraph;
00049 
00050 // used by LCD screen
00051 class cLLRegionDetails
00052 {
00053 public:
00054         LLString mRegionName;
00055         char    *mParcelName;
00056         char    *mAccesString;
00057         S32             mX;
00058         S32             mY;
00059         S32             mZ;
00060         S32             mArea;
00061         BOOL    mForSale;
00062         char    mOwner[MAX_STRING];
00063         F32             mTraffic;
00064         S32             mBalance;
00065         LLString        mTime;
00066         U32             mPing;
00067 };
00068 
00069 class LLStatusBar
00070 :       public LLPanel
00071 {
00072 public:
00073         LLStatusBar(const std::string& name, const LLRect& rect );
00074         /*virtual*/ ~LLStatusBar();
00075         
00076         /*virtual*/ EWidgetType getWidgetType() const;
00077         /*virtual*/ LLString getWidgetTag() const;
00078 
00079         /*virtual*/ void draw();
00080 
00081         // MANIPULATORS
00082         void            setBalance(S32 balance);
00083         void            debitBalance(S32 debit);
00084         void            creditBalance(S32 credit);
00085 
00086         void            setHealth(S32 percent);
00087 
00088         void setLandCredit(S32 credit);
00089         void setLandCommitted(S32 committed);
00090 
00091         void            refresh();
00092         void setVisibleForMouselook(bool visible);
00093                 // some elements should hide in mouselook
00094 
00095         // ACCESSORS
00096         S32                     getBalance() const;
00097         S32                     getHealth() const;
00098 
00099         BOOL isUserTiered() const;
00100         S32 getSquareMetersCredit() const;
00101         S32 getSquareMetersCommitted() const;
00102         S32 getSquareMetersLeft() const;
00103         cLLRegionDetails mRegionDetails;
00104 
00105 private:
00106         // simple method to setup the part that holds the date
00107         void setupDate();
00108 
00109         static void onCommitSearch(LLUICtrl*, void* data);
00110         static void onClickSearch(void* data);
00111 
00112 private:
00113         LLTextBox       *mTextBalance;
00114         LLTextBox       *mTextHealth;
00115         LLTextBox       *mTextTime;
00116 
00117         LLTextBox*      mTextParcelName;
00118 
00119         LLButton        *mBtnBuyCurrency;
00120 
00121         S32                             mBalance;
00122         S32                             mHealth;
00123         S32                             mSquareMetersCredit;
00124         S32                             mSquareMetersCommitted;
00125         LLFrameTimer*   mBalanceTimer;
00126         LLFrameTimer*   mHealthTimer;
00127         
00128         static std::vector<std::string> sDays;
00129         static std::vector<std::string> sMonths;
00130         static const U32 MAX_DATE_STRING_LENGTH;
00131 };
00132 
00133 // *HACK: Status bar owns your cached money balance. JC
00134 BOOL can_afford_transaction(S32 cost);
00135 
00136 extern LLStatusBar *gStatusBar;
00137 
00138 #endif

Generated on Thu Jul 1 06:09:13 2010 for Second Life Viewer by  doxygen 1.4.7