00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "TEveTriangleSetEditor.h"
00013 #include "TEveTriangleSet.h"
00014
00015 #include "TGWidget.h"
00016 #include "TGLabel.h"
00017
00018
00019
00020
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
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
00046
00047 fM = dynamic_cast<TEveTriangleSet*>(obj);
00048
00049 fInfo->SetText(Form("Vertices: %d, Triangles: %d", fM->GetNVerts(), fM->GetNTrings()));
00050 }