TEveTriangleSetEditor.cxx

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveTriangleSetEditor.cxx 26034 2008-10-31 14:01:05Z matevz $
00002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #include "TEveTriangleSetEditor.h"
00013 #include "TEveTriangleSet.h"
00014 
00015 #include "TGWidget.h"
00016 #include "TGLabel.h"
00017 
00018 //______________________________________________________________________________
00019 //
00020 // Editor for TEveTriangleSet class.
00021 
00022 ClassImp(TEveTriangleSetEditor);
00023 
00024 //______________________________________________________________________________
00025 TEveTriangleSetEditor::TEveTriangleSetEditor(const TGWindow *p, Int_t width, Int_t height,
00026                                              UInt_t options, Pixel_t back) :
00027    TGedFrame(p, width, height, options | kVerticalFrame, back),
00028    fM    (0),
00029    fInfo (0)
00030 {
00031    // Constructor.
00032 
00033    MakeTitle("TEveTriangleSet");
00034 
00035    fInfo = new TGLabel(this);
00036    fInfo->SetTextJustify(kTextLeft);
00037    AddFrame(fInfo, new TGLayoutHints(kLHintsNormal|kLHintsExpandX, 8, 0, 2, 0));
00038 }
00039 
00040 /******************************************************************************/
00041 
00042 //______________________________________________________________________________
00043 void TEveTriangleSetEditor::SetModel(TObject* obj)
00044 {
00045    // Set model object.
00046 
00047    fM = dynamic_cast<TEveTriangleSet*>(obj);
00048 
00049    fInfo->SetText(Form("Vertices: %d, Triangles: %d", fM->GetNVerts(), fM->GetNTrings()));
00050 }

Generated on Tue Jul 5 14:16:15 2011 for ROOT_528-00b_version by  doxygen 1.5.1