111 std::cout << std::endl;
157 std::cout <<
"kLHintsLeft";
161 if (bor) std::cout <<
" | ";
162 std::cout <<
"kLHintsCenterX";
166 if (bor) std::cout <<
" | ";
167 std::cout <<
"kLHintsRight";
171 if (bor) std::cout <<
" | ";
172 std::cout <<
"kLHintsTop";
176 if (bor) std::cout <<
" | ";
177 std::cout <<
"kLHintsCenterY";
181 if (bor) std::cout <<
" | ";
182 std::cout <<
"kLHintsBottom";
186 if (bor) std::cout <<
" | ";
187 std::cout <<
"kLHintsExpandX";
191 if (bor) std::cout <<
" | ";
192 std::cout <<
"kLHintsExpandY";
196 if (bor) std::cout <<
" | ";
197 std::cout <<
"kLHintsNoHints";
199 std::cout <<
", fPadtop=" <<
fPadtop;
201 std::cout <<
", fPadleft=" <<
fPadleft;
202 std::cout <<
", fPadright=" <<
fPadright;
203 std::cout << std::endl;
233 UInt_t pad_left, pad_top, pad_right, pad_bottom;
234 Int_t size_expand=0, esize_expand=0, rem_expand=0, tmp_expand = 0;
240 bottom = msize.
fHeight - (top = bw);
241 remain = msize.
fHeight - (bw << 1);
256 remain -= size.fHeight;
264 size_expand = remain/nb_expand;
266 if (size_expand < exp_max)
267 esize_expand = (remain -
exp)/nb_expand;
268 rem_expand = remain % nb_expand;
274 hints = (layout = ptr->
fLayout)->GetLayoutHints();
290 size.fWidth = msize.
fWidth - (bw << 1) - pad_left - pad_right;
293 size.fWidth = csize.
fWidth;
297 if (size_expand >= exp_max)
298 size.fHeight = size_expand - pad_top - pad_bottom;
300 size.fHeight = csize.
fHeight + esize_expand;
302 tmp_expand += rem_expand;
303 if (tmp_expand >= nb_expand) {
305 tmp_expand -= nb_expand;
310 if (size_expand >= exp_max) {
311 extra_space = (size_expand - pad_top - pad_bottom - size.fHeight) >> 1;
313 extra_space = esize_expand >> 1;
321 y = bottom - size.fHeight - pad_bottom;
322 bottom -= size.fHeight + pad_top + pad_bottom;
325 top += size.fHeight + pad_top + pad_bottom;
331 if (
x > 32768)
x = bw + 1;
333 if (size.fWidth > 32768)
335 if (size.fHeight > 32768)
397 UInt_t pad_left, pad_top, pad_right, pad_bottom;
398 Int_t size_expand=0, esize_expand=0, rem_expand=0, tmp_expand = 0;
403 right = msize.
fWidth - (left = bw);
404 remain = msize.
fWidth - (bw << 1);
426 size_expand = remain/nb_expand;
428 if (size_expand < exp_max) {
429 esize_expand = (remain -
exp)/nb_expand;
431 rem_expand = remain % nb_expand;
437 hints = (layout = ptr->
fLayout)->GetLayoutHints();
460 if (size_expand >= exp_max)
461 size.
fWidth = size_expand - pad_left - pad_right;
465 tmp_expand += rem_expand;
467 if (tmp_expand >= nb_expand) {
469 tmp_expand -= nb_expand;
474 if (size_expand >= exp_max) {
475 extra_space = (size_expand - pad_left - pad_right - size.
fWidth)>> 1;
477 extra_space = esize_expand >> 1;
485 x = right - size.
fWidth - pad_right;
486 right -= size.
fWidth + pad_left + pad_right;
489 left += size.
fWidth + pad_left + pad_right;
640 size.fHeight -=
fSep;
697 }
else if (
fRows == 0) {
709 if (rowcount <= 0)
return;
791 xw =
x + (
Int_t)((max_osize.fWidth - csize.
fWidth) >> 1);
811 if (
x + max_osize.fWidth > max_width) {
841 x += max_osize.fWidth +
fSep;
842 if (
x + max_osize.fWidth > max_size.
fWidth) {
884 xw =
x + (
Int_t)((max_osize.fWidth - csize.
fWidth) >> 1);
904 if (
y + max_osize.fHeight > max_height) {
934 if (
y + max_osize.fHeight > max_size.
fHeight) {
1014 if ((option == 0) || strcmp(option,
"nocoma"))
1018 out <<
"new TGLayoutHints(kLHintsNormal)";
1022 if (hints.
Length() == 0) hints =
"kLHintsLeft";
1023 else hints +=
" | kLHintsLeft";
1026 if (hints.
Length() == 0) hints =
"kLHintsCenterX";
1027 else hints +=
" | kLHintsCenterX";
1030 if (hints.
Length() == 0) hints =
"kLHintsRight";
1031 else hints +=
" | kLHintsRight";
1034 if (hints.
Length() == 0) hints =
"kLHintsTop";
1035 else hints +=
" | kLHintsTop";
1038 if (hints.
Length() == 0) hints =
"kLHintsCenterY";
1039 else hints +=
" | kLHintsCenterY";
1042 if (hints.
Length() == 0) hints =
"kLHintsBottom";
1043 else hints +=
" | kLHintsBottom";
1046 if (hints.
Length() == 0) hints =
"kLHintsExpandX";
1047 else hints +=
" | kLHintsExpandX";
1050 if (hints.
Length() == 0) hints =
"kLHintsExpandY";
1051 else hints +=
" | kLHintsExpandY";
1054 out <<
"new TGLayoutHints(" << hints;
1069 out <<
"new TGVerticalLayout(" <<
fMain->
GetName() <<
")";
1079 out <<
"new TGHorizontalLayout(" <<
fMain->
GetName() <<
")";
1098 out <<
"new TGColumnLayout(" <<
fMain->
GetName() <<
","
1109 out <<
"new TGMatrixLayout(" <<
fMain->
GetName() <<
","
1145 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.
void SetFrameElement(TGFrameElement *fe)
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)
Short_t Max(Short_t a, Short_t b)