Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// Author: Roel Aaij 21/07/2007
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 *************************************************************************/
11#ifndef ROOT_TGTableHeader
12#define ROOT_TGTableHeader
14#include "TGTableCell.h"
22class TGWindow;
24class TGTableHeader : public TGTableCell {
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
34 void Init();
37 TGTableHeader(const TGWindow *p = nullptr, TGTable *table = nullptr,
38 TGString *label = nullptr, 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();
51 void SetWidth(UInt_t width) override;
52 void SetHeight(UInt_t height) override;
54 void SetLabel(const char *label) override;
56 virtual void SetDefaultLabel();
57 virtual void SetPosition(UInt_t pos);
58 void Resize(UInt_t width, UInt_t height) override; // Resize width or height
59 void Resize(TGDimension newsize) override; // depending on type
60 virtual void Sort(Bool_t order = kSortAscending);
61 virtual void UpdatePosition();
63 virtual EHeaderType GetType() { return fType; }
65 ClassDefOverride(TGTableHeader, 0) // Header for use in TGTable.
Handle_t GContext_t
Graphics context handle.
Definition: GuiTypes.h:38
Handle_t FontStruct_t
Pointer to font structure.
Definition: GuiTypes.h:39
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Definition: TGTableHeader.h:16
@ kColumnHeader
Definition: TGTableHeader.h:17
@ kRowHeader
Definition: TGTableHeader.h:18
@ kTableHeader
Definition: TGTableHeader.h:19
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
const Bool_t kSortAscending
Definition: TList.h:31
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Definition: TGString.h:20
TGTableCell is the class that represents a single cell in a TGTable.
Definition: TGTableCell.h:24
static FontStruct_t GetDefaultFontStruct()
Return default font structure.
static const TGGC & GetDefaultGC()
Return default graphics context.
TGTableHeader is the class that implements a header for a row or column.
Definition: TGTableHeader.h:24
virtual EHeaderType GetType()
Definition: TGTableHeader.h:63
void Resize(UInt_t width, UInt_t height) override
Resize the TGTableHeader.
void SetWidth(UInt_t width) override
Resize the TGTableHeader.
virtual void SetPosition(UInt_t pos)
Set the position of the TGTableHeader to pos.
UInt_t fWidth
Width for the column.
Definition: TGTableHeader.h:28
EHeaderType fType
Type of header.
Definition: TGTableHeader.h:27
UInt_t fHeight
Height of the row.
Definition: TGTableHeader.h:29
virtual void Sort(Bool_t order=kSortAscending)
Sort the contents of this row or column in given order.
void Init()
Initialize the TGTableHeader.
Bool_t fHasOwnLabel
Flag on default or specific label usage.
Definition: TGTableHeader.h:32
TGTableHeader(const TGWindow *p=nullptr, TGTable *table=nullptr, TGString *label=nullptr, 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.
virtual ~TGTableHeader()
TGTableHeader destructor.
virtual void UpdatePosition()
Update the positon of the TGTableHeader.
virtual void SetDefaultLabel()
Set the label of the TGTableHeader to the default label, "Row #" or "Col #".
void SetLabel(const char *label) override
Set the label of the TGTableHeader to label.
Bool_t fEnabled
Cell enabled state.
Definition: TGTableHeader.h:31
void SetHeight(UInt_t height) override
Resize the TGTableHeader.
Bool_t fReadOnly
Cell readonly state.
Definition: TGTableHeader.h:30
Create an array to hold a bunch of numbers.
Definition: TGTable.h:34
ROOT GUI Window base class.
Definition: TGWindow.h:23