ROOT
master
Reference Guide
Loading...
Searching...
No Matches
pack.C File Reference
Tutorials
»
Visualisation tutorials
»
Event display tutorials
Detailed Description
Demonstrates usage of class
TGPack
.
TGPack
*
hp
= 0;
TGPack
*
vp
= 0;
TGTextButton
*
b
= 0;
void
pack
()
{
auto
mf
=
new
TGMainFrame
(0, 400, 300);
mf
->SetWindowName(
"Foo"
);
hp
=
new
TGPack
(
mf
,
mf
->GetWidth(),
mf
->GetHeight());
hp
->SetVertical(
kFALSE
);
b
=
new
TGTextButton
(
hp
,
"Ailaaha"
);
hp
->AddFrame(
b
);
vp
=
new
TGPack
(
hp
,
hp
->GetWidth(),
hp
->GetHeight());
b
=
new
TGTextButton
(
vp
,
"Blaaaaa"
);
vp
->AddFrameWithWeight(
b
, 0, 5);
b
=
new
TGTextButton
(
vp
,
"Blooooo"
);
vp
->AddFrameWithWeight(
b
, 0, 3);
b
=
new
TGTextButton
(
vp
,
"Bleeeee"
);
vp
->AddFrameWithWeight(
b
, 0, 5);
hp
->AddFrame(
vp
,
new
TGLayoutHints
(
kLHintsExpandX
|
kLHintsExpandY
));
b
=
new
TGTextButton
(
hp
,
"Cilnouk"
);
hp
->AddFrame(
b
);
mf
->AddFrame(
hp
,
new
TGLayoutHints
(
kLHintsExpandX
|
kLHintsExpandY
));
mf
->Layout();
mf
->MapSubwindows();
mf
->MapWindow();
}
b
#define b(i)
Definition
RSha256.hxx:100
kFALSE
constexpr Bool_t kFALSE
Definition
RtypesCore.h:94
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
kLHintsExpandY
@ kLHintsExpandY
Definition
TGLayout.h:31
kLHintsExpandX
@ kLHintsExpandX
Definition
TGLayout.h:30
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TGLayoutHints
This class describes layout hints used by the layout classes.
Definition
TGLayout.h:50
TGMainFrame
Defines top level windows that interact with the system Window Manager.
Definition
TGFrame.h:397
TGPack
Stack of frames in horizontal (default) or vertical stack.
Definition
TGPack.h:40
TGTextButton
Yield an action as soon as it is clicked.
Definition
TGButton.h:142
Author
Matevz Tadel
Definition in file
pack.C
.
tutorials
visualisation
eve
pack.C
ROOT master - Reference Guide Generated on Wed Jan 29 2025 16:57:16 (GVA Time) using Doxygen 1.10.0