00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGString
00013 #define ROOT_TGString
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef ROOT_TString
00027 #include "TString.h"
00028 #endif
00029 #ifndef ROOT_GuiTypes
00030 #include "GuiTypes.h"
00031 #endif
00032
00033
00034 class TGString : public TString {
00035
00036 public:
00037 TGString() : TString() { }
00038 TGString(const char *s) : TString(s) { }
00039 TGString(Int_t number) : TString() { *this += number; }
00040 TGString(const TGString *s);
00041 virtual ~TGString() { }
00042
00043 Int_t GetLength() const { return Length(); }
00044 const char *GetString() const { return Data(); }
00045 virtual void SetString(const char *s) { *this = s; }
00046
00047 virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y);
00048 virtual void DrawWrapped(Drawable_t id, GContext_t gc,
00049 Int_t x, Int_t y, UInt_t w, FontStruct_t font);
00050 virtual Int_t GetLines(FontStruct_t font, UInt_t w);
00051
00052 ClassDef(TGString,0)
00053 };
00054
00055
00056 class TGHotString : public TGString {
00057
00058 protected:
00059 char fHotChar;
00060 Int_t fHotPos;
00061
00062 GContext_t fLastGC;
00063 Int_t fOff1;
00064 Int_t fOff2;
00065
00066 void DrawHotChar(Drawable_t id, GContext_t gc, Int_t x, Int_t y);
00067
00068 public:
00069 TGHotString(const char *s);
00070
00071 Int_t GetHotChar() const { return fHotChar; }
00072 Int_t GetHotPos() const { return fHotPos; }
00073 virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y);
00074 virtual void DrawWrapped(Drawable_t id, GContext_t gc,
00075 Int_t x, Int_t y, UInt_t w, FontStruct_t font);
00076
00077 ClassDef(TGHotString,0)
00078 };
00079
00080 #endif