23 ClassImp(TEveArrowEditor);
27 TEveArrowEditor::TEveArrowEditor(
const TGWindow *p, Int_t width, Int_t height,
28 UInt_t options, Pixel_t back) :
29 TGedFrame(p, width, height, options | kVerticalFrame, back),
41 MakeTitle(
"TEveArrow");
44 fTubeR =
new TEveGValuator(
this,
"TubeR:", 90, 0);
45 fTubeR->SetLabelWidth(labelW);
46 fTubeR->SetNELength(6);
48 fTubeR->SetLimits(0.001, 1, 101, TGNumberFormat::kNESRealThree);
49 fTubeR->Connect(
"ValueSet(Double_t)",
"TEveArrowEditor",
this,
"DoTubeR()");
50 AddFrame(fTubeR,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
52 fConeR =
new TEveGValuator(
this,
"ConeR:", 90, 0);
53 fConeR->SetLabelWidth(labelW);
54 fConeR->SetNELength(6);
56 fConeR->SetLimits(0.001, 1, 101, TGNumberFormat::kNESRealThree);
57 fConeR->Connect(
"ValueSet(Double_t)",
"TEveArrowEditor",
this,
"DoConeR()");
58 AddFrame(fConeR,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
60 fConeL =
new TEveGValuator(
this,
"ConeL:", 90, 0);
61 fConeL->SetLabelWidth(labelW);
62 fConeL->SetNELength(6);
64 fConeL->SetLimits(0.001, 1, 101, TGNumberFormat::kNESRealThree);
65 fConeL->Connect(
"ValueSet(Double_t)",
"TEveArrowEditor",
this,
"DoConeL()");
66 AddFrame(fConeL,
new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
68 TGFont *font = gClient->GetFont(
"-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1");
70 TGHorizontalFrame* hfp =
new TGHorizontalFrame(
this);
71 TGLabel* labp =
new TGLabel(hfp,
"Origin");
72 labp->SetTextFont(font);
74 AddFrame(hfp,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,0,2,0));
75 fOrigin =
new TEveGTriVecValuator(
this,
"Origin", 160, 20);
76 fOrigin->SetNELength(6);
77 fOrigin->Build(kFALSE,
"",
"",
"");
78 fOrigin->SetLimits(-1e5, 1e5, TGNumberFormat::kNESRealThree);
79 AddFrame(fOrigin,
new TGLayoutHints(kLHintsTop , 0,0,0,0));
83 TGHorizontalFrame* hfp =
new TGHorizontalFrame(
this);
84 TGLabel* labp =
new TGLabel(hfp,
"Vector");
85 labp->SetTextFont(font);
87 AddFrame(hfp,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,0,2,0));
88 fVector =
new TEveGTriVecValuator(
this,
"Vector", 160, 20);
89 fVector->SetNELength(6);
90 fVector->Build(kFALSE,
"",
"",
"");
91 fVector->SetLimits(-1e5, 1e5, TGNumberFormat::kNESRealThree);
92 AddFrame(fVector,
new TGLayoutHints(kLHintsTop , 0,0,0,0));
95 fVector->Connect(
"ValueSet()",
"TEveArrowEditor",
this,
"DoVertex()");
96 fOrigin->Connect(
"ValueSet()",
"TEveArrowEditor",
this,
"DoVertex()");
102 void TEveArrowEditor::SetModel(TObject* obj)
104 fM =
dynamic_cast<TEveArrow*
>(obj);
106 fTubeR->SetValue(fM->fTubeR);
107 fTubeR->SetValue(fM->fTubeR);
108 fConeL->SetValue(fM->fConeL);
110 fOrigin->SetValues(&fM->fOrigin[0]);
111 fVector->SetValues(&fM->fVector[0]);
117 void TEveArrowEditor::DoTubeR()
119 fM->SetTubeR(fTubeR->GetValue());
126 void TEveArrowEditor::DoConeR()
128 fM->SetConeR(fConeR->GetValue());
135 void TEveArrowEditor::DoConeL()
137 fM->SetConeL(fConeL->GetValue());
144 void TEveArrowEditor::DoVertex()
147 fOrigin->GetValues(v);
149 fVector->GetValues(v);