142 for (i = 0; i <
fNrows; ++i)
fRow[i].fDefSize = 0;
143 for (i = 0; i <
fNcols; ++i)
fCol[i].fDefSize = 0;
155 if (ptr->
fState == 0)
continue;
159 Error(
"FindRowColSizesSinglyAttached",
"didn't get TGTableLayoutHints from %s, layout = 0x%zx",
164 if (col == (
layout->GetAttachRight() - 1))
171 if (row == (
layout->GetAttachBottom() - 1))
190 for (col = 0; col <
fNcols; ++col)
193 for (row = 0; row <
fNrows; ++row)
210 if (ptr->
fState == 0)
continue;
214 Error(
"FindRowColSizesMultiplyAttached",
"didn't get TGTableLayoutHints");
219 if (left != right-1) {
221 for (col = left; col < right; ++col)
width +=
fCol[col].fDefSize;
229 for (col = left; col < right; ++col) {
238 if (top != bottom-1) {
240 for (row = top; row < bottom; ++row)
height +=
fRow[row].fDefSize;
248 for (row = top; row < bottom; ++row) {
279 thing[
ind].fRealSize = std::max(1U, extra);
291 thing[
ind].fRealSize = std::max(1U, extra);
361 for (col = 0; col <
fNcols; ++col) {
370 for (row = 0; row <
fNrows; ++row) {
386 Error(
"SetRowColSizesInit",
"didn't get TGTableLayoutHints");
392 if (
layout->GetAttachLeft() ==
layout->GetAttachRight()-1) {
400 if (
layout->GetAttachTop() ==
layout->GetAttachBottom()-1) {
415 Error(
"SetRowColSizesInit",
"didn't get TGTableLayoutHints");
423 if (left != right - 1) {
424 for (col = left; col < right; ++col)
fCol[col].fEmpty =
kFALSE;
427 for (col = left; col < right; ++col)
430 for (col = left; col < right; ++col)
434 for (col = left; col < right; ++col)
437 for (col = left; col < right; ++col)
445 if (top != bottom - 1) {
446 for (row = top; row < bottom; ++row)
fRow[row].fEmpty =
kFALSE;
449 for (row = top; row < bottom; ++row)
452 for (row = top; row < bottom; ++row)
456 for (row = top; row < bottom; ++row)
459 for (row = top; row < bottom; ++row)
466 for (col = 0; col <
fNcols; ++col) {
467 if (
fCol[col].fEmpty) {
475 for (row = 0; row <
fNrows; ++row) {
476 if (
fRow[row].fEmpty) {
498 Error(
"CheckSanity",
"didn't get TGTableLayoutHints");
509 Error(
"CheckSanity",
"AttachLeft == AttachRight");
513 Error(
"CheckSanity",
"AttachLeft > AttachRight");
517 Error(
"CheckSanity",
"AttachLeft illegal value: %u", left);
521 Error(
"CheckSanity",
"AttachRight illegal value: %u", right);
526 Error(
"CheckSanity",
"AttachTop == AttachBottom");
530 Error(
"CheckSanity",
"AttachTop > AttachBottom");
534 Error(
"CheckSanity",
"AttachTop illegal value: %u", top);
538 Error(
"CheckSanity",
"AttachBottom illegal value: %u", bottom);
566 Error(
"TGTableLayout::Layout",
"didn't get TGTableLayoutHints");
579 for (col = 0; col < left; ++col)
cell_x +=
fCol[col].fRealSize;
582 for (row = 0; row < top; ++row)
cell_y +=
fRow[row].fRealSize;
585 for (col=left; col < right; ++col)
589 for (row=top; row < bottom; ++row)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
The base class for composite widgets (menu bars, list boxes, etc.).
virtual TList * GetList() const
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize the frame.
Int_t GetBorderWidth() const
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
TGDimension GetSize() const
virtual UInt_t GetOptions() const
Int_t GetPadRight() const
Int_t GetPadBottom() const
ULong_t GetLayoutHints() const
This class describes layout hints used by the TGTableLayout class.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save layout hints as a C++ statement(s) on output stream out.
UInt_t GetAttachLeft() const
UInt_t GetAttachTop() const
UInt_t GetAttachBottom() const
UInt_t GetAttachRight() const
Bool_t fHomogeneous
all cols/rows same size
void FindRowColSizesMultiplyAttached()
Checks any children which span multiple col/rows.
~TGTableLayout() override
TGTableLayout constructor.
void FindRowColSizesHomogeneous()
If the table is homogeneous make sure all col/rows are same size as biggest col/row.
void SetRowColSizes()
This gets the new sizes needed to fit the table to the parent frame.
TableData_t * fRow
info about each row
void Layout() override
Make a table layout of all frames in the list.
Int_t fHints
layout hints (currently not used)
static void SetRowColResize(UInt_t real_size, UInt_t nthings, TableData_t *thing, Bool_t homogeneous)
If main frame is bigger or smaller than all children, expand/shrink to fill.
void FindRowColSizesSinglyAttached()
Determine the size of rows/cols needed for singly attached children.
UInt_t fNcols
number of columns
void FindRowColSizesInit()
Initialize values needed to determine the size of rows and columns.
Int_t fSep
interval between frames
void CheckSanity()
Sanity check various values.
UInt_t fNrows
number of rows
TableData_t * fCol
info about each column
TList * fList
list of frames to arrange
void SavePrimitive(std::ostream &out, Option_t *="") override
Save a primitive as a C++ statement(s) on output stream "out".
TGCompositeFrame * fMain
container frame
TGTableLayout(const TGTableLayout &)=delete
TGDimension GetDefaultSize() const override
Return default dimension of the table layout.
void FindRowColSizes()
Find the sizes of rows and columns needed to satisfy children's layout policies.
void SetRowColSizesInit()
Initialize rows/cols.
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
UInt_t fDefSize
Default size of col/rows.
UInt_t fRealSize
Real size of col/rows (eg, if table resize)