#ifndef ROOT_TGTableCell
#define ROOT_TGTableCell
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
class TGTable;
class TGString;
class TGTooltip;
class TGPicture;
class TObjArray;
class TGWindow;
class TGToolTip;
class TGTableCell : public TGFrame {
friend class TGTable;
protected:
TGString *fLabel;
TGToolTip *fTip;
Bool_t fReadOnly;
Bool_t fEnabled;
Int_t fTMode;
TGPicture *fImage;
UInt_t fTWidth;
UInt_t fTHeight;
FontStruct_t fFontStruct;
Bool_t fHasOwnFont;
GContext_t fNormGC;
UInt_t fColumn;
UInt_t fRow;
TGTable *fTable;
static const TGGC *fgDefaultGC;
static const TGFont *fgDefaultFont;
virtual void DoRedraw();
virtual void DrawBorder();
virtual void DrawBorder(Handle_t id, Int_t x, Int_t y);
virtual void MoveDraw(Int_t x, Int_t y);
virtual void Resize(UInt_t width, UInt_t height);
virtual void Resize(TGDimension newsize);
virtual void Highlight();
void Init(Bool_t resize);
public:
static FontStruct_t GetDefaultFontStruct();
static const TGGC &GetDefaultGC();
TGTableCell(const TGWindow *p = 0, TGTable *table = 0, TGString *label = 0,
UInt_t row = 0, UInt_t column = 0, UInt_t width = 80,
UInt_t height = 25, GContext_t norm = GetDefaultGC()(),
FontStruct_t font = GetDefaultFontStruct(), UInt_t option = 0,
Bool_t resize = kTRUE);
TGTableCell(const TGWindow *p, TGTable *table, const char *label,
UInt_t row = 0, UInt_t column = 0, UInt_t width = 80,
UInt_t height = 25, GContext_t norm = GetDefaultGC()(),
FontStruct_t font = GetDefaultFontStruct(),
UInt_t option = 0, Bool_t resize = kTRUE);
virtual ~TGTableCell();
virtual void DrawCopy(Handle_t id, Int_t x, Int_t y);
virtual void SetLabel(const char *label);
virtual void SetImage(TGPicture *image);
virtual void SetTextJustify(Int_t tmode);
virtual void SetFont(FontStruct_t font);
virtual void SetFont(const char *fontName);
virtual void Select();
virtual void SelectRow();
virtual void SelectColumn();
virtual UInt_t GetColumn() const { return fColumn; }
virtual UInt_t GetRow() const { return fRow; };
virtual TGString* GetLabel() const { return fLabel; }
virtual TGPicture* GetImage() const { return fImage; }
virtual UInt_t GetWidth() const { return fWidth; }
virtual UInt_t GetHeight() const {return fHeight; }
virtual TGDimension GetSize() const { return TGDimension(fWidth, fHeight); }
virtual Int_t GetTextJustify() const { return fTMode; }
ClassDef(TGTableCell, 0)
} ;
#endif