#include "Riostream.h"
#include "TROOT.h"
#include "Buttons.h"
#include "TPaveClass.h"
ClassImp(TPaveClass)
TPaveClass::TPaveClass(): TPaveLabel()
{
fClassTree = 0;
}
TPaveClass::TPaveClass(Double_t x1, Double_t y1,Double_t x2, Double_t y2, const char *label, TClassTree *classtree)
:TPaveLabel(x1,y1,x2,y2,label,"br")
{
fClassTree = classtree;
SetName(label);
SetTextFont(61);
}
TPaveClass::~TPaveClass()
{
}
TPaveClass::TPaveClass(const TPaveClass &PaveClass) : TPaveLabel(PaveClass)
{
((TPaveClass&)PaveClass).Copy(*this);
}
void TPaveClass::Copy(TObject &obj) const
{
TPaveLabel::Copy(obj);
((TPaveClass&)obj).fClassTree = fClassTree;
}
void TPaveClass::DrawClasses(const char *classes)
{
if (!fClassTree) return;
if (!strcmp(classes,"this")) fClassTree->Draw(GetName());
else fClassTree->Draw(classes);
}
void TPaveClass::SaveAs(const char *filename, Option_t *option) const
{
if (!fClassTree) return;
fClassTree->SaveAs(filename,option);
}
void TPaveClass::SetClasses(const char *classes, Option_t *option)
{
if (!fClassTree) return;
if (!strcmp(classes,"this")) fClassTree->SetClasses(GetName(),option);
else fClassTree->SetClasses(classes,option);
}
void TPaveClass::ShowLinks(Option_t *option)
{
if (!fClassTree) return;
fClassTree->ShowLinks(option);
}
void TPaveClass::ShowClassesUsedBy(const char *classes)
{
if (!fClassTree) return;
if (!strcmp(classes,"this")) fClassTree->ShowClassesUsedBy(GetName());
else fClassTree->ShowClassesUsedBy(classes);
}
void TPaveClass::ShowClassesUsing(const char *classes)
{
if (!fClassTree) return;
if (!strcmp(classes,"this")) fClassTree->ShowClassesUsing(GetName());
else fClassTree->ShowClassesUsing(classes);
}
void TPaveClass::SavePrimitive(ostream &out, Option_t * )
{
char quote = '"';
out<<" "<<endl;
if (gROOT->ClassSaved(TPaveClass::Class())) {
out<<" ";
} else {
out<<" TPaveClass *";
}
out<<"pclass = new TPaveClass("<<fX1<<","<<fY1<<","<<fX2<<","<<fY2
<<","<<quote<<fLabel<<quote<<","<<quote<<fOption<<quote<<");"<<endl;
SaveFillAttributes(out,"pclass",0,1001);
SaveLineAttributes(out,"pclass",1,1,1);
SaveTextAttributes(out,"pclass",22,0,1,62,0);
out<<" pclass->Draw();"<<endl;
}
Last change: Wed Jun 25 08:50:31 2008
Last generated: 2008-06-25 08:50
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.