class TGTableLayout: public TGLayoutManager


TGTableLayout

A layout manager, which places child frames in a table arranged in
rows and columns, making it easy to align many widgets next each to
other horizontally and vertivally. It uses TGTableLayoutHints
(not TGLayoutHints!!!) and 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 in the
constructor.
The gaps between all rows or columns can be specified by 'sep'
parameter in the constructor. All rows and columns will have the
same size (set by widest and the highest child frame) if the
parameter 'homogeneous' is set to kTRUE.


TGTableLayoutHints

This class describes layout hints used by the TGTableLayout class.
It specifies the column/row division number on which to attach the
child frame. This number starts from 0 and goes to #_columns/#_rows
respectively (0 indicates the first row/column).

Below are described all parameters of TGTableLayoutHints constructor
attach_left   - the column to the left of the widget;
attach_right  - the column to the right of the widget;
attach_top    - the row above the widget;
attach_bottom - the row below the widget;

hints - layout hints (combination of ELayoutHints)

The next parameters determine the extra padding added around the
child frame. By default these are 0.
padleft   - determines the extra padding added on the left
padright  - determines the extra padding added on the right
padtop    - determines the extra padding added on the top
padbottom - determines the extra padding added on the bottom


Function Members (Methods)

public:
TGTableLayout(TGCompositeFrame* main, UInt_t nrows, UInt_t ncols, Bool_t homogeneous = kFALSE, Int_t sep = 0, Int_t hints = 0)
virtual~TGTableLayout()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual TGDimensionGetDefaultSize() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tTGLayoutManager::IsModified() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidLayout()
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidSavePrimitive(ostream& out, Option_t* = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTGLayoutManager::SetDefaultHeight(UInt_t)
virtual voidTGLayoutManager::SetDefaultWidth(UInt_t)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTGLayoutManager::SetModified(Bool_t flag = kTRUE)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
voidCheckSanity()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidFindRowColSizes()
voidFindRowColSizesHomogeneous()
voidFindRowColSizesInit()
voidFindRowColSizesMultiplyAttached()
voidFindRowColSizesSinglyAttached()
voidTObject::MakeZombie()
static voidSetRowColResize(UInt_t real_size, UInt_t nthings, TGTableLayout::TableData_t* thing, Bool_t homogeneous)
voidSetRowColSizes()
voidSetRowColSizesInit()
private:
TGTableLayout(const TGTableLayout&)
TGTableLayout&operator=(const TGTableLayout&)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
public:
Int_tfHintslayout hints (currently not used)
UInt_tfNcolsnumber of columns
UInt_tfNrowsnumber of rows
Int_tfSepinterval between frames
protected:
TGTableLayout::TableData_t*fColinfo about each column
Bool_tfHomogeneousall cols/rows same size
TList*fListlist of frames to arrange
TGCompositeFrame*fMaincontainer frame
Bool_tTGLayoutManager::fModifiedkTRUE if positions of subframes changed after layout
TGTableLayout::TableData_t*fRowinfo about each row

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGTableLayout(TGCompositeFrame* main, UInt_t nrows, UInt_t ncols, Bool_t homogeneous = kFALSE, Int_t sep = 0, Int_t hints = 0)
 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, TGTableLayout::TableData_t* 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()
 Return default dimension of the table layout.
void SavePrimitive(ostream& out, Option_t* = "")
TGTableLayoutHints& operator=(const TGTableLayout& )
TGTableLayout(const TGTableLayout& )

Author: Brett Viren 04/15/2001
Last change: root/gui:$Id: TGTableLayout.h 23115 2008-04-10 13:35:37Z rdm $
Last generated: 2008-06-25 08:43
Copyright (C) 2001, Brett Viren *

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.