ROOT » GUI » GUI » TGTable

class TGTable: public TGCompositeFrame, public TGWidget


TGTable



TGTable implements a table widget to display data in rows and columns. The data is supplied by a TVirtualTableInterface.

The table is a TGCanvas to make use of already available viewport functionality and drawing optimizations.

The top left cell in a table has coordinates (0,0)

A TObjArray is used internally to ensure little overhead and fast acces to cells.

If the data source has more rows than the default 50 rows of cells in memory, buttons at the bottom of the table can be used to load the next or previous chunk of data.

At the top of the table, a frame is visible that shows the coordinates of the top left cell currently in memmory in row,column. The amount of rows and columns is also shown in rows x columns. These values can be edited to move to a different area of the data source or to resize the table. Tab will switch between the enties, return will move to the currently entered range and resize the table if needed. Clicking the goto button has the same effect.

A TGTable is created by first creating an appropriate TVirtualTableInterface from the data that needs visualization and then creating the TGTable using this interface.

A simple macro to use a TGTable with a TGSimpleTableInterface:
{
   // Create an array to hold a bunch of numbers
   Int_t i = 0, j = 0;
   UInt_t nrows = 6, ncolumns = 5;
   Double_t** data = new Double_t*[nrows];
   for (i = 0; i < nrows; i++) {
      data[i] = new Double_t[ncolumns];
      for (j = 0; j < ncolumns; j++) {
         data[i][j] = 10 * i + j;
      }
   }

   // Create a main frame to contain the table
   TGMainFrame* mainframe = new TGMainFrame(0, 400, 200);
   mainframe->SetCleanup(kDeepCleanup) ;

   // Create an interface
   TGSimpleTableInterface *iface = new TGSimpleTableInterface(data, 6, 5);

   // Create the table
   TGTable *table = new TGTable(mainframe, 999, iface);

   // Add the table to the main frame
   mainframe->AddFrame(table, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));

   //Update data
   data[5][1] = 3.01;
   //update the table view
   table->Update();

   // Layout and map the main frame
   mainframe->SetWindowName("Tree Table Test") ;
   mainframe->MapSubwindows() ;
   mainframe->Layout();
   mainframe->Resize() ;
   mainframe->MapWindow() ;

   return mainframe;
}
It is also possible to visualise data from a tree. A simple macro
showing the use of a TTreeTableInterface follows.
{
   // Open a root file.
   TFile *file = new TFile("$ROOTSYS/tutorials/hsimple.root");
   // Load a tree from the file
   TNtuple *ntuple = (TNtuple *)file->Get("ntuple");

   // Create an interface
   TTreeTableInterface *iface = new TTreeTableInterface(ntuple);

   // Create a main frame to contain the table
   TGMainFrame* mainframe = new TGMainFrame(0, 400, 200);
   mainframe->SetCleanup(kDeepCleanup) ;

   // Create the table
   TGTable *table = new TGTable(mainframe, 999, iface, 10, 6);

   // Add the table to the main frame
   mainframe->AddFrame(table, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));

   // Set a selection
   iface->SetSelection("px > 0.");
   // Add a column
   iface->AddColumn("(px+py)/(px-py)", 0);
   //update the table view
   table->Update();

   // Layout and map the main frame
   mainframe->SetWindowName("Tree Table Test") ;
   mainframe->MapSubwindows() ;
   mainframe->Layout();
   mainframe->Resize() ;
   mainframe->MapWindow() ;

   return mainframe;
}

Function Members (Methods)

