/usr/include/root/TBrowser.h is in libroot-core-dev 5.34.00-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | // @(#)root/base:$Id: TBrowser.h 29411 2009-07-09 12:11:09Z brun $
// Author: Fons Rademakers 25/10/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_TBrowser
#define ROOT_TBrowser
//////////////////////////////////////////////////////////////////////////
// //
// TBrowser //
// //
// Using a TBrowser on can browse all ROOT objects. It shows in a list //
// on the left side of the window all browsable ROOT classes. Selecting //
// one of the classes displays, in the iconbox on the right side, all //
// objects in the class. Selecting one of the objects in the iconbox, //
// will place all browsable objects in a new list and draws the //
// contents of the selected class in the iconbox. And so on.... //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TBrowserImp
#include "TBrowserImp.h"
#endif
class TContextMenu;
class TBrowserTimer;
class TBrowser : public TNamed {
private:
TObject *fLastSelectedObject; //!The last TObject selected by user
TBrowser(const TBrowser&); // TBrowser can not be copied since we do not know the type of the TBrowserImp (and it can not be 'Cloned')
TBrowser& operator=(const TBrowser&); // TBrowser can not be copied since we do not know the type of the TBrowserImp (and it can not be 'Cloned')
protected:
TBrowserImp *fImp; //!Window system specific browser implementation
TBrowserTimer *fTimer; //!Browser's timer
TContextMenu *fContextMenu; //!Context menu pointer
Bool_t fNeedRefresh; //True if the browser needs refresh
public:
enum {
kNoHidden = BIT(9) // don't show '.' files and directories
};
TBrowser(const char *name="Browser", const char *title="ROOT Object Browser", TBrowserImp *extimp=0, Option_t *opt="");
TBrowser(const char *name, const char *title, UInt_t width, UInt_t height, TBrowserImp *extimp=0, Option_t *opt="");
TBrowser(const char *name, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, TBrowserImp *extimp=0, Option_t *opt="");
TBrowser(const char *name, TObject *obj, const char *title="ROOT Object Browser", Option_t *opt="");
TBrowser(const char *name, TObject *obj, const char *title, UInt_t width, UInt_t height, Option_t *opt="");
TBrowser(const char *name, TObject *obj, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt="");
TBrowser(const char *name, void *obj, TClass *cl, const char *objname="", const char *title="ROOT Foreign Browser", Option_t *opt="");
TBrowser(const char *name, void *obj, TClass *cl, const char *objname, const char *title, UInt_t width, UInt_t height, Option_t *opt="");
TBrowser(const char *name, void *obj, TClass *cl, const char *objname, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt="");
// In a world with only standard C++ compliant compilers, we could also add:
// template <class T> TBrowser(const char *name, T *obj, const char *objname="", const char *title="ROOT Foreign Browser") :
// : TNamed(name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
// fNeedRefresh(kFALSE)
// {
// Create a new browser with a name, title, width and height for TObject *obj.
//
// fImp = gGuiFactory->CreateBrowserImp(this, title, width, height);
// Create(new TBrowserObject(obj,gROOT->GetClass(typeid(T)),objname));
// }
virtual ~TBrowser();
void Add(TObject *obj, const char *name = 0, Int_t check = -1);
void Add(void *obj, TClass *cl, const char *name = 0, Int_t check = -1);
void AddCheckBox(TObject *obj, Bool_t check = kFALSE);
void CheckObjectItem(TObject *obj, Bool_t check = kFALSE);
void RemoveCheckBox(TObject *obj);
virtual void Create(TObject *obj = 0); // Create this Browser
void BrowseObject(TObject *obj) { fImp->BrowseObj(obj); }
void ExecuteDefaultAction(TObject *obj);
TBrowserImp *GetBrowserImp() const { return fImp; }
void SetBrowserImp(TBrowserImp *i) { fImp = i; }
TContextMenu *GetContextMenu() const { return fContextMenu; }
Bool_t GetRefreshFlag() const { return fNeedRefresh; }
TObject *GetSelected() const { return fLastSelectedObject; }
void SetRefreshFlag(Bool_t flag) { fNeedRefresh = flag; }
void Iconify() { fImp->Iconify(); }
virtual void RecursiveRemove(TObject *obj);
void Refresh();
void SetSelected(TObject *clickedObject);
void Show() { fImp->Show(); }
void SetDrawOption(Option_t *option="") { fImp->SetDrawOption(option); }
Option_t *GetDrawOption() const { return fImp->GetDrawOption(); }
Long_t ExecPlugin(const char *name = 0, const char *fname = 0,
const char *cmd = 0, Int_t pos = 1, Int_t subpos = -1) {
return fImp->ExecPlugin(name, fname, cmd, pos, subpos);
}
void SetStatusText(const char *txt, Int_t col) {
fImp->SetStatusText(txt, col);
}
void StartEmbedding(Int_t pos, Int_t subpos) {
fImp->StartEmbedding(pos, subpos);
}
void StopEmbedding(const char *name = "") { fImp->StopEmbedding(name); }
ClassDef(TBrowser,0) //ROOT Object Browser
};
#endif
|