78 if (
f)
f->SetFrameElement(
this);
110 std::cout << std::endl;
156 std::cout <<
"kLHintsLeft";
160 if (bor) std::cout <<
" | ";
161 std::cout <<
"kLHintsCenterX";
165 if (bor) std::cout <<
" | ";
166 std::cout <<
"kLHintsRight";
170 if (bor) std::cout <<
" | ";
171 std::cout <<
"kLHintsTop";
175 if (bor) std::cout <<
" | ";
176 std::cout <<
"kLHintsCenterY";
180 if (bor) std::cout <<
" | ";
181 std::cout <<
"kLHintsBottom";
185 if (bor) std::cout <<
" | ";
186 std::cout <<
"kLHintsExpandX";
190 if (bor) std::cout <<
" | ";
191 std::cout <<
"kLHintsExpandY";
195 if (bor) std::cout <<
" | ";
196 std::cout <<
"kLHintsNoHints";
198 std::cout <<
", fPadtop=" <<
fPadtop;
200 std::cout <<
", fPadleft=" <<
fPadleft;
201 std::cout <<
", fPadright=" <<
fPadright;
202 std::cout << std::endl;
232 UInt_t pad_left, pad_top, pad_right, pad_bottom;
233 Int_t size_expand=0, esize_expand=0, rem_expand=0, tmp_expand = 0;
239 bottom = msize.
fHeight - (top = bw);
240 remain = msize.
fHeight - (bw << 1);
255 remain -= size.fHeight;
263 size_expand = remain/nb_expand;
265 if (size_expand < exp_max)
266 esize_expand = (remain -
exp)/nb_expand;
267 rem_expand = remain % nb_expand;
273 hints = (layout = ptr->
fLayout)->GetLayoutHints();
289 size.fWidth = msize.
fWidth - (bw << 1) - pad_left - pad_right;
292 size.fWidth = csize.
fWidth;
296 if (size_expand >= exp_max)
297 size.fHeight = size_expand - pad_top - pad_bottom;
299 size.fHeight = csize.
fHeight + esize_expand;
301 tmp_expand += rem_expand;
302 if (tmp_expand >= nb_expand) {
304 tmp_expand -= nb_expand;
309 if (size_expand >= exp_max) {
310 extra_space = (size_expand - pad_top - pad_bottom - size.fHeight) >> 1;
312 extra_space = esize_expand >> 1;
320 y = bottom - size.fHeight - pad_bottom;
321 bottom -= size.fHeight + pad_top + pad_bottom;
324 top += size.fHeight + pad_top + pad_bottom;
330 if (
x > 32768)
x = bw + 1;
332 if (size.fWidth > 32768)
334 if (size.fHeight > 32768)
396 UInt_t pad_left, pad_top, pad_right, pad_bottom;
397 Int_t size_expand=0, esize_expand=0, rem_expand=0, tmp_expand = 0;
402 right = msize.
fWidth - (left = bw);
403 remain = msize.
fWidth - (bw << 1);
425 size_expand = remain/nb_expand;
427 if (size_expand < exp_max) {
428 esize_expand = (remain -
exp)/nb_expand;
430 rem_expand = remain % nb_expand;
436 hints = (layout = ptr->
fLayout)->GetLayoutHints();
459 if (size_expand >= exp_max)
460 size.
fWidth = size_expand - pad_left - pad_right;
464 tmp_expand += rem_expand;
466 if (tmp_expand >= nb_expand) {
468 tmp_expand -= nb_expand;
473 if (size_expand >= exp_max) {
474 extra_space = (size_expand - pad_left - pad_right - size.
fWidth)>> 1;
476 extra_space = esize_expand >> 1;
484 x = right - size.
fWidth - pad_right;
485 right -= size.
fWidth + pad_left + pad_right;
488 left += size.
fWidth + pad_left + pad_right;
639 size.fHeight -=
fSep;
696 }
else if (
fRows == 0) {
708 if (rowcount <= 0)
return;
790 xw =
x + (
Int_t)((max_osize.fWidth - csize.
fWidth) >> 1);
810 if (
x + max_osize.fWidth > max_width) {
840 x += max_osize.fWidth +
fSep;
841 if (
x + max_osize.fWidth > max_size.
fWidth) {
883 xw =
x + (
Int_t)((max_osize.fWidth - csize.
fWidth) >> 1);
903 if (
y + max_osize.fHeight > max_height) {
933 if (
y + max_osize.fHeight > max_size.
fHeight) {
1013 if ((option == 0) || strcmp(option,
"nocoma"))
1017 out <<
"new TGLayoutHints(kLHintsNormal)";
1021 if (hints.
Length() == 0) hints =
"kLHintsLeft";
1022 else hints +=
" | kLHintsLeft";
1025 if (hints.
Length() == 0) hints =
"kLHintsCenterX";
1026 else hints +=
" | kLHintsCenterX";
1029 if (hints.
Length() == 0) hints =
"kLHintsRight";
1030 else hints +=
" | kLHintsRight";
1033 if (hints.
Length() == 0) hints =
"kLHintsTop";
1034 else hints +=
" | kLHintsTop";
1037 if (hints.
Length() == 0) hints =
"kLHintsCenterY";
1038 else hints +=
" | kLHintsCenterY";
1041 if (hints.
Length() == 0) hints =
"kLHintsBottom";
1042 else hints +=
" | kLHintsBottom";
1045 if (hints.
Length() == 0) hints =
"kLHintsExpandX";
1046 else hints +=
" | kLHintsExpandX";
1049 if (hints.
Length() == 0) hints =
"kLHintsExpandY";
1050 else hints +=
" | kLHintsExpandY";
1053 out <<
"new TGLayoutHints(" << hints;
1068 out <<
"new TGVerticalLayout(" <<
fMain->
GetName() <<
")";
1078 out <<
"new TGHorizontalLayout(" <<
fMain->
GetName() <<
")";
1097 out <<
"new TGColumnLayout(" <<
fMain->
GetName() <<
","
1108 out <<
"new TGMatrixLayout(" <<
fMain->
GetName() <<
","
1144 out <<
"new TGListDetailsLayout(" <<
fMain->
GetName() <<
","
virtual TGDimension GetDefaultSize() const
Return default dimension of the column layout.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void Layout()
Make a column layout of all frames in the list.
virtual TList * GetList() const
void Print(Option_t *option="") const
Print this frame element.
~TGFrameElement()
Destructor. Decrease ref. count of fLayout.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Int_t GetBorderWidth() const
virtual UInt_t GetDefaultHeight() const
TGDimension GetSize() const
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 MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
virtual TGDimension GetDefaultSize() const
Return default dimension of the horizontal layout.
virtual void Layout()
Make a horizontal layout of all frames in the list.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
Int_t GetPadRight() const
void Print(Option_t *option="") const
Printing.
Int_t GetPadBottom() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
TGLayoutHints(ULong_t hints=kLHintsNormal, Int_t padleft=0, Int_t padright=0, Int_t padtop=0, Int_t padbottom=0)
ULong_t GetLayoutHints() const
virtual ~TGLayoutHints()
Destructor.
void UpdateFrameElements(TGLayoutHints *l)
Update layout hints of frame elements.
virtual TGDimension GetDefaultSize() const
Return default dimension of the list details layout.
virtual void Layout()
Make a list details layout of all frames in the list.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void Layout()
Make a tile layout of all frames in the list.
virtual TGDimension GetDefaultSize() const
Return default dimension of the list layout.
virtual TGDimension GetDefaultSize() const
Return default dimension of the matrix layout.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void Layout()
Make a matrix layout of all frames in the list.
TGMatrixLayout(const TGMatrixLayout &)
virtual void Layout()
Make a row layout of all frames in the list.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual TGDimension GetDefaultSize() const
Return default dimension of the row layout.
virtual TGDimension GetDefaultSize() const
Return default dimension of the tile layout.
TGTileLayout(const TGTileLayout &)
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void Layout()
Make a tile layout of all frames in the list.
virtual TGDimension GetDefaultSize() const
Return default dimension of the vertical layout.
TGVerticalLayout(const TGVerticalLayout &gvl)
virtual void Layout()
Make a vertical layout of all frames in the list.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Mother of all ROOT objects.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
Definitions for TRefCnt, base class for reference counted objects.
void SetRefCount(UInt_t r)
int main(int argc, char **argv)
static constexpr double s
Short_t Max(Short_t a, Short_t b)