ROOT  6.06/09
Reference Guide
TGTableContainer.h
Go to the documentation of this file.
1 // Author: Roel Aaij 14/08/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_TGTableFrame
12 #define ROOT_TGTableFrame
13 
14 #ifndef ROOT_TGCanvas
15 #include "TGCanvas.h"
16 #endif
17 #ifndef ROOT_TGTableHeader
18 #include "TGTableHeader.h"
19 #endif
20 
21 class TGTableFrame : public TQObject {
22 
23 protected:
24  TGCompositeFrame *fFrame; // Composite frame used as a container
25  TGCanvas *fCanvas; // Pointer to the canvas that used this frame.
26 
27 public:
28  TGTableFrame(const TGWindow *p, UInt_t nrows, UInt_t ncolumns);
29  virtual ~TGTableFrame() { delete fFrame; }
30 
31  TGFrame *GetFrame() const { return fFrame; }
32 
33  void SetCanvas(TGCanvas *canvas) { fCanvas = canvas; }
34  void HandleMouseWheel(Event_t *event);
35  virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h);
36 
37  ClassDef(TGTableFrame, 0) // A frame used internally by TGTable.
38 };
39 
41 
42 protected:
43  Int_t fX0; // X coordinate of the header frame
44  Int_t fY0; // Y coordinate of the header frame
45  TGTable *fTable; // Table that this frame belongs to
46 
47 public:
48  TGTableHeaderFrame(const TGWindow *p, TGTable *table = 0, UInt_t w = 1,
50  UInt_t option = 0);
52 
53  virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h);
54 
55  ClassDef(TGTableHeaderFrame, 0) // A frame used internally by TGTable.
56 };
57 
58 #endif // ROOT_TGTableFrame
59 
60 
TH1 * h
Definition: legend2.C:5
void HandleMouseWheel(Event_t *event)
Handle mouse wheel to scroll.
This is the ROOT implementation of the Qt object communication mechanism (see also http://www...
Definition: TQObject.h:53
int Int_t
Definition: RtypesCore.h:41
void SetCanvas(TGCanvas *canvas)
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw a region of container in viewport.
virtual ~TGTableFrame()
unsigned int UInt_t
Definition: RtypesCore.h:42
TGFrame * GetFrame() const
TGCompositeFrame * fFrame
int type
Definition: TGX11.cxx:120
Double_t y[n]
Definition: legend1.C:17
TGCanvas * fCanvas
EHeaderType
Definition: TGTableHeader.h:18
TGTableHeaderFrame(const TGWindow *p, TGTable *table=0, UInt_t w=1, UInt_t h=1, EHeaderType type=kColumnHeader, UInt_t option=0)
TGTableHeaderFrame constuctor.
TGTableFrame(const TGWindow *p, UInt_t nrows, UInt_t ncolumns)
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw a region of container in viewport.