public:
virtual~TGTable()
voidTObject::AbstractMethod(const char* method) const
virtual voidTGFrame::Activate(Bool_t)
virtual voidTGCompositeFrame::AddFrame(TGFrame* f, TGLayoutHints* l = 0)
voidTGFrame::AddInput(UInt_t emask)
virtual voidTObject::AppendPad(Option_t* option = "")
static Bool_tTQObject::AreAllSignalsBlocked()
Bool_tTQObject::AreSignalsBlocked() const
virtual voidTGWidget::Associate(const TGWindow* w)
static Bool_tTQObject::BlockAllSignals(Bool_t b)
Bool_tTQObject::BlockSignals(Bool_t b)
virtual voidTObject::Browse(TBrowser* b)
virtual voidTGFrame::ChangeBackground(Pixel_t back)
virtual voidTQObject::ChangedBy(const char* method)SIGNAL
virtual voidTGCompositeFrame::ChangeOptions(UInt_t options)
virtual voidTGCompositeFrame::ChangeSubframesBackground(Pixel_t back)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTGCompositeFrame::Cleanup()
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
voidTQObject::CollectClassSignalLists(TList& list, TClass* cls)
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tTQObject::Connect(const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(TQObject* sender, const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(const char* sender_class, const char* signal, const char* receiver_class, void* receiver, const char* slot)
virtual voidTQObject::Connected(const char*)
Bool_tTGFrame::Contains(Int_t x, Int_t y) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTGFrame::Delete(Option_t* = "")
virtual voidTGFrame::DeleteWindow()
virtual voidTQObject::Destroyed()SIGNAL
virtual voidTGWindow::DestroySubwindows()
virtual voidTGWindow::DestroyWindow()
Bool_tTQObject::Disconnect(const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(TQObject* sender, const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(const char* class_name, const char* signal, void* receiver = 0, const char* slot = 0)
virtual voidTQObject::Disconnected(const char*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTGFrame::DrawBorder()
virtual voidTGFrame::DrawClass() const
virtual TObject*TGFrame::DrawClone(Option_t* = "") const
virtual voidTGFrame::DrawCopy(Handle_t, Int_t, Int_t)
virtual voidTGFrame::Dump() const
voidTQObject::Emit(const char* signal)
voidTQObject::Emit(const char* signal, Long_t* paramArr)
voidTQObject::Emit(const char* signal, const char* params)
voidTQObject::Emit(const char* signal, Double_t param)
voidTQObject::Emit(const char* signal, Long_t param)
voidTQObject::Emit(const char* signal, Long64_t param)
voidTQObject::Emit(const char* signal, Bool_t param)
voidTQObject::Emit(const char* signal, Char_t param)
voidTQObject::Emit(const char* signal, UChar_t param)
voidTQObject::Emit(const char* signal, Short_t param)
voidTQObject::Emit(const char* signal, UShort_t param)
voidTQObject::Emit(const char* signal, Int_t param)
voidTQObject::Emit(const char* signal, UInt_t param)
voidTQObject::Emit(const char* signal, ULong_t param)
voidTQObject::Emit(const char* signal, ULong64_t param)
voidTQObject::Emit(const char* signal, Float_t param)
voidTQObject::EmitVA(const char* signal, Int_t nargs, va_list va)
voidTQObject::EmitVA<>(const char* signal_name, Int_t)
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 const TGTableCell*FindCell(TGString label) const
virtual TGTableCell*FindCell(TGString label)
virtual TGFrameElement*TGCompositeFrame::FindFrameElement(TGFrame* f) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Pixel_tTGFrame::GetBackground() const
static const TGGC&TGFrame::GetBckgndGC()
static const TGGC&TGFrame::GetBlackGC()
static Pixel_tTGFrame::GetBlackPixel()
Int_tTGFrame::GetBorderWidth() const
virtual TGCanvas*GetCanvas()
virtual const TGTableCell*GetCell(UInt_t i, UInt_t j) const
virtual TGTableCell*GetCell(UInt_t i, UInt_t j)
virtual const TGTableHeaderFrame*GetCHdrFrame()
TGClient*TGObject::GetClient() const
virtual TObjArray*GetColumn(UInt_t columns)
virtual const TGTableHeader*GetColumnHeader(const UInt_t column) const
virtual TGTableHeader*GetColumnHeader(const UInt_t column)
const char*TGWidget::GetCommand() const
static Int_tTGWindow::GetCounter()
virtual const TTableRange*GetCurrentRange() const
static Pixel_tTGFrame::GetDefaultFrameBackground()
virtual UInt_tTGCompositeFrame::GetDefaultHeight() const
static Pixel_tTGFrame::GetDefaultSelectedBackground()
virtual TGDimensionTGCompositeFrame::GetDefaultSize() const
virtual UInt_tTGCompositeFrame::GetDefaultWidth() const
virtual TDNDData*TGFrame::GetDNDData(Atom_t)
virtual Int_tTGFrame::GetDragType() const
virtual Option_t*TObject::GetDrawOption() const
virtual Int_tTGFrame::GetDropType() const
static Long_tTObject::GetDtorOnly()
virtual UInt_tTGWindow::GetEditDisabled() const
UInt_tTGFrame::GetEventMask() const
virtual Pixel_tTGFrame::GetForeground() const
TGFrameElement*TGFrame::GetFrameElement() const
virtual TGFrame*TGCompositeFrame::GetFrameFromPoint(Int_t x, Int_t y)
virtual Pixel_tGetHeaderBackground() const
UInt_tTGFrame::GetHeight() const
static const TGGC&TGFrame::GetHilightGC()
virtual const char*TObject::GetIconName() const
Handle_tTGObject::GetId() const
virtual TVirtualTableInterface*GetInterface()
virtual TGLayoutManager*TGCompositeFrame::GetLayoutManager() const
virtual TList*TGCompositeFrame::GetList() const
TList*TQObject::GetListOfClassSignals() const
TList*TQObject::GetListOfConnections() const
TList*TQObject::GetListOfSignals() const
virtual const TGWindow*TGWindow::GetMainFrame() const
UInt_tTGFrame::GetMaxHeight() const
UInt_tTGFrame::GetMaxWidth() const
UInt_tTGFrame::GetMinHeight() const
UInt_tTGFrame::GetMinWidth() const
virtual const char*TGWindow::GetName() const
virtual UInt_tGetNDataCells() const
virtual UInt_tGetNDataColumns() const
virtual UInt_tGetNDataRows() const
virtual UInt_tGetNTableCells() const
virtual UInt_tGetNTableColumns() const
virtual UInt_tGetNTableRows() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual UInt_tTGFrame::GetOptions() const
const TGWindow*TGWindow::GetParent() const
virtual const TGTableHeaderFrame*GetRHdrFrame()
virtual TObjArray*GetRow(UInt_t row)
virtual Pixel_tGetRowBackground(UInt_t row) const
virtual const TGTableHeader*GetRowHeader(const UInt_t row) const
virtual TGTableHeader*GetRowHeader(const UInt_t row)
static const TGGC&TGFrame::GetShadowGC()
TGDimensionTGFrame::GetSize() const
Int_tTGCompositeFrame::GetState(TGFrame* f) const
virtual TGTableHeader*GetTableHeader()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
static const TGGC&TGFrame::GetWhiteGC()
static Pixel_tTGFrame::GetWhitePixel()
UInt_tTGFrame::GetWidth() const
Int_tTGFrame::GetX() const
Int_tTGFrame::GetY() const
virtual voidGoto()
virtual voidGotoTableRange(Int_t xtl, Int_t ytl, Int_t xbr, Int_t ybr)
virtual Bool_tTGCompositeFrame::HandleButton(Event_t*)
virtual Bool_tTGFrame::HandleClientMessage(Event_t* event)
virtual Bool_tTGFrame::HandleColormapChange(Event_t*)
virtual Bool_tTGFrame::HandleConfigureNotify(Event_t* event)
virtual Bool_tTGCompositeFrame::HandleCrossing(Event_t*)
virtual Bool_tTGFrame::HandleDNDDrop(TDNDData*)
virtual Atom_tTGFrame::HandleDNDEnter(Atom_t*)
virtual Bool_tTGFrame::HandleDNDFinished()
virtual Bool_tTGFrame::HandleDNDLeave()
virtual Atom_tTGFrame::HandleDNDPosition(Int_t, Int_t, Atom_t, Int_t, Int_t)
virtual Bool_tTGCompositeFrame::HandleDoubleClick(Event_t*)
virtual Bool_tTGCompositeFrame::HandleDragDrop(TGFrame* frame, Int_t x, Int_t y, TGLayoutHints* lo)
virtual Bool_tTGCompositeFrame::HandleDragEnter(TGFrame*)
virtual Bool_tTGCompositeFrame::HandleDragLeave(TGFrame*)
virtual Bool_tTGCompositeFrame::HandleDragMotion(TGFrame*)
virtual Bool_tTGFrame::HandleEvent(Event_t* event)
virtual Bool_tTGWindow::HandleExpose(Event_t* event)
virtual Bool_tTGCompositeFrame::HandleFocusChange(Event_t*)
virtual Bool_tTGWindow::HandleIdleEvent(TGIdleHandler*)
virtual Bool_tTGCompositeFrame::HandleKey(Event_t*)
virtual Bool_tTGCompositeFrame::HandleMotion(Event_t*)
virtual Bool_tTGCompositeFrame::HandleSelection(Event_t*)
virtual Bool_tTGFrame::HandleSelectionClear(Event_t*)
virtual Bool_tTGFrame::HandleSelectionRequest(Event_t*)
virtual Bool_tTGWindow::HandleTimer(TTimer*)
virtual Bool_tTQObject::HasConnection(const char* signal_name) const
Bool_tTGWidget::HasFocus() const
virtual ULong_tTGObject::Hash() const
virtual voidTGCompositeFrame::HideFrame(TGFrame* f)
virtual voidTQObject::HighPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTGWindow::IconifyWindow()
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 voidTGFrame::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTGFrame::IsActive() const
Bool_tTGCompositeFrame::IsArranged(TGFrame* f) const
Bool_tTGCompositeFrame::IsArranged(TGFrameElement* ptr) const
virtual Bool_tTGCompositeFrame::IsComposite() const
Bool_tTGFrame::IsDNDSource() const
Bool_tTGFrame::IsDNDTarget() const
virtual Bool_tTGCompositeFrame::IsEditable() const
Bool_tTGWidget::IsEnabled() const
virtual Bool_tTGObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
virtual Bool_tTGCompositeFrame::IsLayoutBroken() const
virtual Bool_tTGWindow::IsMapped()
virtual Bool_tTGCompositeFrame::IsMapSubwindows() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTGCompositeFrame::IsVisible(TGFrame* f) const
Bool_tTGCompositeFrame::IsVisible(TGFrameElement* ptr) const
Bool_tTObject::IsZombie() const
virtual voidTGCompositeFrame::Layout()
virtual voidTGWindow::LowerWindow()
virtual voidTQObject::LowPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTObject::ls(Option_t* option = "") const
virtual voidTGFrame::MapRaised()
virtual voidTGCompositeFrame::MapSubwindows()
virtual voidTGFrame::MapWindow()
voidTObject::MayNotUse(const char* method) const
virtual voidTQObject::Message(const char* msg)SIGNAL
virtual voidTGFrame::Move(Int_t x, Int_t y)
virtual voidTGFrame::MoveResize(Int_t x, Int_t y, UInt_t w = 0, UInt_t h = 0)
virtual voidMoveTable(Int_t rows, Int_t columns)
virtual Int_tTGCompositeFrame::MustCleanup() const
virtual voidNextChunk()
virtual Bool_tTObject::Notify()
virtual Int_tTQObject::NumberOfConnections() const
virtual Int_tTQObject::NumberOfSignals() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
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 TGTableCell*operator()(UInt_t row, UInt_t column)
TGTable&operator=(const TGTable&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPreviousChunk()
virtual voidTGCompositeFrame::Print(Option_t* option = "") const
virtual voidTGFrame::ProcessedConfigure(Event_t* event)SIGNAL
virtual voidTGFrame::ProcessedEvent(Event_t* event)SIGNAL
virtual Bool_tTGCompositeFrame::ProcessMessage(Long_t, Long_t, Long_t)
virtual voidTGWindow::RaiseWindow()
virtual Int_tTObject::Read(const char* name)
virtual voidTGFrame::ReallyDelete()
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTGCompositeFrame::RemoveAll()
virtual voidTGCompositeFrame::RemoveFrame(TGFrame* f)
voidTGFrame::RemoveInput(UInt_t emask)
virtual voidTGFrame::ReparentWindow(const TGWindow* p, Int_t x = 0, Int_t y = 0)
virtual voidTGWindow::RequestFocus()
voidTObject::ResetBit(UInt_t f)
virtual voidTGFrame::Resize(TGDimension size)
virtual voidTGFrame::Resize(UInt_t w = 0, UInt_t h = 0)
virtual voidTGObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTGCompositeFrame::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidTGCompositeFrame::SavePrimitiveSubframes(ostream& out, Option_t* option = "")
voidTGFrame::SaveUserColor(ostream& out, Option_t*)
virtual voidScrollCHeaders(Int_t xpos)
virtual voidScrollRHeaders(Int_t ypos)
virtual voidTGFrame::SendMessage(const TGWindow* w, Long_t msg, Long_t parm1, Long_t parm2)
virtual voidTGFrame::SetBackgroundColor(Pixel_t back)
virtual voidTGWindow::SetBackgroundPixmap(Pixmap_t pixmap)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTGCompositeFrame::SetCleanup(Int_t mode = kLocalCleanup)
virtual voidTGWidget::SetCommand(const char* command)
virtual voidSetDefaultColors()
voidTGFrame::SetDNDSource(Bool_t onoff)
voidTGFrame::SetDNDTarget(Bool_t onoff)
virtual voidTGFrame::SetDragType(Int_t type)
virtual voidTGFrame::SetDrawOption(Option_t* = "")
virtual voidTGFrame::SetDropType(Int_t type)
static voidTObject::SetDtorOnly(void* obj)
virtual voidTGCompositeFrame::SetEditable(Bool_t on = kTRUE)
virtual voidTGCompositeFrame::SetEditDisabled(UInt_t on = 1)
virtual voidSetEvenRowBackground(Pixel_t pixel)
virtual voidTGFrame::SetForegroundColor(Pixel_t)
voidTGFrame::SetFrameElement(TGFrameElement* fe)
virtual voidSetHeaderBackground(Pixel_t pixel)
virtual voidTGFrame::SetHeight(UInt_t h)
virtual voidTGCompositeFrame::SetLayoutBroken(Bool_t on = kTRUE)
virtual voidTGCompositeFrame::SetLayoutManager(TGLayoutManager* l)
virtual voidTGCompositeFrame::SetMapSubwindows(Bool_t on)
virtual voidTGFrame::SetMaxHeight(UInt_t h)
virtual voidTGFrame::SetMaxWidth(UInt_t w)
virtual voidTGFrame::SetMinHeight(UInt_t h)
virtual voidTGFrame::SetMinWidth(UInt_t w)
virtual voidTGWindow::SetName(const char* name)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetOddRowBackground(Pixel_t pixel)
virtual voidTGFrame::SetSize(const TGDimension& s)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidTGFrame::SetWidth(UInt_t w)
virtual voidTGWindow::SetWindowName(const char* name = 0)
virtual voidTGFrame::SetX(Int_t x)
virtual voidTGFrame::SetY(Int_t y)
virtual voidShow()
virtual voidTGCompositeFrame::ShowFrame(TGFrame* f)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_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
TGTable(const TGTable&)
TGTable(const TGWindow* p = 0, Int_t id = 0, TVirtualTableInterface* interface = 0, UInt_t nrows = 50, UInt_t ncolumns = 20)
virtual Bool_tTGCompositeFrame::TranslateCoordinates(TGFrame* child, Int_t x, Int_t y, Int_t& fx, Int_t& fy)
virtual voidTGFrame::UnmapWindow()
virtual voidUpdate()
virtual voidUpdateView()
virtual voidTObject::UseCurrentStyle()
virtual voidUserRangeChange()
Bool_tTGWidget::WantFocus() const
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
Int_tTGWidget::WidgetId() 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:
static Int_tTQObject::CheckConnectArgs(TQObject* sender, TClass* sender_class, const char* signal, TClass* receiver_class, const char* slot)
Int_tTGWidget::ClearFlags(Int_t flags)
static TStringTQObject::CompressName(const char* method_name)
static Bool_tTQObject::ConnectToClass(TQObject* sender, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::ConnectToClass(const char* sender_class, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidDoRedraw()
virtual voidTGFrame::Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
virtual voidExpand(UInt_t nrows, UInt_t ncolumns)
virtual voidExpandColumns(UInt_t ncolumns)
virtual voidExpandRows(UInt_t nrows)
virtual UInt_tGetCHdrWidth() const
static Time_tTGFrame::GetLastClick()
TStringTGFrame::GetOptionString() const
const TGResourcePool*TGFrame::GetResourcePool() const
virtual UInt_tGetRHdrHeight() const
virtual void*TGFrame::GetSender()
virtual const char*TQObject::GetSenderClassName() const
virtual voidInit()
voidTObject::MakeZombie()
virtual voidResizeTable(UInt_t nrows, UInt_t ncolumns)
Int_tTGWidget::SetFlags(Int_t flags)
virtual voidSetInterface(TVirtualTableInterface* interface, UInt_t nrows = 50, UInt_t ncolumns = 20)
virtual voidShrink(UInt_t nrows, UInt_t ncolumns)
virtual voidShrinkColumns(UInt_t ncolumns)
virtual voidShrinkRows(UInt_t nrows)
virtual voidTGFrame::StartGuiBuilding(Bool_t on = kTRUE)
virtual voidUpdateHeaders(EHeaderType type)
virtual voidUpdateRangeFrame()

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TGWindow::EEditModeTGWindow::kEditDisable
static TGWindow::EEditModeTGWindow::kEditDisableBtnEnable
static TGWindow::EEditModeTGWindow::kEditDisableEvents
static TGWindow::EEditModeTGWindow::kEditDisableGrab
static TGWindow::EEditModeTGWindow::kEditDisableHeight
static TGWindow::EEditModeTGWindow::kEditDisableKeyEnable
static TGWindow::EEditModeTGWindow::kEditDisableLayout
static TGWindow::EEditModeTGWindow::kEditDisableResize
static TGWindow::EEditModeTGWindow::kEditDisableWidth
static TGWindow::EEditModeTGWindow::kEditEnable
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
Bool_tfAllDataIs the data bigger than the table
Pixel_tTGFrame::fBackgroundframe background color
Int_tTGFrame::fBorderWidthframe border width
TGHorizontalFrame*fBottomFrameFrame that contains the bottom part
TGHorizontalFrame*fButtonFrameContains the buttons
TGTableHeaderFrame*fCHdrFrameFrame that contains the row headers
TList*fCHdrHintsList
TGCanvas*fCanvasCanvas that will contains the cells
UInt_tfCellHeightDefault cell width
TList*fCellHintsList
UInt_tfCellWidthDefault cell width
TGClient*TGObject::fClientConnection to display server
TObjArray*fColumnHeadersArray of column headers
TStringTGWidget::fCommandcommand to be executed
TTableRange*fCurrentRangeRange of data currently loaded
Int_tTGFrame::fDNDStateEDNDFlags
TTableRange*fDataRangeFull range of the data set
UInt_tTGWindow::fEditDisabledflags used for "guibuilding"
Pixel_tfEvenRowBackgroundBackground color for even numbered rows
UInt_tTGFrame::fEventMaskcurrenty active event mask
TGFrameElement*TGFrame::fFEpointer to frame element
TGTextEntry*fFirstCellEntryTextEntry for the range frame
TGLabel*fFirstCellLabelLabel for the range frame
TGTextButton*fGotoButtonButton to goto a new range
TTableRange*fGotoRangeRange used by Goto frame
Pixel_tfHeaderBackgroundBackground color for headers
UInt_tTGFrame::fHeightframe height
Handle_tTGObject::fIdX11/Win32 Window identifier
TVirtualTableInterface*fInterfaceInterface to the data source
Bool_tTGCompositeFrame::fLayoutBrokenno layout manager is used
TGLayoutManager*TGCompositeFrame::fLayoutManagerlayout manager
TList*TGCompositeFrame::fListcontainer of frame elements
TList*TQObject::fListOfConnections! list of connections to this object
TList*TQObject::fListOfSignals! list of signals from this object
TList*fMainHintsListList for all hints used in the main table frame
Bool_tTGCompositeFrame::fMapSubwindowskTRUE - map subwindows
UInt_tTGFrame::fMaxHeightmaximal frame height
UInt_tTGFrame::fMaxWidthmaximal frame width
UInt_tTGFrame::fMinHeightminimal frame height
UInt_tTGFrame::fMinWidthminimal frame width
const TGWindow*TGWidget::fMsgWindowwindow which handles widget events
Int_tTGCompositeFrame::fMustCleanupcleanup mode (see EFrameCleanup)
TStringTGWindow::fNamename of the window used in SavePrimitive()
Bool_tTGWindow::fNeedRedrawkTRUE if window needs to be redrawn
TGTextButton*fNextButtonButton to view next chunk
Pixel_tfOddRowBackgroundBackground color for odd numbered rows
UInt_tTGFrame::fOptionsframe options
const TGWindow*TGWindow::fParentParent window
TGTextButton*fPrevButtonButton to view previous chunk
TGTableHeaderFrame*fRHdrFrameFrame that contains the row headers
TList*fRHdrHintsList
TGTextEntry*fRangeEntryTextEntry for the range frame
TGHorizontalFrame*fRangeFrameFrame that contains the top part
TGLabel*fRangeLabelLabel for the range frame
Bool_tfReadOnlyTable readonly state
TObjArray*fRowHeadersArray of row headers
TObjArray*fRowsArray of rows
Pixel_tfSelectColorSelect Color
Bool_tTQObject::fSignalsBlocked! flag used for suppression of signals
Int_tfTModeText justify mode
TGTableFrame*fTableFrameContainer for the frames
TGTableHeader*fTableHeaderTop left element of the table
TGHorizontalFrame*fTopExtraFrameDev idea
TGHorizontalFrame*fTopFrameFrame that contains the top part
TGTextButton*fUpdateButtonButton to update current view
Int_tTGWidget::fWidgetFlagswidget status flags (OR of EWidgetStatus)
Int_tTGWidget::fWidgetIdthe widget id (used for event processing)
UInt_tTGFrame::fWidthframe width
Int_tTGFrame::fXframe x position
Int_tTGFrame::fYframe y position
static Bool_tTQObject::fgAllSignalsBlockedflag used for suppression of all signals
static const TGGC*TGFrame::fgBckgndGC
static const TGGC*TGFrame::fgBlackGC
static Pixel_tTGFrame::fgBlackPixel
static Int_tTGWindow::fgCountercounter of created windows in SavePrimitive
static Window_tTGFrame::fgDbw
static Int_tTGFrame::fgDbx
static Int_tTGFrame::fgDby
static Pixel_tTGFrame::fgDefaultFrameBackground
static TGLayoutHints*TGCompositeFrame::fgDefaultHintsdefault hints used by AddFrame()
static Pixel_tTGFrame::fgDefaultSelectedBackground
static const TGGC*TGFrame::fgHilightGC
static Bool_tTGFrame::fgInit
static UInt_tTGFrame::fgLastButton
static Time_tTGFrame::fgLastClick
static const TGGC*TGFrame::fgShadowGC
static UInt_tTGFrame::fgUserColor
static const TGGC*TGFrame::fgWhiteGC
static Pixel_tTGFrame::fgWhitePixel
static TGFrame::(anonymous)TGFrame::kDeleteWindowCalled

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGTable(const TGWindow* p = 0, Int_t id = 0, TVirtualTableInterface* interface = 0, UInt_t nrows = 50, UInt_t ncolumns = 20)
 TGTable constuctor.
~TGTable()
 TGTable destructor.
void Init()
 Initialise the TGTable.
void DoRedraw()
 Redraw the TGTable.
void Expand(UInt_t nrows, UInt_t ncolumns)
 Expand a TGTable by nrows and ncolumns.
void ExpandColumns(UInt_t ncolumns)
 Expand the columns of a TGTable by ncolumns.
void ExpandRows(UInt_t nrows)
 Expand the rows of a TGTable by nrows.
UInt_t GetCHdrWidth() const
 Get the current width of the column header frame.
UInt_t GetRHdrHeight() const
 Get the current height of the row header frame.
void Shrink(UInt_t nrows, UInt_t ncolumns)
 Shrink the TGTable by nrows and ncolumns.
void ShrinkColumns(UInt_t ncolumns)
 Shrink the columns of the TGTable by ncolumns.
void ShrinkRows(UInt_t nrows)
 Shrink the rows of the TGTable by nrows.
void UpdateHeaders(EHeaderType type)
 Update the labels of the headers of the given type
void SetInterface(TVirtualTableInterface* interface, UInt_t nrows = 50, UInt_t ncolumns = 20)
 Set the interface that the TGTable uses to interface.
void ResizeTable(UInt_t nrows, UInt_t ncolumns)
 Resize the table to newnrows and newncolumns and add all the frames to
 their parent frames.
void UpdateRangeFrame()
 Update the range shown in the range frame.
TObjArray * GetRow(UInt_t row)
 Get row. NOTE: Do not delete the TObjArray returned or the cells
 it contains, they are owned by the TGTable.
TObjArray * GetColumn(UInt_t columns)
 Return a pointer to a TObjArray that contains pointers to all
 the cells in column. NOTE: The user will have to delete the
 TObjArray, but do NOT delete the cells it contains, they are
 owned by the TGTable and will be deleted from the TGTable with
 undefined consequenses.
const TGTableCell* GetCell(UInt_t i, UInt_t j) const
 Const version of GetCell().
TGTableCell* GetCell(UInt_t i, UInt_t j)
 Return a pointer to the TGTableCell at position i,j.
const TGTableCell* FindCell(TGString label) const
 Const version of FindCell().
TGTableCell* FindCell(TGString label)
 Find the TGTableCell with label.
void Show()
 Show the contents of the TGTable in stdout.
void UpdateView()
 Update and layout the visible part of the TGTable.
UInt_t GetNTableRows() const
 Return the amount of rows in the table.
UInt_t GetNDataRows() const
 Return the amount of rows in the data source.
UInt_t GetNTableColumns() const
 Return the amount of columns in the table.
UInt_t GetNDataColumns() const
 Return the amount of columns in the data source.
UInt_t GetNTableCells() const
 Return the amount of cells in the table.
UInt_t GetNDataCells() const
 Return the amount of cell in the data source.
const TTableRange * GetCurrentRange() const
 Return the current range of the TGTable.
const TGTableHeader * GetRowHeader(const UInt_t row) const
 Const version of GetRowHeader();
TGTableHeader * GetRowHeader(const UInt_t row)
 Return a pointer to the header of row.
const TGTableHeader * GetColumnHeader(const UInt_t column) const
 Const version of GetColumnHeader();
TGTableHeader * GetColumnHeader(const UInt_t column)
 Return a pointer to the header of column.
TGTableHeader * GetTableHeader()
 Return a pointer to the table header.
Pixel_t GetRowBackground(UInt_t row) const
 Get the background collor for row.
Pixel_t GetHeaderBackground() const
 Get the background color of headers.
void SetOddRowBackground(Pixel_t pixel)
 Set the background color for all odd numbered rows.
void SetEvenRowBackground(Pixel_t pixel)
 Set the background color for all even numbered rows.
void SetHeaderBackground(Pixel_t pixel)
 Set the background color for the headers.
void SetDefaultColors()
 Set the background color for all rows and headers to their defaults.
void MoveTable(Int_t rows, Int_t columns)
 Move and layout the table to the specified range.
void GotoTableRange(Int_t xtl, Int_t ytl, Int_t xbr, Int_t ybr)
 Move and resize the table to the specified range.
TGTableCell * operator()(UInt_t row, UInt_t column)
 Operator for easy cell acces.
void ScrollCHeaders(Int_t xpos)
 Scroll the column headers horizontally.
void ScrollRHeaders(Int_t ypos)
 Scroll the row headers vertically
void NextChunk()
 Move the table to the next chunk of the data set with the same size.
void PreviousChunk()
 Move the table to the previous chunk of the data set with the same size.
void Goto()
 Slot used by the Goto button and whenever return is pressed in
 on of the text entries in the range frame.
void UserRangeChange()
 Slot used when the text in one of the range frame text entries changes.
void Update()
 Update the range of the available data and refresh the current view.
TGTable(const TGWindow* p = 0, Int_t id = 0, TVirtualTableInterface* interface = 0, UInt_t nrows = 50, UInt_t ncolumns = 20)
TVirtualTableInterface * GetInterface()
{ return fInterface; }
TGCanvas * GetCanvas()
{ return fCanvas; }
const TGTableHeaderFrame * GetRHdrFrame()
{ return fRHdrFrame; }
const TGTableHeaderFrame * GetCHdrFrame()
{ return fCHdrFrame; }