#include "TEvePolygonSetProjectedEditor.h"
#include "TEvePolygonSetProjected.h"
#include "TColor.h"
#include "TGLabel.h"
#include "TGNumberEntry.h"
#include "TGColorSelect.h"
#include "TGColorDialog.h"
ClassImp(TEvePolygonSetProjectedEditor)
TEvePolygonSetProjectedEditor::TEvePolygonSetProjectedEditor(const TGWindow *p,
                                                             Int_t width, Int_t height,
                                                             UInt_t options, Pixel_t back) :
   TGedFrame(p, width, height, options | kVerticalFrame, back),
   fPS(0),
   fLineWidth(0),
   fLineColor(0)
{
   
   MakeTitle("TEvePolygonSetProjected");
   {
      TGCompositeFrame *f = new TGCompositeFrame(this, 80, 20, kHorizontalFrame);
      TGLabel *l = new TGLabel(f, "LineColor:");
      f->AddFrame(l, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 25, 2, 1, 1));
      fLineColor = new TGColorSelect(f, 0, -1);
      fLineColor->Connect("ColorSelected(Pixel_t)", "TEvePolygonSetProjectedEditor", this, "DoLineColor(Pixel_t)");
      f->AddFrame(fLineColor, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
      fLineWidth = new TGNumberEntry(f, 0., 6, -1,
                                     TGNumberFormat::kNESRealOne, TGNumberFormat::kNEAPositive,
                                     TGNumberFormat::kNELLimitMinMax, 0.1, 2000.0);
      fLineWidth->GetNumberEntry()->SetToolTipText("TEveLine witdth of outline.");
      fLineWidth->Connect("ValueSet(Long_t)", "TEvePolygonSetProjectedEditor", this, "DoLineWidth()");
      f->AddFrame(fLineWidth, new TGLayoutHints(kLHintsLeft, 1, 1, 1, 1));
      AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 0, 0));
   }
}
void TEvePolygonSetProjectedEditor::SetModel(TObject* obj)
{
   
   fPS = dynamic_cast<TEvePolygonSetProjected*>(obj);
   fLineWidth->SetNumber(fPS->fLineWidth);
   fLineColor->SetColor(TColor::Number2Pixel(fPS->GetLineColor()), kFALSE);
}
void TEvePolygonSetProjectedEditor::DoLineWidth()
{
   
   fPS->fLineWidth = fLineWidth->GetNumber();
   Update();
}
void TEvePolygonSetProjectedEditor::DoLineColor(Pixel_t pixel)
{
   
   fPS->SetLineColor(pixel);
   Update();
}
Last update: Thu Jan 17 08:49:02 2008
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.