144 for (i = 0; i <
fNrows; ++i)
fRow[i].fDefSize = 0;
145 for (i = 0; i <
fNcols; ++i)
fCol[i].fDefSize = 0;
157 if (ptr->
fState == 0)
continue;
161 Error(
"FindRowColSizesSinglyAttached",
"didn't get TGTableLayoutHints from %s, layout = 0x%zx",
166 if (col == (
layout->GetAttachRight() - 1))
173 if (row == (
layout->GetAttachBottom() - 1))
192 for (col = 0; col <
fNcols; ++col)
195 for (row = 0; row <
fNrows; ++row)
212 if (ptr->
fState == 0)
continue;
216 Error(
"FindRowColSizesMultiplyAttached",
"didn't get TGTableLayoutHints");
221 if (left != right-1) {
223 for (col = left; col < right; ++col)
width +=
fCol[col].fDefSize;
231 for (col = left; col < right; ++col) {
240 if (top != bottom-1) {
242 for (row = top; row < bottom; ++row)
height +=
fRow[row].fDefSize;
250 for (row = top; row < bottom; ++row) {
363 for (col = 0; col <
fNcols; ++col) {
372 for (row = 0; row <
fNrows; ++row) {
388 Error(
"SetRowColSizesInit",
"didn't get TGTableLayoutHints");
394 if (
layout->GetAttachLeft() ==
layout->GetAttachRight()-1) {
402 if (
layout->GetAttachTop() ==
layout->GetAttachBottom()-1) {
417 Error(
"SetRowColSizesInit",
"didn't get TGTableLayoutHints");
425 if (left != right - 1) {
426 for (col = left; col < right; ++col)
fCol[col].fEmpty =
kFALSE;
429 for (col = left; col < right; ++col)
432 for (col = left; col < right; ++col)
436 for (col = left; col < right; ++col)
439 for (col = left; col < right; ++col)
447 if (top != bottom - 1) {
448 for (row = top; row < bottom; ++row)
fRow[row].fEmpty =
kFALSE;
451 for (row = top; row < bottom; ++row)
454 for (row = top; row < bottom; ++row)
458 for (row = top; row < bottom; ++row)
461 for (row = top; row < bottom; ++row)
468 for (col = 0; col <
fNcols; ++col) {
469 if (
fCol[col].fEmpty) {
477 for (row = 0; row <
fNrows; ++row) {
478 if (
fRow[row].fEmpty) {
500 Error(
"CheckSanity",
"didn't get TGTableLayoutHints");
511 Error(
"CheckSanity",
"AttachLeft == AttachRight");
515 Error(
"CheckSanity",
"AttachLeft > AttachRight");
519 Error(
"CheckSanity",
"AttachLeft illegal value: %u", left);
523 Error(
"CheckSanity",
"AttachRight illegal value: %u", right);
528 Error(
"CheckSanity",
"AttachTop == AttachBottom");
532 Error(
"CheckSanity",
"AttachTop > AttachBottom");
536 Error(
"CheckSanity",
"AttachTop illegal value: %u", top);
540 Error(
"CheckSanity",
"AttachBottom illegal value: %u", bottom);
568 Error(
"TGTableLayout::Layout",
"didn't get TGTableLayoutHints");
581 for (col = 0; col < left; ++col)
cell_x +=
fCol[col].fRealSize;
584 for (row = 0; row < top; ++row)
cell_y +=
fRow[row].fRealSize;
587 for (col=left; col < right; ++col)
591 for (row=top; row < bottom; ++row)
678 if (
hints.Length() == 0)
hints =
"kLHintsLeft";
679 else hints +=
" | kLHintsLeft";
682 if (
hints.Length() == 0)
hints =
"kLHintsCenterX";
683 else hints +=
" | kLHintsCenterX";
686 if (
hints.Length() == 0)
hints =
"kLHintsRight";
687 else hints +=
" | kLHintsRight";
690 if (
hints.Length() == 0)
hints =
"kLHintsTop";
691 else hints +=
" | kLHintsTop";
694 if (
hints.Length() == 0)
hints =
"kLHintsCenterY";
695 else hints +=
" | kLHintsCenterY";
698 if (
hints.Length() == 0)
hints =
"kLHintsBottom";
699 else hints +=
" | kLHintsBottom";
702 if (
hints.Length() == 0)
hints =
"kLHintsExpandX";
703 else hints +=
" | kLHintsExpandX";
706 if (
hints.Length() == 0)
hints =
"kLHintsExpandY";
707 else hints +=
" | kLHintsExpandY";
710 if (
hints.Length() == 0)
hints =
"kLHintsShrinkX";
711 else hints +=
" | kLHintsShrinkX";
714 if (
hints.Length() == 0)
hints =
"kLHintsShrinkY";
715 else hints +=
" | kLHintsShrinkY";
718 if (
hints.Length() == 0)
hints =
"kLHintsFillX";
719 else hints +=
" | kLHintsFillX";
722 if (
hints.Length() == 0)
hints =
"kLHintsFillY";
723 else hints +=
" | kLHintsFillY";
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
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 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
A layout manager, which places child frames in a table arranged in rows and columns,...
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.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
UInt_t fDefSize
Default size of col/rows.
UInt_t fRealSize
Real size of col/rows (eg, if table resize)