12 #ifndef ROOT_TTreeViewer 
   13 #define ROOT_TTreeViewer 
   43 class TGDoubleVSlider;
 
   44 class TGPictureButton;
 
   54 class TTreeViewer : 
public TGMainFrame {
 
   56 friend class TGClient;
 
   57 friend class TGButton;
 
   65       kLTBranchType        = BIT(2),
 
   67       kLTActionType        = BIT(4),
 
   69       kLTExpressionType    = BIT(6),
 
   76    const char           *fFilename;             
 
   77    const char           *fSourceFile;           
 
   80    TBranch              *fMappedBranch;         
 
   84    TContextMenu         *fContextMenu;          
 
   85    TGSelectBox          *fDialogBox;            
 
   88    const TGPicture      *fPicX, *fPicY, *fPicZ; 
 
   89    const TGPicture      *fPicDraw, *fPicStop;   
 
   90    const TGPicture      *fPicRefr;              
 
   91    Cursor_t             fDefaultCursor;         
 
   92    Cursor_t             fWatchCursor;           
 
   99    TGLayoutHints        *fMenuBarLayout;
 
  100    TGLayoutHints        *fMenuBarItemLayout;
 
  101    TGLayoutHints        *fMenuBarHelpLayout;
 
  103    TGPopupMenu          *fFileMenu;
 
  104    TGPopupMenu          *fEditMenu;
 
  105    TGPopupMenu          *fRunMenu;
 
  106    TGPopupMenu          *fOptionsMenu;
 
  107    TGPopupMenu          *fOptionsGen;
 
  108    TGPopupMenu          *fOptions1D;
 
  109    TGPopupMenu          *fOptions2D;
 
  110    TGPopupMenu          *fHelpMenu;
 
  113    TGLayoutHints        *fBarLayout;
 
  118    TGCheckButton        *fBarH;         
 
  119    TGCheckButton        *fBarScan;      
 
  120    TGCheckButton        *fBarRec;       
 
  121    TGTextEntry          *fBarCommand;   
 
  122    TGTextEntry          *fBarOption;    
 
  123    TGTextEntry          *fBarHist;      
 
  125    TGHorizontalFrame    *fHf;           
 
  126    TGDoubleVSlider      *fSlider;       
 
  127    TGVerticalFrame      *fV1;           
 
  128    TGVerticalFrame      *fV2;           
 
  129    TGCompositeFrame     *fTreeHdr;      
 
  130    TGCompositeFrame     *fListHdr;      
 
  133    TGHorizontalFrame    *fBFrame;       
 
  134    TGHorizontalFrame    *fHpb;          
 
  135    TGHProgressBar       *fProgressBar;  
 
  138    TGTextEntry          *fBarListIn;    
 
  139    TGTextEntry          *fBarListOut;   
 
  140    TGPictureButton      *fDRAW;         
 
  141    TGTextButton         *fSPIDER;       
 
  142    TGPictureButton      *fSTOP;         
 
  143    TGPictureButton      *fREFR;         
 
  144    TGStatusBar          *fStatusBar;    
 
  146    TGPictureButton      *fBGFirst;
 
  147    TGPictureButton      *fBGPrevious;
 
  148    TGPictureButton      *fBGRecord;
 
  149    TGPictureButton      *fBGNext;
 
  150    TGPictureButton      *fBGLast;
 
  151    TGTextButton         *fReset;        
 
  156    TGListView           *fListView;     
 
  157    TTVLVContainer       *fLVContainer;  
 
  163    void          BuildInterface();
 
  166    const char   *EmptyBrackets(
const char* name);
 
  170    const char   *En(Int_t n);
 
  171    void          MapBranch(TBranch *branch, 
const char *prefix=
"", TGListTreeItem *parent = 0, Bool_t listIt = kTRUE);
 
  172    void          MapOptions(Long_t parm1);
 
  173    void          MapTree(TTree *tree, TGListTreeItem *parent = 0, Bool_t listIt = kTRUE);
 
  175    const char   *ScanList();
 
  176    void          SetParentTree(TGListTreeItem *item);
 
  177    void          DoError(
int level, 
const char *location, 
const char *fmt, va_list va) 
const;
 
  180    TTreeViewer(
const char* treeName = 0);
 
  181    TTreeViewer(
const TTree *tree);
 
  182    virtual       ~TTreeViewer();
 
  184    void          AppendTree(TTree *tree);
 
  185    void          ActivateButtons(Bool_t first, Bool_t previous,
 
  186                                  Bool_t next , Bool_t last);
 
  187    virtual void  CloseWindow();
 
  188    virtual void  Delete(Option_t *) { }                          
 
  190    void          EditExpression();
 
  193    void          ExecuteCommand(
const char* command, Bool_t fast = kFALSE); 
 
  195    void          ExecuteSpider();
 
  196    TTVLVEntry   *ExpressionItem(Int_t index);
 
  197    TList        *ExpressionList();
 
  198    const char   *GetGrOpt();
 
  199    TTree        *GetTree() {
return fTree;}
 
  200    Bool_t        HandleTimer(TTimer *timer);
 
  201    Bool_t        IsCutEnabled() {
return fEnableCut;}
 
  202    Bool_t        IsScanRedirected();
 
  203    Int_t         MakeSelector(
const char* selector = 0);         
 
  204    void          Message(
const char* msg);
 
  205    void          NewExpression();                                
 
  207    Long64_t      Process(
const char* filename, Option_t *option=
"", Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0); 
 
  208    Bool_t        ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
 
  210    void          RemoveLastRecord();                             
 
  211    void          SaveSource(
const char* filename=
"", Option_t *option=
"");            
 
  212    void          SetHistogramTitle(
const char *title);
 
  213    void          SetCutMode(Bool_t enabled = kTRUE) {fEnableCut = enabled;}
 
  214    void          SetCurrentRecord(Long64_t entry);
 
  215    void          SetGrOpt(
const char *option);
 
  216    void          SetNexpressions(Int_t expr);
 
  217    void          SetRecordName(
const char *name);                
 
  218    void          SetScanFileName(
const char *name=
"");           
 
  219    void          SetScanMode(Bool_t mode=kTRUE) {fScanMode = mode;}
 
  220    void          SetScanRedirect(Bool_t mode);
 
  221    void          SetSession(TTVSession *session);
 
  222    void          SetUserCode(
const char *code, Bool_t autoexec=kTRUE); 
 
  223    void          SetTree(TTree* tree);
 
  224    void          SetTreeName(
const char* treeName);              
 
  225    Bool_t        SwitchTree(Int_t index);
 
  227    void          UpdateRecord(
const char *name=
"new name");      
 
  229    ClassDef(TTreeViewer,0)