82 std::cout << std::endl;
114 while (
p &&
p->fLayout) {
116 p =
p->fLayout->fPrev;
128 std::cout <<
"kLHintsLeft";
132 if (bor) std::cout <<
" | ";
133 std::cout <<
"kLHintsCenterX";
137 if (bor) std::cout <<
" | ";
138 std::cout <<
"kLHintsRight";
142 if (bor) std::cout <<
" | ";
143 std::cout <<
"kLHintsTop";
147 if (bor) std::cout <<
" | ";
148 std::cout <<
"kLHintsCenterY";
152 if (bor) std::cout <<
" | ";
153 std::cout <<
"kLHintsBottom";
157 if (bor) std::cout <<
" | ";
158 std::cout <<
"kLHintsExpandX";
162 if (bor) std::cout <<
" | ";
163 std::cout <<
"kLHintsExpandY";
167 if (bor) std::cout <<
" | ";
168 std::cout <<
"kLHintsNoHints";
170 std::cout <<
", fPadtop=" <<
fPadtop;
172 std::cout <<
", fPadleft=" <<
fPadleft;
173 std::cout <<
", fPadright=" <<
fPadright;
174 std::cout << std::endl;
204 UInt_t pad_left, pad_top, pad_right, pad_bottom;
205 Int_t size_expand=0, esize_expand=0, rem_expand=0, tmp_expand = 0;
211 bottom = msize.
fHeight - (top = bw);
212 remain = msize.
fHeight - (bw << 1);
227 remain -=
size.fHeight;
235 size_expand = remain/nb_expand;
237 if (size_expand < exp_max)
238 esize_expand = (remain - exp)/nb_expand;
239 rem_expand = remain % nb_expand;
245 hints = (layout = ptr->
fLayout)->GetLayoutHints();
261 size.fWidth = msize.
fWidth - (bw << 1) - pad_left - pad_right;
268 if (size_expand >= exp_max)
269 size.fHeight = size_expand - pad_top - pad_bottom;
273 tmp_expand += rem_expand;
274 if (tmp_expand >= nb_expand) {
276 tmp_expand -= nb_expand;
281 if (size_expand >= exp_max) {
282 extra_space = (size_expand - pad_top - pad_bottom -
size.fHeight) >> 1;
284 extra_space = esize_expand >> 1;
291 y = bottom -
size.fHeight - pad_bottom;
292 bottom -=
size.fHeight + pad_top + pad_bottom;
295 top +=
size.fHeight + pad_top + pad_bottom;
301 if (
x > 32768)
x = bw + 1;
303 if (
size.fWidth > 32768)
305 if (
size.fHeight > 32768)
367 UInt_t pad_left, pad_top, pad_right, pad_bottom;
368 Int_t size_expand=0, esize_expand=0, rem_expand=0, tmp_expand = 0;
373 right = msize.
fWidth - (left = bw);
374 remain = msize.
fWidth - (bw << 1);
389 remain -=
size.fWidth;
396 size_expand = remain/nb_expand;
398 if (size_expand < exp_max) {
399 esize_expand = (remain - exp)/nb_expand;
401 rem_expand = remain % nb_expand;
407 hints = (layout = ptr->
fLayout)->GetLayoutHints();
423 size.fHeight = msize.
fHeight - (bw << 1) - pad_top - pad_bottom;
430 if (size_expand >= exp_max)
431 size.fWidth = size_expand - pad_left - pad_right;
435 tmp_expand += rem_expand;
437 if (tmp_expand >= nb_expand) {
439 tmp_expand -= nb_expand;
444 if (size_expand >= exp_max) {
445 extra_space = (size_expand - pad_left - pad_right -
size.fWidth)>> 1;
447 extra_space = esize_expand >> 1;
454 x = right -
size.fWidth - pad_right;
455 right -=
size.fWidth + pad_left + pad_right;
458 left +=
size.fWidth + pad_left + pad_right;
666 }
else if (
fRows == 0) {
678 if (rowcount <= 0)
return;
760 xw =
x + (
Int_t)((max_osize.fWidth - csize.
fWidth) >> 1);
780 if (
x + max_osize.fWidth > max_width) {
810 x += max_osize.fWidth +
fSep;
811 if (
x + max_osize.fWidth > max_size.
fWidth) {
853 xw =
x + (
Int_t)((max_osize.fWidth - csize.
fWidth) >> 1);
873 if (
y + max_osize.fHeight > max_height) {
903 if (
y + max_osize.fHeight > max_size.
fHeight) {
987 out <<
"new TGLayoutHints(kLHintsNormal)";
991 if (hints.
Length() == 0) hints =
"kLHintsLeft";
992 else hints +=
" | kLHintsLeft";
995 if (hints.
Length() == 0) hints =
"kLHintsCenterX";
996 else hints +=
" | kLHintsCenterX";
999 if (hints.
Length() == 0) hints =
"kLHintsRight";
1000 else hints +=
" | kLHintsRight";
1003 if (hints.
Length() == 0) hints =
"kLHintsTop";
1004 else hints +=
" | kLHintsTop";
1007 if (hints.
Length() == 0) hints =
"kLHintsCenterY";
1008 else hints +=
" | kLHintsCenterY";
1011 if (hints.
Length() == 0) hints =
"kLHintsBottom";
1012 else hints +=
" | kLHintsBottom";
1015 if (hints.
Length() == 0) hints =
"kLHintsExpandX";
1016 else hints +=
" | kLHintsExpandX";
1019 if (hints.
Length() == 0) hints =
"kLHintsExpandY";
1020 else hints +=
" | kLHintsExpandY";
1023 out <<
"new TGLayoutHints(" << hints;
1038 out <<
"new TGVerticalLayout(" <<
fMain->
GetName() <<
")";
1048 out <<
"new TGHorizontalLayout(" <<
fMain->
GetName() <<
")";
1067 out <<
"new TGColumnLayout(" <<
fMain->
GetName() <<
","
1078 out <<
"new TGMatrixLayout(" <<
fMain->
GetName() <<
","
1114 out <<
"new TGListDetailsLayout(" <<
fMain->
GetName() <<
","
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
winID h TVirtualViewer3D TVirtualGLPainter p
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 r
The following layout manager do not make use of TGLayoutHints.
void Layout() override
Make a column layout of all frames in the list.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save column layout manager as a C++ statement(s) on output stream.
TGDimension GetDefaultSize() const override
Return default dimension of the column layout.
The base class for composite widgets (menu bars, list boxes, etc.).
virtual TList * GetList() const
~TGFrameElement()
Destructor. Decrease ref. count of fLayout.
void Print(Option_t *option="") const override
Print this frame element.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
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.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Int_t GetBorderWidth() const
virtual UInt_t GetDefaultHeight() const
TGDimension GetSize() const
void Move(Int_t x, Int_t y) override
Move frame.
virtual UInt_t GetOptions() const
void SetFrameElement(TGFrameElement *fe)
TGDimension GetDefaultSize() const override
Return default dimension of the horizontal layout.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save horizontal layout manager as a C++ statement(s) on output stream.
void Layout() override
Make a horizontal layout of all frames in the list.
This class describes layout hints used by the layout classes.
Int_t GetPadRight() const
void Print(Option_t *option="") const override
Printing.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save layout hints as a C++ statement(s) on output stream out.
Int_t GetPadBottom() const
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.
This is a layout manager for the TGListView widget.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save list details layout manager as a C++ statement(s) on out stream.
void Layout() override
Make a list details layout of all frames in the list.
TGDimension GetDefaultSize() const override
Return default dimension of the list details layout.
This is a layout manager for the TGListView widget.
void Layout() override
Make a tile layout of all frames in the list.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save list layout manager as a C++ statement(s) on output stream.
TGDimension GetDefaultSize() const override
Return default dimension of the list layout.
This layout managers does not make use of TGLayoutHints.
UInt_t fRows
number of rows
void SavePrimitive(std::ostream &out, Option_t *="") override
Save matrix layout manager as a C++ statement(s) on output stream.
Int_t fHints
layout hints (currently not used)
TGMatrixLayout(const TGMatrixLayout &)=delete
TGCompositeFrame * fMain
container frame
Int_t fSep
interval between frames
UInt_t fColumns
number of columns
void Layout() override
Make a matrix layout of all frames in the list.
TList * fList
list of frames to arrange
TGDimension GetDefaultSize() const override
Return default dimension of the matrix layout.
The following two layout managers do not make use of TGLayoutHints.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save row layout manager as a C++ statement(s) on output stream.
TGDimension GetDefaultSize() const override
Return default dimension of the row layout.
void Layout() override
Make a row layout of all frames in the list.
This is a layout manager for the TGListView widget.
TGDimension GetDefaultSize() const override
Return default dimension of the tile layout.
TList * fList
list of frames to arrange
Int_t fSep
separation between tiles
TGCompositeFrame * fMain
container frame
void Layout() override
Make a tile layout of all frames in the list.
Bool_t fModified
layout changed
void SavePrimitive(std::ostream &out, Option_t *="") override
Save tile layout manager as a C++ statement(s) on output stream.
TGTileLayout(const TGTileLayout &)=delete
void Layout() override
Make a vertical layout of all frames in the list.
TGVerticalLayout(const TGVerticalLayout &gvl)
void SavePrimitive(std::ostream &out, Option_t *="") override
Save vertical layout manager as a C++ statement(s) on output stream.
TGDimension GetDefaultSize() const override
Return default dimension of the vertical layout.
const char * GetName() const override
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)
Returns the largest of a and b.