CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  TGHorizontalFrame* makeHorizontalFrame(TGCompositeFrame* p) {
12  // Make standard horizontal frame.
13 
14  TGHorizontalFrame* f = new TGHorizontalFrame(p);
15  p->AddFrame(f, new TGLayoutHints(kLHintsNormal | kLHintsExpandX));
16  return f;
17  }
18 
19  TGLabel* makeLabel(TGCompositeFrame* p, const char* txt, int width, int lo, int ro, int to, int bo) {
20  // Make standard label.
21 
22  TGLabel* l = new TGLabel(p, txt);
23  p->AddFrame(l, new TGLayoutHints(kLHintsNormal, lo, ro, to, bo));
24  l->SetTextJustify(kTextRight);
25  l->SetWidth(width);
26  l->ChangeOptions(l->GetOptions() | kFixedWidth);
27  return l;
28  }
29 
30 } // namespace fireworks_root_gui
TGHorizontalFrame * makeHorizontalFrame(TGCompositeFrame *p=nullptr)
Definition: RootGuiUtils.cc:11
TGLabel * makeLabel(TGCompositeFrame *p, const char *txt, int width, int lo=0, int ro=0, int to=2, int bo=0)
Definition: RootGuiUtils.cc:19