Warning, file /include/root/TGTableCell.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TGTableCell
0012 #define ROOT_TGTableCell
0013
0014 #include "TGFrame.h"
0015
0016 class TGTable;
0017 class TGString;
0018 class TGTooltip;
0019 class TGPicture;
0020 class TObjArray;
0021 class TGWindow;
0022 class TGToolTip;
0023
0024 class TGTableCell : public TGFrame {
0025
0026 friend class TGTable;
0027
0028 protected:
0029 TGString *fLabel;
0030 TGToolTip *fTip;
0031 Bool_t fReadOnly;
0032 Bool_t fEnabled;
0033 Int_t fTMode;
0034 TGPicture *fImage;
0035 UInt_t fTWidth;
0036 UInt_t fTHeight;
0037 FontStruct_t fFontStruct;
0038 Bool_t fHasOwnFont;
0039 GContext_t fNormGC;
0040 UInt_t fColumn;
0041 UInt_t fRow;
0042 TGTable *fTable;
0043
0044 static const TGGC *fgDefaultGC;
0045 static const TGFont *fgDefaultFont;
0046
0047 void DoRedraw() override;
0048 void DrawBorder() override;
0049 virtual void DrawBorder(Handle_t id, Int_t x, Int_t y);
0050 virtual void MoveDraw(Int_t x, Int_t y);
0051 void Resize(UInt_t width, UInt_t height) override;
0052 void Resize(TGDimension newsize) override;
0053
0054 virtual void Highlight();
0055 void Init(Bool_t resize);
0056
0057 public:
0058 static FontStruct_t GetDefaultFontStruct();
0059 static const TGGC &GetDefaultGC();
0060
0061 TGTableCell(const TGWindow *p = nullptr, TGTable *table = nullptr, TGString *label = nullptr,
0062 UInt_t row = 0, UInt_t column = 0, UInt_t width = 80,
0063 UInt_t height = 25, GContext_t norm = GetDefaultGC()(),
0064 FontStruct_t font = GetDefaultFontStruct(), UInt_t option = 0,
0065 Bool_t resize = kTRUE);
0066 TGTableCell(const TGWindow *p, TGTable *table, const char *label,
0067 UInt_t row = 0, UInt_t column = 0, UInt_t width = 80,
0068 UInt_t height = 25, GContext_t norm = GetDefaultGC()(),
0069 FontStruct_t font = GetDefaultFontStruct(),
0070 UInt_t option = 0, Bool_t resize = kTRUE);
0071
0072 ~TGTableCell() override;
0073
0074 void DrawCopy(Handle_t id, Int_t x, Int_t y) override;
0075
0076 virtual void SetLabel(const char *label);
0077
0078 virtual void SetImage(TGPicture *image);
0079
0080
0081 virtual void SetTextJustify(Int_t tmode);
0082 virtual void SetFont(FontStruct_t font);
0083 virtual void SetFont(const char *fontName);
0084
0085 virtual void Select();
0086 virtual void SelectRow();
0087 virtual void SelectColumn();
0088
0089 virtual UInt_t GetColumn() const { return fColumn; }
0090 virtual UInt_t GetRow() const { return fRow; };
0091 virtual TGString* GetLabel() const { return fLabel; }
0092 virtual TGPicture* GetImage() const { return fImage; }
0093 virtual UInt_t GetWidth() const { return fWidth; }
0094 virtual UInt_t GetHeight() const {return fHeight; }
0095 virtual TGDimension GetSize() const { return TGDimension(fWidth, fHeight); }
0096 virtual Int_t GetTextJustify() const { return fTMode; }
0097
0098 ClassDefOverride(TGTableCell, 0)
0099 };
0100
0101 #endif