File indexing completed on 2025-01-18 10:12:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TGTableHeader
0012 #define ROOT_TGTableHeader
0013
0014 #include "TGTableCell.h"
0015
0016 enum EHeaderType {
0017 kColumnHeader,
0018 kRowHeader,
0019 kTableHeader
0020 };
0021
0022 class TGWindow;
0023
0024 class TGTableHeader : public TGTableCell {
0025
0026 protected:
0027 EHeaderType fType;
0028 UInt_t fWidth;
0029 UInt_t fHeight;
0030 Bool_t fReadOnly;
0031 Bool_t fEnabled;
0032 Bool_t fHasOwnLabel;
0033
0034 void Init();
0035
0036 public:
0037 TGTableHeader(const TGWindow *p = nullptr, TGTable *table = nullptr,
0038 TGString *label = nullptr, UInt_t position = 0,
0039 EHeaderType type = kColumnHeader, UInt_t width = 80,
0040 UInt_t height = 25, GContext_t norm = GetDefaultGC()(),
0041 FontStruct_t font = GetDefaultFontStruct(),
0042 UInt_t option = 0);
0043 TGTableHeader(const TGWindow *p, TGTable *table, const char *label,
0044 UInt_t position, EHeaderType type = kColumnHeader,
0045 UInt_t width = 80, UInt_t height = 25,
0046 GContext_t norm = GetDefaultGC()(),
0047 FontStruct_t font = GetDefaultFontStruct(),
0048 UInt_t option = 0);
0049 ~TGTableHeader() override;
0050
0051 void SetWidth(UInt_t width) override;
0052 void SetHeight(UInt_t height) override;
0053
0054 void SetLabel(const char *label) override;
0055
0056 virtual void SetDefaultLabel();
0057 virtual void SetPosition(UInt_t pos);
0058 void Resize(UInt_t width, UInt_t height) override;
0059 void Resize(TGDimension newsize) override;
0060 virtual void Sort(Bool_t order = kSortAscending);
0061 virtual void UpdatePosition();
0062
0063 virtual EHeaderType GetType() { return fType; }
0064
0065 ClassDefOverride(TGTableHeader, 0)
0066 };
0067
0068 #endif