#include <FW3DViewDistanceMeasureTool.h>
FW3DViewDistanceMeasureTool::FW3DViewDistanceMeasureTool |
( |
| ) |
|
virtual FW3DViewDistanceMeasureTool::~FW3DViewDistanceMeasureTool |
( |
| ) |
|
|
inlinevirtual |
TGCompositeFrame * FW3DViewDistanceMeasureTool::buildGUI |
( |
TGCompositeFrame * |
p | ) |
|
Definition at line 79 of file FW3DViewDistanceMeasureTool.cc.
References b, m_bp1, m_bp2, m_ldist, m_lp1, m_lp2, m_pnt1, and m_pnt2.
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));
void FW3DViewDistanceMeasureTool::Print |
( |
void |
| ) |
const |
TGLVector3 & FW3DViewDistanceMeasureTool::refCurrentVertex |
( |
| ) |
|
void FW3DViewDistanceMeasureTool::resetAction |
( |
| ) |
|
Definition at line 26 of file FW3DViewDistanceMeasureTool.cc.
References ztail::d, kNone, m_action, m_bp1, m_bp2, m_ldist, m_lp1, m_lp2, m_pnt1, m_pnt2, and AlCaHLTBitMon_ParallelJobs::p.
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());
void FW3DViewDistanceMeasureTool::setActionPnt1 |
( |
| ) |
|
void FW3DViewDistanceMeasureTool::setActionPnt2 |
( |
| ) |
|
TGTextButton* FW3DViewDistanceMeasureTool::m_bp1 |
|
private |
TGTextButton* FW3DViewDistanceMeasureTool::m_bp2 |
|
private |
TGLabel* FW3DViewDistanceMeasureTool::m_ldist |
|
private |
TGLabel* FW3DViewDistanceMeasureTool::m_lp1 |
|
private |
TGLabel* FW3DViewDistanceMeasureTool::m_lp2 |
|
private |
TGLVector3 FW3DViewDistanceMeasureTool::m_pnt1 |
|
protected |
TGLVector3 FW3DViewDistanceMeasureTool::m_pnt2 |
|
protected |