// @(#)root/eve:$Id$
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TEveTriangleSetEditor.h"
#include "TEveTriangleSet.h"

#include "TGWidget.h"
#include "TGLabel.h"

//______________________________________________________________________________
//
// Editor for TEveTriangleSet class.

ClassImp(TEveTriangleSetEditor);

//______________________________________________________________________________
TEveTriangleSetEditor::TEveTriangleSetEditor(const TGWindow *p, Int_t width, Int_t height,
                                             UInt_t options, Pixel_t back) :
   TGedFrame(p, width, height, options | kVerticalFrame, back),
   fM    (0),
   fInfo (0)
{
   // Constructor.

   MakeTitle("TEveTriangleSet");

   fInfo = new TGLabel(this);
   fInfo->SetTextJustify(kTextLeft);
   AddFrame(fInfo, new TGLayoutHints(kLHintsNormal|kLHintsExpandX, 8, 0, 2, 0));
}

/******************************************************************************/

//______________________________________________________________________________
void TEveTriangleSetEditor::SetModel(TObject* obj)
{
   // Set model object.

   fM = dynamic_cast<TEveTriangleSet*>(obj);

   fInfo->SetText(Form("Vertices: %d, Triangles: %d", fM->GetNVerts(), fM->GetNTrings()));
}
 TEveTriangleSetEditor.cxx:1
 TEveTriangleSetEditor.cxx:2
 TEveTriangleSetEditor.cxx:3
 TEveTriangleSetEditor.cxx:4
 TEveTriangleSetEditor.cxx:5
 TEveTriangleSetEditor.cxx:6
 TEveTriangleSetEditor.cxx:7
 TEveTriangleSetEditor.cxx:8
 TEveTriangleSetEditor.cxx:9
 TEveTriangleSetEditor.cxx:10
 TEveTriangleSetEditor.cxx:11
 TEveTriangleSetEditor.cxx:12
 TEveTriangleSetEditor.cxx:13
 TEveTriangleSetEditor.cxx:14
 TEveTriangleSetEditor.cxx:15
 TEveTriangleSetEditor.cxx:16
 TEveTriangleSetEditor.cxx:17
 TEveTriangleSetEditor.cxx:18
 TEveTriangleSetEditor.cxx:19
 TEveTriangleSetEditor.cxx:20
 TEveTriangleSetEditor.cxx:21
 TEveTriangleSetEditor.cxx:22
 TEveTriangleSetEditor.cxx:23
 TEveTriangleSetEditor.cxx:24
 TEveTriangleSetEditor.cxx:25
 TEveTriangleSetEditor.cxx:26
 TEveTriangleSetEditor.cxx:27
 TEveTriangleSetEditor.cxx:28
 TEveTriangleSetEditor.cxx:29
 TEveTriangleSetEditor.cxx:30
 TEveTriangleSetEditor.cxx:31
 TEveTriangleSetEditor.cxx:32
 TEveTriangleSetEditor.cxx:33
 TEveTriangleSetEditor.cxx:34
 TEveTriangleSetEditor.cxx:35
 TEveTriangleSetEditor.cxx:36
 TEveTriangleSetEditor.cxx:37
 TEveTriangleSetEditor.cxx:38
 TEveTriangleSetEditor.cxx:39
 TEveTriangleSetEditor.cxx:40
 TEveTriangleSetEditor.cxx:41
 TEveTriangleSetEditor.cxx:42
 TEveTriangleSetEditor.cxx:43
 TEveTriangleSetEditor.cxx:44
 TEveTriangleSetEditor.cxx:45
 TEveTriangleSetEditor.cxx:46
 TEveTriangleSetEditor.cxx:47
 TEveTriangleSetEditor.cxx:48
 TEveTriangleSetEditor.cxx:49
 TEveTriangleSetEditor.cxx:50