00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGStatusBar
00013 #define ROOT_TGStatusBar
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TGFrame
00025 #include "TGFrame.h"
00026 #endif
00027
00028 class TGStatusBarPart;
00029
00030
00031 class TGStatusBar : public TGHorizontalFrame {
00032
00033 friend class TGStatusBarPart;
00034
00035 private:
00036 TGStatusBar(const TGStatusBar&);
00037 TGStatusBar& operator=(const TGStatusBar&);
00038
00039 protected:
00040 TGStatusBarPart **fStatusPart;
00041 Int_t *fParts;
00042 Int_t fNpart;
00043 Int_t fYt;
00044 Int_t *fXt;
00045 Bool_t f3DCorner;
00046
00047 static const TGFont *fgDefaultFont;
00048 static TGGC *fgDefaultGC;
00049
00050 virtual void DoRedraw();
00051
00052 static FontStruct_t GetDefaultFontStruct();
00053 static const TGGC &GetDefaultGC();
00054
00055 public:
00056 TGStatusBar(const TGWindow *p = 0, UInt_t w = 4, UInt_t h = 2,
00057 UInt_t options = kSunkenFrame | kHorizontalFrame,
00058 Pixel_t back = GetDefaultFrameBackground());
00059 virtual ~TGStatusBar();
00060
00061 virtual void DrawBorder();
00062 virtual void SetText(TGString *text, Int_t partidx = 0);
00063 virtual void SetText(const char *text, Int_t partidx = 0);
00064 void AddText(const char *text, Int_t partidx = 0)
00065 { SetText(text, partidx); }
00066 const char *GetText(Int_t partidx = 0) const;
00067 virtual void SetParts(Int_t npart);
00068 virtual void SetParts(Int_t *parts, Int_t npart);
00069 void Draw3DCorner(Bool_t corner) { f3DCorner = corner; }
00070 TGCompositeFrame *GetBarPart(Int_t npart) const;
00071 TGDimension GetDefaultSize() const;
00072
00073 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00074
00075 ClassDef(TGStatusBar,0)
00076 };
00077
00078 #endif