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);
252 if (hints & kLHintsExpandY) exp_max = 0;
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)
372 if (options & kFixedWidth) size.fWidth = msize.
fWidth;
373 if (options & kFixedHeight) size.fHeight = msize.
fHeight;
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);
415 if (hints & kLHintsExpandX) exp_max = 0;
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;
530 if (options & kFixedWidth) size.fWidth = msize.
fWidth;
531 if (options & kFixedHeight) size.fHeight = msize.
fHeight;
587 if (options & kFixedHeight) size.fHeight = msize.
fHeight;
588 if (options & kFixedWidth) size.fWidth = msize.
fWidth;
639 size.fHeight -=
fSep;
643 if (options & kFixedWidth) size.fWidth = msize.
fWidth;
696 }
else if (
fRows == 0) {
708 if (rowcount <= 0)
return;
790 xw = x + (
Int_t)((max_osize.fWidth - csize.
fWidth) >> 1);
797 yw = y + (
Int_t)((max_osize.fHeight - csize.
fHeight) >> 1);
810 if (x + max_osize.fWidth > max_width) {
840 x += max_osize.fWidth +
fSep;
841 if (x + max_osize.fWidth > max_size.
fWidth) {
846 if (x !=
fSep) y += max_osize.fHeight +
fSep;
883 xw = x + (
Int_t)((max_osize.fWidth - csize.
fWidth) >> 1);
890 yw = y + (
Int_t)((max_osize.fHeight - csize.
fHeight) >> 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 void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Int_t GetPadRight() const
Definitions for TRefCnt, base class for reference counted objects.
TGMatrixLayout(const TGMatrixLayout &)
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual TList * GetList() const
virtual TGDimension GetDefaultSize() const
Return default dimension of the horizontal layout.
virtual TGDimension GetDefaultSize() const
Return default dimension of the row layout.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void Layout()
Make a vertical layout of all frames in the list.
void Print(Option_t *option="") const
Print this frame element.
virtual UInt_t GetOptions() const
virtual TGDimension GetDefaultSize() const
Return default dimension of the matrix layout.
TGVerticalLayout(const TGVerticalLayout &gvl)
if(pyself &&pyself!=Py_None)
virtual TGDimension GetDefaultSize() const
Return default dimension of the column layout.
virtual TGDimension GetDefaultSize() const
Return default dimension of the vertical layout.
ULong_t GetLayoutHints() const
virtual void Layout()
Make a horizontal layout of all frames in the list.
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 void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
virtual void Layout()
Make a column layout of all frames in the list.
virtual void Layout()
Make a tile layout of all frames in the list.
virtual TGDimension GetDefaultSize() const
Return default dimension of the list details layout.
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".
void SetRefCount(UInt_t r)
TGLayoutHints(ULong_t hints=kLHintsNormal, Int_t padleft=0, Int_t padright=0, Int_t padtop=0, Int_t padbottom=0)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
void UpdateFrameElements(TGLayoutHints *l)
Update layout hints of frame elements.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a primitive as a C++ statement(s) on output stream "out".
Int_t GetPadBottom() const
virtual void Move(Int_t x, Int_t y)
Move frame.
virtual void Layout()
Make a tile layout of all frames in the list.
TGDimension GetSize() const
virtual TGDimension GetDefaultSize() const
Return default dimension of the list layout.
virtual ~TGLayoutHints()
Destructor.
TGTileLayout(const TGTileLayout &)
void Print(Option_t *option="") const
Printing.
Mother of all ROOT objects.
~TGFrameElement()
Destructor. Decrease ref. count of fLayout.
virtual UInt_t GetDefaultHeight() const
Int_t GetBorderWidth() const
virtual void Layout()
Make a matrix layout of all frames in the list.
Short_t Max(Short_t a, Short_t b)
ClassImp(TGLayoutHints) ClassImp(TGLayoutManager) ClassImp(TGVerticalLayout) ClassImp(TGHorizontalLayout) ClassImp(TGRowLayout) ClassImp(TGColumnLayout) ClassImp(TGMatrixLayout) ClassImp(TGTileLayout) ClassImp(TGListLayout) ClassImp(TGListDetailsLayout) TGFrameElement
Constructor.
virtual TGDimension GetDefaultSize() const
Return default dimension of the tile 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 list details layout of all frames in the list.