171 fRowHeaders(0), fColumnHeaders(0), fReadOnly(
kFALSE), fSelectColor(0),
172 fTMode(0), fAllData(
kFALSE), fTableFrame(0), fCanvas(0), fCellWidth(80),
173 fCellHeight(25), fInterface(interface)
179 fCellHintsList =
new TList(hints);
180 fRHdrHintsList =
new TList(hints);
181 fCHdrHintsList =
new TList(hints);
182 fMainHintsList =
new TList(hints);
185 SetBackgroundColor(GetWhitePixel());
190 fCurrentRange->fXbr = ncolumns;
191 fCurrentRange->fYbr = nrows;
195 if(fInterface) SetInterface(fInterface, nrows, ncolumns);
276 "UserRangeChange()");
287 "UserRangeChange()");
314 for(i = 0; i < nrows; i++) {
320 for(i = 0; i < ncolumns; i++) {
329 for (i = 0; i < nrows; i++) {
332 for (j = 0; j < ncolumns; j++) {
349 for (i = 0; i < nrows; i++) {
353 for (j = 0; j < ncolumns; j++) {
414 sbar->
Connect(
"PositionChanged(Int_t)",
"TGTable",
this,
"ScrollRHeaders(Int_t)");
416 sbar->
Connect(
"PositionChanged(Int_t)",
"TGTable",
this,
"ScrollCHeaders(Int_t)");
459 for (i = 0; i < ncolumns; i++) {
466 for (i = 0; i < ntrows; i++) {
468 for (j = 0; j < ncolumns; j++) {
497 for (i = 0; i < nrows; i++) {
504 for (j = 0; j < ntcolumns ; j++) {
528 for (
Int_t i = 0; i < ncolumns; i++) {
541 for (
Int_t i = 0; i < nrows; i++) {
561 UInt_t i = 0, j = 0, k = 0;
564 Info(
"TGTable::ShrinkColumns",
"Cannot shrink smaller than 1"
565 " column, adjusting");
576 for (i = 0; i < ntrows; i++) {
577 for (j = 0; j < ncolumns; j++) {
578 k = ntcolumns - ncolumns + j;
591 for (j = 0; j < ncolumns; j++) {
617 Info(
"TGTable::ShrinkRows",
"Cannot shrink smaller than 1 row, adjusting");
628 for (i = 0; i < nrows; i++) {
629 for (j = 0; j < ntcolumns ; j++) {
630 if (
GetRow(ntrows - nrows + i)) {
665 for (i = 0; i < max; i++) {
672 for (i = 0; i < max; i++) {
731 if (newnrows != oldnrows){
732 if (newnrows > oldnrows) {
739 if (newncolumns != oldncolumns){
740 if (newncolumns > oldncolumns) {
748 if ((newncolumns != oldncolumns) || (newnrows != oldnrows)) {
759 newnrows, newncolumns));
762 for (i = 0; i < (
Int_t)newnrows; i++) {
766 for (j = 0; j < (
Int_t)newncolumns; j++) {
823 for(
UInt_t ui = 0; ui < nrows; ui++) {
930 for (i = 0; i < nrows; i++) {
931 for (j = 0; j < ncolumns; j++) {
954 std::ios_base::fmtflags org_flags = std::cout.flags();
956 for (j = 0; j < ncolumns + 1; j++) {
959 if (hdr) std::cout <<
" " << std::setw(12) << std::right
963 if (hdr) std::cout <<
" " << std::setw(12) << std::right
967 std::cout << std::endl;
969 for (i = 0; i < nrows; i++) {
970 for (j = 0; j < ncolumns + 1; j++) {
973 if (hdr) std::cout <<
" " << std::setw(12) << std::right
977 if (cell) std::cout <<
" " << std::setw(12) << std::right
981 std::cout << std::endl;
984 std::cout.flags(org_flags);
1080 for (i = 0; i < nrows; i++) {
1081 for (j = 0; j < ncolumns; j++) {
1247 for (i = 0; i < nrows; i++) {
1248 for (j = 0; j < ncolumns; j++) {
1275 for (i = 0; i < nrows; i++) {
1276 for (j = 0; j < ncolumns; j++) {
1302 for (i = 0; i < nrows; i++) {
1310 for (j = 0; j < ncolumns; j++) {
1352 if(xtl == xbr || ytl == ybr) {
1353 Error(
"TGTable::GotoTableRange",
"x or y range = 0");
1361 Info(
"TGTable::GotoTableRange",
"Swapping x-range boundries");
1367 Info(
"TGTable::GotoTableRange",
"Swapping y-range boundries");
1373 if((xtl < 0) || (xbr < 0)) {
1374 Info(
"TGTable::GotoTableRange",
"Column boundry out of bounds, adjusting");
1383 if((ytl < 0) || (ybr < 0)) {
1384 Info(
"TGTable::GotoTableRange",
"Row boundry out of bounds, adjusting");
1394 Info(
"TGTable::GotoTableRange",
"Left Column boundry out of bounds, "
1397 xtl = xbr - ncolumns;
1401 Info(
"TGTable::GotoTableRange",
"Right column boundry out of"
1402 " bounds, set to 0");
1406 Info(
"TGTable::GotoTableRange",
"Bottom row boundry out of bounds, "
1413 Info(
"TGTable::GotoTableRange",
"Top row boundry out of bounds, "
1504 if(!topleft.Contains(
","))
return;
1506 Int_t pos = topleft.First(
',');
1508 TString jtl = topleft(pos+1, topleft.Length());
1522 pos = range.
First(
'x');
1567 std::cout <<
"Range = (" <<
fXtl <<
"," <<
fYtl <<
")->("
1568 <<
fXbr <<
"," <<
fYbr <<
")" << std::endl;
include TDocParser_001 C image html pict1_TDocParser_001 png width
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
Convert r,g,b to graphics system dependent pixel value.
virtual void SetContainer(TGFrame *f)
TGFrame * GetContainer() const
virtual void MapSubwindows()
Map all canvas sub windows.
TGVScrollBar * GetVScrollbar() const
TGViewPort * GetViewPort() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Adding a frame to a canvas is actually adding the frame to the viewport container.
virtual void Layout()
Create layout for canvas.
TGHScrollBar * GetHScrollbar() const
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void Layout()
Layout the elements of the composite frame.
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void RemoveAll()
Remove all frames from composite frame.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual UInt_t GetOptions() const
virtual void Move(Int_t x, Int_t y)
Move frame.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void SetWidth(UInt_t w)
const char * GetString() const
virtual void SetLabel(const char *label)
Set the label of this cell to label.
virtual UInt_t GetWidth() const
virtual TGString * GetLabel() const
virtual UInt_t GetHeight() const
void SetCanvas(TGCanvas *canvas)
TGFrame * GetFrame() const
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw a region of container in viewport.
TGHorizontalFrame * fButtonFrame
TGHorizontalFrame * fRangeFrame
virtual const TTableRange * GetCurrentRange() const
virtual void SetInterface(TVirtualTableInterface *interface, UInt_t nrows=50, UInt_t ncolumns=20)
virtual void ScrollCHeaders(Int_t xpos)
virtual void GotoTableRange(Int_t xtl, Int_t ytl, Int_t xbr, Int_t ybr)
TTableRange * fCurrentRange
TGHorizontalFrame * fBottomFrame
virtual void ShrinkColumns(UInt_t ncolumns)
TVirtualTableInterface * fInterface
TGTableFrame * fTableFrame
virtual void UpdateView()
virtual TObjArray * GetColumn(UInt_t columns)
TGHorizontalFrame * fTopFrame
Pixel_t fEvenRowBackground
TGHorizontalFrame * fTopExtraFrame
virtual UInt_t GetNTableColumns() const
virtual Pixel_t GetHeaderBackground() const
TGTable(const TGWindow *p=0, Int_t id=0, TVirtualTableInterface *interface=0, UInt_t nrows=50, UInt_t ncolumns=20)
TObjArray * fColumnHeaders
virtual UInt_t GetNDataColumns() const
virtual void ScrollRHeaders(Int_t ypos)
virtual const TGTableCell * FindCell(TGString label) const
TGTextButton * fNextButton
virtual void Expand(UInt_t nrows, UInt_t ncolumns)
virtual void UpdateHeaders(EHeaderType type)
virtual void ResizeTable(UInt_t nrows, UInt_t ncolumns)
virtual void SetHeaderBackground(Pixel_t pixel)
virtual const TGTableHeader * GetColumnHeader(const UInt_t column) const
virtual TObjArray * GetRow(UInt_t row)
virtual void ShrinkRows(UInt_t nrows)
virtual void ExpandColumns(UInt_t ncolumns)
virtual void UpdateRangeFrame()
virtual TGTableCell * operator()(UInt_t row, UInt_t column)
virtual UInt_t GetNDataRows() const
virtual UInt_t GetNTableRows() const
virtual UInt_t GetCHdrWidth() const
virtual const TGTableCell * GetCell(UInt_t i, UInt_t j) const
TGTextButton * fPrevButton
virtual TGTableHeader * GetTableHeader()
TGTextEntry * fFirstCellEntry
TGTableHeaderFrame * fRHdrFrame
virtual void Shrink(UInt_t nrows, UInt_t ncolumns)
TGTextButton * fGotoButton
virtual void PreviousChunk()
virtual void ExpandRows(UInt_t nrows)
virtual void MoveTable(Int_t rows, Int_t columns)
TGLabel * fFirstCellLabel
virtual void SetOddRowBackground(Pixel_t pixel)
virtual Pixel_t GetRowBackground(UInt_t row) const
TGTextButton * fUpdateButton
TGTableHeader * fTableHeader
virtual void SetDefaultColors()
Pixel_t fOddRowBackground
TGTableHeaderFrame * fCHdrFrame
Pixel_t fHeaderBackground
virtual const TGTableHeader * GetRowHeader(const UInt_t row) const
virtual void UserRangeChange()
TGTextEntry * fRangeEntry
virtual UInt_t GetNTableCells() const
virtual UInt_t GetRHdrHeight() const
virtual void SetEvenRowBackground(Pixel_t pixel)
virtual void DoRedraw()
Redraw the frame.
virtual UInt_t GetNDataCells() const
const char * GetText() const
virtual void SetAlignment(ETextJustification mode=kTextLeft)
Sets the alignment of the text entry.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
virtual void DestroyWindow()
virtual void Add(TObject *obj)
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void Expand(Int_t newSize)
Expand or shrink the array to newSize elements.
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
virtual TObject * RemoveAt(Int_t idx)
Remove object at index idx.
TObject * At(Int_t idx) const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Int_t Atoi() const
Return integer value of string.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Bool_t IsAlnum() const
Returns true if all characters in string are alphanumeric.
Bool_t operator==(TTableRange &other)
virtual UInt_t GetNRows()=0
virtual const char * GetValueAsString(UInt_t row, UInt_t column)=0
virtual const char * GetColumnHeader(UInt_t column)=0
virtual UInt_t GetNColumns()=0
virtual const char * GetRowHeader(UInt_t row)=0
void Init(TClassEdit::TInterpreterLookupHelper *helper)