TGTableLayout


class description - source file - inheritance tree

class TGTableLayout : public TGLayoutManager


    protected:
void CheckSanity() void FindRowColSizes() void FindRowColSizesHomogeneous() void FindRowColSizesInit() void FindRowColSizesMultiplyAttached() void FindRowColSizesSinglyAttached() static void SetRowColResize(UInt_t real_size, UInt_t nthings, TGTableLayout::TableData* thing, Bool_t homogeneous) void SetRowColSizes() void SetRowColSizesInit() public:
TGTableLayout TGTableLayout(TGCompositeFrame* main, UInt_t nrows, UInt_t ncols, Bool_t homogeneous = kFALSE, Int_t sep = 0, Int_t hints = 0) TGTableLayout TGTableLayout(const TGTableLayout&) virtual void ~TGTableLayout() static TClass* Class() virtual TGDimension GetDefaultSize() const virtual TClass* IsA() const virtual void Layout() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
TGTableLayout::TableData* fRow info about each row TGTableLayout::TableData* fCol info about each column TGCompositeFrame* fMain container frame TList* fList list of frames to arrange Bool_t fHomogeneous all cols/rows same size public:
Int_t fSep interval between frames Int_t fHints layout hints (currently not used) UInt_t fNrows number of rows UInt_t fNcols number of columns

Class Description

                                                                      
 TGTableLayout                                                        
                                                                      
 A LayoutManager which places child frames in a table. This uses      
 TGTableLayoutHints (not TGLayoutHints). See TGTableLayoutHints       
 for how to use these. This manager works like TGMatrixLayout with    
 the addition that:                                                   
  - Child frames can span more than one column/row.                   
  - Child frames can resize with the frame.                           
  - Column and row sizes are not fixed nor (optionally) homogeneous.  
  - The number of columns and rows must be fully specified.           
                                                                      


TGTableLayout(TGCompositeFrame *main, UInt_t nrows, UInt_t ncols, Bool_t homogeneous, Int_t sep, Int_t hints)
 TGTableLayout constructor.
 Note:
 - Number of rows first, number of Columns second
 - homogeneous == true means all table cells are the same size,
   set by the widest and the highest child frame.
 - s gives the amount of separation in pixels between cells
 - h are the hints, see TGTableLayoutHints.

~TGTableLayout()
 TGTableLayout constructor.

void FindRowColSizes()
 Find the sizes of rows and columns needed to statisfy
 children's layout policies.

void FindRowColSizesInit()
 Initialize values needed to determine the size of rows and columns.

void FindRowColSizesSinglyAttached()
 Determine the size of rows/cols needed for singly attached children.

void FindRowColSizesHomogeneous()
 If the table is homogeneous make sure all col/rows are same
 size as biggest col/row.

void FindRowColSizesMultiplyAttached()
 Checks any children which span multiple col/rows.

void SetRowColResize(UInt_t real_size, UInt_t nthings, TableData *thing, Bool_t homogeneous)
 If main frame is bigger or smaller than all children,
 expand/shrink to fill. This is symmetric under row<-->col
 switching so it is abstracted out to a normal function to save typing.

void SetRowColSizes()
 This gets the new sizes needed to fit the table to the parent
 frame. To be called after FindRowColSizes.

void SetRowColSizesInit()
 Initialize rows/cols. By default they do not expand and they
 do shrink. What the children want determine what the rows/cols do.

void CheckSanity()
 Sanity check various values.

void Layout()
 Make a table layout of all frames in the list.

TGDimension GetDefaultSize() const
 Return default dimension of the table layout.



Inline Functions


              TClass* Class()
              TClass* IsA() const
                 void ShowMembers(TMemberInspector& insp, char* parent)
                 void Streamer(TBuffer& b)
                 void StreamerNVirtual(TBuffer& b)
        TGTableLayout TGTableLayout(const TGTableLayout&)


Author: Brett Viren 04/15/2001
Last update: root/gui:$Name: $:$Id: TGTableLayout.cxx,v 1.5 2003/01/12 11:06:35 rdm Exp $
Copyright (C) 2001, Brett Viren *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.