CMS 3D CMS Logo

RootGuiUtils.cc
Go to the documentation of this file.
1 // Author: Matevz Tadel 2011
2 
4 
5 #include "TGFrame.h"
6 #include "TGLabel.h"
7 #include "TGWidget.h"
8 
9 namespace fireworks_root_gui
10 {
11 
12 TGHorizontalFrame* makeHorizontalFrame(TGCompositeFrame* p)
13 {
14  // Make standard horizontal frame.
15 
16  TGHorizontalFrame* f = new TGHorizontalFrame(p);
17  p->AddFrame(f, new TGLayoutHints(kLHintsNormal|kLHintsExpandX));
18  return f;
19 }
20 
21 TGLabel* makeLabel(TGCompositeFrame* p, const char* txt, int width,
22  int lo, int ro, int to, int bo)
23 {
24  // Make standard label.
25 
26  TGLabel *l = new TGLabel(p, txt);
27  p->AddFrame(l, new TGLayoutHints(kLHintsNormal, lo,ro,to,bo));
28  l->SetTextJustify(kTextRight);
29  l->SetWidth(width);
30  l->ChangeOptions(l->GetOptions() | kFixedWidth);
31  return l;
32 }
33 
34 }
TGHorizontalFrame * makeHorizontalFrame(TGCompositeFrame *p=nullptr)
Definition: RootGuiUtils.cc:12
double f[11][100]
TGLabel * makeLabel(TGCompositeFrame *p, const char *txt, int width, int lo=0, int ro=0, int to=2, int bo=0)
Definition: RootGuiUtils.cc:21