Logo ROOT   6.08/07
Reference Guide
TGTableHeader.h
Go to the documentation of this file.
1 // Author: Roel Aaij 21/07/2007
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOT_TGTableHeader
12 #define ROOT_TGTableHeader
13 
14 #ifndef ROOT_TGTableCell
15 #include "TGTableCell.h"
16 #endif
17 
22 };
23 
24 class TGWindow;
25 
26 class TGTableHeader : public TGTableCell {
27 
28 protected:
29  EHeaderType fType; // Type of header
30  UInt_t fWidth; // Width for the column
31  UInt_t fHeight; // Height of the row
32  Bool_t fReadOnly; // Cell readonly state
33  Bool_t fEnabled; // Cell enabled state
34  Bool_t fHasOwnLabel; // Flag on default or specific label usage
35 
36  void Init();
37 
38 public:
39  TGTableHeader(const TGWindow *p = 0, TGTable *table = 0,
40  TGString *label = 0, UInt_t position = 0,
41  EHeaderType type = kColumnHeader, UInt_t width = 80,
42  UInt_t height = 25, GContext_t norm = GetDefaultGC()(),
44  UInt_t option = 0);
45  TGTableHeader(const TGWindow *p, TGTable *table, const char *label,
47  UInt_t width = 80, UInt_t height = 25,
50  UInt_t option = 0);
51  virtual ~TGTableHeader();
52 
53  virtual void SetWidth(UInt_t width);
54  virtual void SetHeight(UInt_t height);
55 
56  virtual void SetLabel(const char *label);
57 
58  virtual void SetDefaultLabel();
59  virtual void SetPosition(UInt_t pos);
60  virtual void Resize(UInt_t width, UInt_t height); // Resize width or height
61  virtual void Resize(TGDimension newsize); // depending on type
62  virtual void Sort(Bool_t order = kSortAscending);
63  virtual void UpdatePosition();
64 
65  virtual EHeaderType GetType() { return fType; }
66 
67  ClassDef(TGTableHeader, 0) // Header for use in TGTable.
68 };
69 
70 #endif
Handle_t FontStruct_t
Definition: GuiTypes.h:40
TGTableHeader(const TGWindow *p=0, TGTable *table=0, TGString *label=0, UInt_t position=0, EHeaderType type=kColumnHeader, UInt_t width=80, UInt_t height=25, GContext_t norm=GetDefaultGC()(), FontStruct_t font=GetDefaultFontStruct(), UInt_t option=0)
TGTableHeader constuctor.
virtual void Resize(UInt_t width, UInt_t height)
Resize the TGTableHeader.
Handle_t GContext_t
Definition: GuiTypes.h:39
bool Bool_t
Definition: RtypesCore.h:59
virtual void Sort(Bool_t order=kSortAscending)
Sort the contents of this row or column in given order.
static FontStruct_t GetDefaultFontStruct()
Return default font structure.
Bool_t fHasOwnLabel
Definition: TGTableHeader.h:34
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual ~TGTableHeader()
TGTableHeader destructor.
EHeaderType fType
Definition: TGTableHeader.h:29
void Init()
Initialize the TGTableHeader.
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void SetWidth(UInt_t width)
Resize the TGTableHeader.
virtual EHeaderType GetType()
Definition: TGTableHeader.h:65
virtual void SetHeight(UInt_t height)
Resize the TGTableHeader.
virtual void SetPosition(UInt_t pos)
Set the position of the TGTableHeader to pos.
static const TGGC & GetDefaultGC()
Return default graphics context.
int type
Definition: TGX11.cxx:120
const Bool_t kSortAscending
Definition: TList.h:40
virtual void SetLabel(const char *label)
Set the label of the TGTableHeader to label.
EHeaderType
Definition: TGTableHeader.h:18
virtual void SetDefaultLabel()
Set the label of the TGTableHeader to the default label, "Row #" or "Col #".
Bool_t fReadOnly
Definition: TGTableHeader.h:32
double norm(double *x, double *p)
Definition: unuranDistr.cxx:40
virtual void UpdatePosition()
Update the positon of the TGTableHeader.