82 std::cout << std::endl;
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) {
983 if ((option == 0) || strcmp(option,
"nocoma"))
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
The following layout manager do not make use of TGLayoutHints.
virtual TGDimension GetDefaultSize() const
Return default dimension of the column layout.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save column layout manager as a C++ statement(s) on output stream.
virtual void Layout()
Make a column layout of all frames in the list.
The base class for composite widgets (menu bars, list boxes, etc.).
virtual TList * GetList() const
void Print(Option_t *option="") const
Print this frame element.
~TGFrameElement()
Destructor. Decrease ref. count of fLayout.
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;
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 horizontal layout manager as a C++ statement(s) on output stream.
This class describes layout hints used by the layout classes.
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 layout hints 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.
This is a layout manager for the TGListView widget.
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 list details layout manager as a C++ statement(s) on out stream.
This is a layout manager for the TGListView widget.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save list layout manager as a C++ statement(s) on output stream.
virtual void Layout()
Make a tile layout of all frames in the list.
virtual TGDimension GetDefaultSize() const
Return default dimension of the list layout.
This layout managers does not make use of TGLayoutHints.
UInt_t fRows
number of rows
Int_t fHints
layout hints (currently not used)
virtual TGDimension GetDefaultSize() const
Return default dimension of the matrix layout.
TGCompositeFrame * fMain
container frame
Int_t fSep
interval between frames
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save matrix layout manager as a C++ statement(s) on output stream.
UInt_t fColumns
number of columns
virtual void Layout()
Make a matrix layout of all frames in the list.
TGMatrixLayout(const TGMatrixLayout &)
TList * fList
list of frames to arrange
The following two layout managers do not make use of TGLayoutHints.
virtual void Layout()
Make a row layout of all frames in the list.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save row layout manager as a C++ statement(s) on output stream.
virtual TGDimension GetDefaultSize() const
Return default dimension of the row layout.
This is a layout manager for the TGListView widget.
virtual TGDimension GetDefaultSize() const
Return default dimension of the tile layout.
TGTileLayout(const TGTileLayout &)
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save tile layout manager as a C++ statement(s) on output stream.
TList * fList
list of frames to arrange
Int_t fSep
separation between tiles
TGCompositeFrame * fMain
container frame
virtual void Layout()
Make a tile layout of all frames in the list.
Bool_t fModified
layout changed
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 vertical layout manager as a C++ statement(s) on output stream.
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)