29 ClassImp(TEveLineEditor);
34 TEveLineEditor::TEveLineEditor(
const TGWindow *p, Int_t width, Int_t height,
35 UInt_t options, Pixel_t back) :
36 TGedFrame (p, width, height, options | kVerticalFrame, back),
44 TGHorizontalFrame* f =
new TGHorizontalFrame(
this);
46 fRnrPoints =
new TGCheckButton(f,
"Draw Marker");
47 f->AddFrame(fRnrPoints,
new TGLayoutHints(kLHintsLeft, 2,1,0,0));
48 fRnrPoints->Connect(
"Toggled(Bool_t)",
"TEveLineEditor",
this,
"DoRnrPoints()");
50 fRnrLine =
new TGCheckButton(f,
"Draw Line");
51 f->AddFrame(fRnrLine,
new TGLayoutHints(kLHintsLeft, 1,2,0,0));
52 fRnrLine->Connect(
"Toggled(Bool_t)",
"TEveLineEditor",
this,
"DoRnrLine()");
54 AddFrame(f,
new TGLayoutHints(kLHintsTop, 0,0,2,1));
56 fSmooth =
new TGCheckButton(
this,
"Smooth line");
57 AddFrame(fSmooth,
new TGLayoutHints(kLHintsNormal, 2,1,2,1));
58 fSmooth->Connect(
"Toggled(Bool_t)",
"TEveLineEditor",
this,
"DoSmooth()");
64 void TEveLineEditor::SetModel(TObject* obj)
66 fM =
dynamic_cast<TEveLine*
>(obj);
68 fRnrLine ->SetState(fM->fRnrLine ? kButtonDown : kButtonUp);
69 fRnrPoints->SetState(fM->fRnrPoints ? kButtonDown : kButtonUp);
70 fSmooth->SetState(fM->fSmooth ? kButtonDown : kButtonUp);
76 void TEveLineEditor::DoRnrLine()
78 fM->SetRnrLine(fRnrLine->IsOn());
85 void TEveLineEditor::DoRnrPoints()
87 fM->SetRnrPoints(fRnrPoints->IsOn());
94 void TEveLineEditor::DoSmooth()
96 fM->SetSmooth(fSmooth->IsOn());