Logo ROOT  
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
10TGPack *hp = 0;
11TGPack *vp = 0;
12
13TGTextButton *b = 0;
14
15void 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");
24 hp->AddFrame(b);
25
26 vp = new TGPack(hp, hp->GetWidth(), hp->GetHeight());
27 b = new TGTextButton(vp, "Blaaaaa");
28 vp->AddFrameWithWeight(b, 0, 5);
29 b = new TGTextButton(vp, "Blooooo");
30 vp->AddFrameWithWeight(b, 0, 3);
31 b = new TGTextButton(vp, "Bleeeee");
32 vp->AddFrameWithWeight(b, 0, 5);
34
35 b = new TGTextButton(hp, "Cilnouk");
36 hp->AddFrame(b);
37
39
40 mf->Layout();
41 mf->MapSubwindows();
42 mf->MapWindow();
43}
#define b(i)
Definition RSha256.hxx:100
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsExpandX
Definition TGLayout.h:30
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:399
Stack of frames in horizontal (default) or vertical stack.
Definition TGPack.h:40
Yield an action as soon as it is clicked.
Definition TGButton.h:142