00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGFSComboBox
00013 #define ROOT_TGFSComboBox
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef ROOT_TGComboBox
00026 #include "TGComboBox.h"
00027 #endif
00028
00029
00030
00031 class TGPicture;
00032 class TGSelectedPicture;
00033
00034
00035 class TGTreeLBEntry : public TGLBEntry {
00036
00037 protected:
00038 TGString *fText;
00039 TGString *fPath;
00040 const TGPicture *fPic;
00041 TGSelectedPicture *fSelPic;
00042 UInt_t fTWidth;
00043 UInt_t fTHeight;
00044 Bool_t fActive;
00045 GContext_t fNormGC;
00046 FontStruct_t fFontStruct;
00047
00048 virtual void DoRedraw();
00049
00050 static const TGFont *fgDefaultFont;
00051 static TGGC *fgDefaultGC;
00052
00053 public:
00054 static FontStruct_t GetDefaultFontStruct();
00055 static const TGGC &GetDefaultGC();
00056
00057 TGTreeLBEntry(const TGWindow *p = 0, TGString *text = 0, const TGPicture *pic = 0,
00058 Int_t id = -1, TGString *path = 0, GContext_t norm = GetDefaultGC()(),
00059 FontStruct_t font = GetDefaultFontStruct(),
00060 UInt_t options = kHorizontalFrame, Pixel_t back = GetWhitePixel());
00061 virtual ~TGTreeLBEntry();
00062
00063 const TGString *GetText() const { return fText; }
00064 const TGPicture *GetPicture() const { return fPic; }
00065 const TGString *GetPath() const { return fPath; }
00066
00067 virtual TGDimension GetDefaultSize() const;
00068
00069 virtual void Activate(Bool_t a);
00070 virtual void Update(TGLBEntry *e);
00071 virtual void DrawCopy(Handle_t id, Int_t x, Int_t y);
00072
00073 ClassDef(TGTreeLBEntry,0)
00074 };
00075
00076
00077 class TGFSComboBox : public TGComboBox {
00078
00079 public:
00080 TGFSComboBox(const TGWindow *p = 0, Int_t id = -1,
00081 UInt_t options = kHorizontalFrame | kSunkenFrame |
00082 kDoubleBorder, Pixel_t back = GetWhitePixel());
00083
00084 virtual void Update(const char *path);
00085 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00086
00087 ClassDef(TGFSComboBox,0)
00088 };
00089
00090 #endif