ROOT logo
// @(#)root/gpad:$Id: TClassTree.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   01/12/98

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

#ifndef ROOT_TClassTree
#define ROOT_TClassTree


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TClassTree                                                           //
//                                                                      //
// Manager class to draw classes inheritance tree and relations         //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TTnamed
#include "TNamed.h"
#endif

class TClass;
class TObjString;

class TClassTree : public TNamed {

protected:
   TString   fClasses;    //List of classes to be drawn
   Float_t   fYoffset;    //offset at top of picture in per cent of pad
   Float_t   fLabelDx;    //width along x of TPaveLabels in per cent of pad
   Int_t     fNclasses;   //current number of classes
   Int_t     fShowCod;    //if 1 show classes referenced by implementation
   Int_t     fShowMul;    //if 1 show multiple inheritance
   Int_t     fShowHas;    //if 1 show "has a" relationship
   Int_t     fShowRef;    //if 1 show classes relationship other than inheritance
   Int_t    *fCstatus;    //[fNclasses] classes status
   Int_t    *fNdata;      //[fNclasses] Number of data members per class
   Int_t    *fParents;    //[fNclasses] parent number of classes (permanent)
   Int_t    *fCparent;    //!parent number of classes (temporary)
   char    **fDerived;    //![fNclasses] table to indicate if i derives from j
   TClass  **fCpointer;   //![fNclasses] pointers to the TClass objects
   TString **fCnames;     //![fNclasses] class names
   TString **fCtitles;    //![fNclasses] class titles
   TString **fOptions;    //![fNclasses] List of options per class
   TString   fSourceDir;  //Concatenated source directories
   TList   **fLinks;      //![fNclasses] for each class, the list of referenced(ing) classes

   virtual  void FindClassPosition(const char *classname, Float_t &x, Float_t &y);
   virtual  void FindClassesUsedBy(Int_t iclass);
   virtual  void FindClassesUsing(Int_t iclass);
   virtual  void Init();
   TObjString   *Mark(const char *classname, TList *los, Int_t abit);
   virtual  void PaintClass(Int_t iclass, Float_t xleft, Float_t y);
   virtual  void ScanClasses(Int_t iclass);
   virtual  void ShowCod();
   virtual  void ShowHas();
   virtual  void ShowMul();
   virtual  void ShowRef();

public:
   TClassTree();
   TClassTree(const char *name, const char *classes="");
   virtual      ~TClassTree();
   virtual  void Draw(const char *classes ="");
   virtual Int_t FindClass(const char *classname);
   const char   *GetClasses() const {return fClasses.Data();}
   virtual const char  *GetSourceDir() const {return fSourceDir.Data();}
   virtual  void ls(Option_t *option="") const;
   virtual  void Paint(Option_t *option="");
   virtual  void SaveAs(const char *filename="",Option_t *option="") const;
   virtual  void SetClasses(const char *classes, Option_t *option="ID");
   virtual  void SetSourceDir(const char *dir="src") {fSourceDir = dir;}
   virtual  void SetYoffset(Float_t offset=0);
   virtual  void SetLabelDx(Float_t labeldx=0.15);
   virtual  void ShowClassesUsedBy(const char *classes);
   virtual  void ShowClassesUsing(const char *classes);
   virtual  void ShowLinks(Option_t *option="HMR");

   ClassDef(TClassTree,1)  //Manager class to draw classes inheritance tree and relations
};

#endif

 TClassTree.h:1
 TClassTree.h:2
 TClassTree.h:3
 TClassTree.h:4
 TClassTree.h:5
 TClassTree.h:6
 TClassTree.h:7
 TClassTree.h:8
 TClassTree.h:9
 TClassTree.h:10
 TClassTree.h:11
 TClassTree.h:12
 TClassTree.h:13
 TClassTree.h:14
 TClassTree.h:15
 TClassTree.h:16
 TClassTree.h:17
 TClassTree.h:18
 TClassTree.h:19
 TClassTree.h:20
 TClassTree.h:21
 TClassTree.h:22
 TClassTree.h:23
 TClassTree.h:24
 TClassTree.h:25
 TClassTree.h:26
 TClassTree.h:27
 TClassTree.h:28
 TClassTree.h:29
 TClassTree.h:30
 TClassTree.h:31
 TClassTree.h:32
 TClassTree.h:33
 TClassTree.h:34
 TClassTree.h:35
 TClassTree.h:36
 TClassTree.h:37
 TClassTree.h:38
 TClassTree.h:39
 TClassTree.h:40
 TClassTree.h:41
 TClassTree.h:42
 TClassTree.h:43
 TClassTree.h:44
 TClassTree.h:45
 TClassTree.h:46
 TClassTree.h:47
 TClassTree.h:48
 TClassTree.h:49
 TClassTree.h:50
 TClassTree.h:51
 TClassTree.h:52
 TClassTree.h:53
 TClassTree.h:54
 TClassTree.h:55
 TClassTree.h:56
 TClassTree.h:57
 TClassTree.h:58
 TClassTree.h:59
 TClassTree.h:60
 TClassTree.h:61
 TClassTree.h:62
 TClassTree.h:63
 TClassTree.h:64
 TClassTree.h:65
 TClassTree.h:66
 TClassTree.h:67
 TClassTree.h:68
 TClassTree.h:69
 TClassTree.h:70
 TClassTree.h:71
 TClassTree.h:72
 TClassTree.h:73
 TClassTree.h:74
 TClassTree.h:75
 TClassTree.h:76
 TClassTree.h:77
 TClassTree.h:78
 TClassTree.h:79
 TClassTree.h:80
 TClassTree.h:81
 TClassTree.h:82
 TClassTree.h:83
 TClassTree.h:84
 TClassTree.h:85
 TClassTree.h:86
 TClassTree.h:87
 TClassTree.h:88
 TClassTree.h:89