ROOT
v6-26
Reference Guide
Loading...
Searching...
No Matches
pack.C File Reference
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
const Bool_t kFALSE
Definition
RtypesCore.h:101
kLHintsExpandY
@ kLHintsExpandY
Definition
TGLayout.h:31
kLHintsExpandX
@ kLHintsExpandX
Definition
TGLayout.h:30
TGFrame::GetHeight
UInt_t GetHeight() const
Definition
TGFrame.h:225
TGFrame::GetWidth
UInt_t GetWidth() const
Definition
TGFrame.h:224
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:398
TGPack
Stack of frames in horizontal (default) or vertical stack.
Definition
TGPack.h:40
TGPack::AddFrameWithWeight
virtual void AddFrameWithWeight(TGFrame *f, TGLayoutHints *l, Float_t w)
Add frame f at the end with given weight.
Definition
TGPack.cxx:265
TGPack::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame f at the end with default weight.
Definition
TGPack.cxx:275
TGPack::SetVertical
void SetVertical(Bool_t x)
Sets the vertical flag and reformats the back to new stacking direction.
Definition
TGPack.cxx:569
TGTextButton
Yield an action as soon as it is clicked.
Definition
TGButton.h:142
Author
Matevz Tadel
Definition in file
pack.C
.
tutorials
eve
pack.C
ROOT v6-26 - Reference Guide Generated on Mon Sep 11 2023 21:03:20 (GVA Time) using Doxygen 1.9.8