Logo ROOT  
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 #include "TGTableCell.h"
15 
20 };
21 
22 class TGWindow;
23 
24 class TGTableHeader : public TGTableCell {
25 
26 protected:
27  EHeaderType fType; ///< Type of header
28  UInt_t fWidth; ///< Width for the column
29  UInt_t fHeight; ///< Height of the row
30  Bool_t fReadOnly; ///< Cell readonly state
31  Bool_t fEnabled; ///< Cell enabled state
32  Bool_t fHasOwnLabel; ///< Flag on default or specific label usage
33 
34  void Init();
35 
36 public:
37  TGTableHeader(const TGWindow *p = 0, TGTable *table = 0,
38  TGString *label = 0, UInt_t position = 0,
40  UInt_t height = 25, GContext_t norm = GetDefaultGC()(),
42  UInt_t option = 0);
43  TGTableHeader(const TGWindow *p, TGTable *table, const char *label,
45  UInt_t width = 80, UInt_t height = 25,
46  GContext_t norm = GetDefaultGC()(),
48  UInt_t option = 0);
49  virtual ~TGTableHeader();
50 
51  virtual void SetWidth(UInt_t width);
52  virtual void SetHeight(UInt_t height);
53 
54  virtual void SetLabel(const char *label);
55 
56  virtual void SetDefaultLabel();
57  virtual void SetPosition(UInt_t pos);
58  virtual void Resize(UInt_t width, UInt_t height); // Resize width or height
59  virtual void Resize(TGDimension newsize); // depending on type
60  virtual void Sort(Bool_t order = kSortAscending);
61  virtual void UpdatePosition();
62 
63  virtual EHeaderType GetType() { return fType; }
64 
65  ClassDef(TGTableHeader, 0) // Header for use in TGTable.
66 };
67 
68 #endif
TGTableHeader::fHeight
UInt_t fHeight
Height of the row.
Definition: TGTableHeader.h:29
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
kTableHeader
@ kTableHeader
Definition: TGTableHeader.h:19
TGDimension
Definition: TGDimension.h:18
FontStruct_t
Handle_t FontStruct_t
Pointer to font structure.
Definition: GuiTypes.h:39
TGTableCell::GetDefaultFontStruct
static FontStruct_t GetDefaultFontStruct()
Return default font structure.
Definition: TGTableCell.cxx:195
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TGTableHeader::UpdatePosition
virtual void UpdatePosition()
Update the positon of the TGTableHeader.
Definition: TGTableHeader.cxx:235
TGTableHeader::Resize
virtual void Resize(UInt_t width, UInt_t height)
Resize the TGTableHeader.
Definition: TGTableHeader.cxx:214
TGTableHeader::GetType
virtual EHeaderType GetType()
Definition: TGTableHeader.h:63
bool
TGTableHeader::fHasOwnLabel
Bool_t fHasOwnLabel
Flag on default or specific label usage.
Definition: TGTableHeader.h:32
GContext_t
Handle_t GContext_t
Graphics context handle.
Definition: GuiTypes.h:38
TGTableHeader::~TGTableHeader
virtual ~TGTableHeader()
TGTableHeader destructor.
Definition: TGTableHeader.cxx:108
TGTableHeader::SetDefaultLabel
virtual void SetDefaultLabel()
Set the label of the TGTableHeader to the default label, "Row #" or "Col #".
Definition: TGTableHeader.cxx:165
TGTableHeader::Init
void Init()
Initialize the TGTableHeader.
Definition: TGTableHeader.cxx:115
TGTableHeader::fWidth
UInt_t fWidth
Width for the column.
Definition: TGTableHeader.h:28
TGTableCell::GetDefaultGC
static const TGGC & GetDefaultGC()
Return default graphics context.
Definition: TGTableCell.cxx:205
TGTableHeader::SetPosition
virtual void SetPosition(UInt_t pos)
Set the position of the TGTableHeader to pos.
Definition: TGTableHeader.cxx:187
TGTableHeader::fEnabled
Bool_t fEnabled
Cell enabled state.
Definition: TGTableHeader.h:31
TGTableHeader::SetLabel
virtual void SetLabel(const char *label)
Set the label of the TGTableHeader to label.
Definition: TGTableHeader.cxx:152
EHeaderType
EHeaderType
Definition: TGTableHeader.h:16
TGTableHeader::SetWidth
virtual void SetWidth(UInt_t width)
Resize the TGTableHeader.
Definition: TGTableHeader.cxx:136
unsigned int
TGTableHeader::TGTableHeader
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 constructor.
Definition: TGTableHeader.cxx:37
TGTableHeader
TGTableHeader is the class that implements a header for a row or column.
Definition: TGTableHeader.h:24
TGTableHeader::SetHeight
virtual void SetHeight(UInt_t height)
Resize the TGTableHeader.
Definition: TGTableHeader.cxx:144
kColumnHeader
@ kColumnHeader
Definition: TGTableHeader.h:17
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGTableHeader::fType
EHeaderType fType
Type of header.
Definition: TGTableHeader.h:27
TGTableCell
TGTableCell is the class that represents a single cell in a TGTable.
Definition: TGTableCell.h:24
kSortAscending
const Bool_t kSortAscending
Definition: TList.h:37
TGTableHeader::fReadOnly
Bool_t fReadOnly
Cell readonly state.
Definition: TGTableHeader.h:30
type
int type
Definition: TGX11.cxx:121
TGString
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Definition: TGString.h:20
TGTable
Create an array to hold a bunch of numbers.
Definition: TGTable.h:34
TGTableHeader::Sort
virtual void Sort(Bool_t order=kSortAscending)
Sort the contents of this row or column in given order.
Definition: TGTableHeader.cxx:223
TGTableCell.h
kRowHeader
@ kRowHeader
Definition: TGTableHeader.h:18