3 #include "StraightLineSetEditor.h"
4 #include <Reve/StraightLineSet.h>
6 #include <TVirtualPad.h>
11 #include <TGNumberEntry.h>
12 #include <TGColorSelect.h>
13 #include <TGDoubleSlider.h>
17 //______________________________________________________________________
18 // StraightLineSetEditor
21 ClassImp(StraightLineSetEditor)
23 StraightLineSetEditor::StraightLineSetEditor(const TGWindow *p, Int_t width, Int_t height,
24 UInt_t options, Pixel_t back) :
25 TGedFrame(p, width, height, options | kVerticalFrame, back),
27 // Initialize widget pointers to 0
29 MakeTitle("StraightLineSet");
31 TGHorizontalFrame* frame = new TGHorizontalFrame(this);
33 fRnrMarkers = new TGCheckButton(frame, "RnrMarkers");
34 frame->AddFrame(fRnrMarkers, new TGLayoutHints(kLHintsLeft, 1, 2, 1, 1));
37 "Reve::StraightLineSetEditor", this, "DoRnrMarkers()");
39 fRnrLines = new TGCheckButton(frame, "RnrLines");
40 frame->AddFrame(fRnrLines, new TGLayoutHints(kLHintsLeft, 2, 1, 1, 1));
43 "Reve::StraightLineSetEditor", this, "DoRnrLines()");
45 AddFrame(frame, new TGLayoutHints(kLHintsTop, 0, 0, 0, 0));
48 StraightLineSetEditor::~StraightLineSetEditor()
51 /**************************************************************************/
53 void StraightLineSetEditor::SetModel(TObject* obj)
55 fM = dynamic_cast<StraightLineSet*>(obj);
57 // Set values of widgets
58 fRnrMarkers->SetState(fM->fRnrMarkers ? kButtonDown : kButtonUp);
59 fRnrLines->SetState(fM->fRnrLines ? kButtonDown : kButtonUp);
62 /**************************************************************************/
64 // Implements callback/slot methods
66 void StraightLineSetEditor::DoRnrMarkers()
68 fM->fRnrMarkers = fRnrMarkers->IsOn();
72 void StraightLineSetEditor::DoRnrLines()
74 fM->fRnrLines = fRnrLines->IsOn();