// @(#)root/base:$Id$
// Author: Fons Rademakers   15/11/95

/*************************************************************************
 * 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_TBrowserImp
#define ROOT_TBrowserImp

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TBrowserImp                                                          //
//                                                                      //
// ABC describing GUI independent browser implementation protocol.      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif

class TBrowser;
class TGMainFrame;

class TBrowserImp {

protected:
   TBrowser  *fBrowser;     //TBrowser associated with this implementation
   Bool_t     fShowCycles;  //Show object cycle numbers in browser

   TBrowserImp(const TBrowserImp& br)
     : fBrowser(br.fBrowser), fShowCycles(br.fShowCycles) { }
   TBrowserImp& operator=(const TBrowserImp& br)
     {if(this!=&br) {fBrowser=br.fBrowser; fShowCycles=br.fShowCycles;}
     return *this;}

public:
   TBrowserImp(TBrowser *b=0) : fBrowser(b), fShowCycles(kFALSE) { }
   TBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt = "");
   TBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt = "");
   virtual ~TBrowserImp() { }

   virtual void      Add(TObject *, const char *, Int_t) { }
   virtual void      AddCheckBox(TObject *, Bool_t = kFALSE) { }
   virtual void      CheckObjectItem(TObject *, Bool_t = kFALSE) { }
   virtual void      RemoveCheckBox(TObject *) { }
   virtual void      BrowseObj(TObject *) { }
   TBrowser         *Browser() const { return fBrowser; }
   virtual void      CloseTabs() { }
   virtual void      ExecuteDefaultAction(TObject *) { }
   virtual void      Iconify() { }
   virtual void      RecursiveRemove(TObject *) { }
   virtual void      Refresh(Bool_t = kFALSE) { }
   virtual void      Show() { }
   virtual void      SetDrawOption(Option_t *option="");
   virtual Option_t *GetDrawOption() const { return 0; }

   virtual Long_t    ExecPlugin(const char *, const char *, const char *, Int_t, Int_t) { return 0; }
   virtual void      SetStatusText(const char *, Int_t) { }
   virtual void      StartEmbedding(Int_t, Int_t) { }
   virtual void      StopEmbedding(const char *) { }

   virtual TGMainFrame *GetMainFrame() const { return 0; }

   virtual TBrowser *GetBrowser() const      { return fBrowser; }
   virtual void      SetBrowser(TBrowser *b) { fBrowser = b; }

   ClassDef(TBrowserImp,0)  //ABC describing browser implementation protocol
};

inline TBrowserImp::TBrowserImp(TBrowser *, const char *, UInt_t, UInt_t, Option_t *)
   : fBrowser(0), fShowCycles(kFALSE) { }
inline TBrowserImp::TBrowserImp(TBrowser *, const char *, Int_t, Int_t, UInt_t, UInt_t, Option_t *)
   : fBrowser(0), fShowCycles(kFALSE) { }

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