8 const char* lbpformat =
"(%.2f, %.2f, %.2f)";
12 : m_action(
kNone), m_bp1(nullptr), m_bp2(nullptr), m_lp1(nullptr), m_lp2(nullptr), m_ldist(nullptr) {}
15 printf(
"==============================================\n");
19 printf(
"Distance:\n%f \n", a.Mag());
25 m_bp1->SetState(kButtonUp);
28 m_bp2->SetState(kButtonUp);
32 m_ldist->SetText(Form(
"%.2f", d.Mag()));
35 TGCompositeFrame*
p = (TGCompositeFrame*)(
m_ldist->GetParent());
36 p->Resize(p->GetDefaultSize());
39 TGCompositeFrame*
p = (TGCompositeFrame*)(
m_ldist->GetParent()->GetParent());
47 m_bp1->SetState(kButtonEngaged);
48 m_bp2->SetState(kButtonUp);
54 m_bp2->SetState(kButtonEngaged);
55 m_bp1->SetState(kButtonUp);
61 printf(
"ERROR refCurrentVertex m_action == kNone \n");
71 TGVerticalFrame* vf =
new TGVerticalFrame(p);
74 TGHorizontalFrame* hf =
new TGHorizontalFrame(vf);
75 TGLabel* lb =
new TGLabel(hf,
"Distance: ");
77 m_ldist =
new TGLabel(hf,
" --- ");
82 TGHorizontalFrame* hf =
new TGHorizontalFrame(vf);
84 m_bp1 =
new TGTextButton(hf,
"Pick Point1");
85 m_bp1->Connect(
"Clicked()",
"FW3DViewDistanceMeasureTool",
this,
"setActionPnt1()");
86 m_bp1->SetToolTipText(
"Click on the butto to pick the first point in viewer.");
87 hf->AddFrame(
m_bp1,
new TGLayoutHints(kLHintsNormal, 0, 5, 4, 4));
90 hf->AddFrame(
m_lp1,
new TGLayoutHints(kLHintsNormal, 0, 1, 4, 4));
96 TGHorizontalFrame* hf =
new TGHorizontalFrame(vf);
98 m_bp2 =
new TGTextButton(hf,
"Pick Point2");
99 m_bp2->Connect(
"Clicked()",
"FW3DViewDistanceMeasureTool",
this,
"setActionPnt2()");
100 m_bp2->SetToolTipText(
"Click on the butto to pick the secoond point in viewer.");
101 hf->AddFrame(
m_bp2,
new TGLayoutHints(kLHintsExpandX, 0, 5, 4, 4));
104 hf->AddFrame(
m_lp2,
new TGLayoutHints(kLHintsNormal, 0, 1, 4, 4));
110 TGHorizontalFrame* hf =
new TGHorizontalFrame(vf);
111 TGTextButton*
b =
new TGTextButton(hf,
"Print distance to terminal");
112 b->Connect(
"Clicked()",
"FW3DViewDistanceMeasureTool",
this,
"Print()");
113 hf->AddFrame(b,
new TGLayoutHints(kLHintsNormal, 0, 5, 4, 4));
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)