ROOT
v6-32
Reference Guide
Loading...
Searching...
No Matches
pack.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_eve
3
/// Demonstrates usage of class TGPack.
4
///
5
/// \image html eve_pack.png
6
/// \macro_code
7
///
8
/// \author Matevz Tadel
9
10
TGPack
*
hp
= 0;
11
TGPack
*
vp
= 0;
12
13
TGTextButton
*
b
= 0;
14
15
void
pack
()
16
{
17
auto
mf
=
new
TGMainFrame
(0, 400, 300);
18
mf
->SetWindowName(
"Foo"
);
19
20
hp
=
new
TGPack
(
mf
,
mf
->GetWidth(),
mf
->GetHeight());
21
hp
->SetVertical(
kFALSE
);
22
23
b
=
new
TGTextButton
(
hp
,
"Ailaaha"
);
hp
->AddFrame(
b
);
24
25
vp
=
new
TGPack
(
hp
,
hp
->GetWidth(),
hp
->GetHeight());
26
b
=
new
TGTextButton
(
vp
,
"Blaaaaa"
);
vp
->AddFrameWithWeight(
b
, 0, 5);
27
b
=
new
TGTextButton
(
vp
,
"Blooooo"
);
vp
->AddFrameWithWeight(
b
, 0, 3);
28
b
=
new
TGTextButton
(
vp
,
"Bleeeee"
);
vp
->AddFrameWithWeight(
b
, 0, 5);
29
hp
->AddFrame(
vp
,
new
TGLayoutHints
(
kLHintsExpandX
|
kLHintsExpandY
));
30
31
b
=
new
TGTextButton
(
hp
,
"Cilnouk"
);
hp
->AddFrame(
b
);
32
33
mf
->AddFrame(
hp
,
new
TGLayoutHints
(
kLHintsExpandX
|
kLHintsExpandY
));
34
35
mf
->Layout();
36
mf
->MapSubwindows();
37
mf
->MapWindow();
38
}
b
#define b(i)
Definition
RSha256.hxx:100
kFALSE
constexpr Bool_t kFALSE
Definition
RtypesCore.h:101
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
tutorials
eve
pack.C
ROOT v6-32 - Reference Guide Generated on Mon Feb 17 2025 14:17:24 (GVA Time) using Doxygen 1.10.0