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