3 #include "LineEditor.h"
6 #include <TVirtualPad.h>
11 #include <TGNumberEntry.h>
12 #include <TGColorSelect.h>
13 #include <TGDoubleSlider.h>
17 //______________________________________________________________________
23 LineEditor::LineEditor(const TGWindow *p, Int_t width, Int_t height,
24 UInt_t options, Pixel_t back) :
25 TGedFrame(p, width, height, options | kVerticalFrame, back),
33 TGHorizontalFrame* f = new TGHorizontalFrame(this);
35 fRnrLine = new TGCheckButton(f, "Draw Line");
36 f->AddFrame(fRnrLine, new TGLayoutHints(kLHintsLeft, 1,2,0,0));
37 fRnrLine->Connect("Toggled(Bool_t)", "Reve::LineEditor", this, "DoRnrLine()");
38 fRnrPoints = new TGCheckButton(f, "Draw Marker");
39 f->AddFrame(fRnrPoints, new TGLayoutHints(kLHintsLeft, 2,1,0,0));
40 fRnrPoints->Connect("Toggled(Bool_t)"," Reve::LineEditor", this, "DoRnrPoints()");
42 AddFrame(f, new TGLayoutHints(kLHintsTop, 0,0,2,1));
46 LineEditor::~LineEditor()
49 /**************************************************************************/
51 void LineEditor::SetModel(TObject* obj)
53 fM = dynamic_cast<Line*>(obj);
55 fRnrLine ->SetState(fM->fRnrLine ? kButtonDown : kButtonUp);
56 fRnrPoints->SetState(fM->fRnrPoints ? kButtonDown : kButtonUp);
59 /**************************************************************************/
61 void LineEditor::DoRnrLine()
63 fM->SetRnrLine(fRnrLine->IsOn());
67 void LineEditor::DoRnrPoints()
69 fM->SetRnrPoints(fRnrPoints->IsOn());