8 const char * lbpformat=
"(%.2f, %.2f, %.2f)";
19 printf(
"==============================================\n");
23 printf(
"Distance:\n%f \n", a.Mag());
30 m_bp1->SetState(kButtonUp);
33 m_bp2->SetState(kButtonUp);
37 m_ldist->SetText(Form(
"%.2f", d.Mag()));
40 TGCompositeFrame*
p = (TGCompositeFrame*)(
m_ldist->GetParent());
41 p->Resize(p->GetDefaultSize());
44 TGCompositeFrame*
p = (TGCompositeFrame*)(
m_ldist->GetParent()->GetParent());
53 m_bp1->SetState(kButtonEngaged);
54 m_bp2->SetState(kButtonUp);
61 m_bp2->SetState(kButtonEngaged);
62 m_bp1->SetState(kButtonUp);
69 printf(
"ERROR refCurrentVertex m_action == kNone \n");
81 TGVerticalFrame* vf =
new TGVerticalFrame(p);
84 TGHorizontalFrame*
hf =
new TGHorizontalFrame(vf);
85 TGLabel* lb =
new TGLabel(hf,
"Distance: ");
87 m_ldist =
new TGLabel(hf,
" --- ");
92 TGHorizontalFrame*
hf =
new TGHorizontalFrame(vf);
94 m_bp1 =
new TGTextButton(hf,
"Pick Point1");
95 m_bp1->Connect(
"Clicked()",
"FW3DViewDistanceMeasureTool",
this,
"setActionPnt1()");
96 m_bp1->SetToolTipText(
"Click on the butto to pick the first point in viewer.");
97 hf->AddFrame(
m_bp1,
new TGLayoutHints(kLHintsNormal, 0, 5, 4, 4));
100 hf->AddFrame(
m_lp1,
new TGLayoutHints(kLHintsNormal, 0, 1, 4, 4));
106 TGHorizontalFrame*
hf =
new TGHorizontalFrame(vf);
108 m_bp2 =
new TGTextButton(hf,
"Pick Point2");
109 m_bp2->Connect(
"Clicked()",
"FW3DViewDistanceMeasureTool",
this,
"setActionPnt2()");
110 m_bp2->SetToolTipText(
"Click on the butto to pick the secoond point in viewer.");
111 hf->AddFrame(
m_bp2,
new TGLayoutHints(kLHintsExpandX, 0, 5, 4, 4));
114 hf->AddFrame(
m_lp2,
new TGLayoutHints(kLHintsNormal, 0, 1, 4, 4));
120 TGHorizontalFrame*
hf =
new TGHorizontalFrame(vf);
121 TGTextButton*
b =
new TGTextButton(hf,
"Print distance to terminal");
122 b->Connect(
"Clicked()",
"FW3DViewDistanceMeasureTool",
this,
"Print()");
123 hf->AddFrame(b,
new TGLayoutHints(kLHintsNormal, 0, 5, 4, 4));