73 #include "RConfigure.h"    88    "ROOT files",   
"*.root",
   125                      "TRootBrowser", 
this,
   126                      "EventInfo(Int_t, Int_t, Int_t, TObject*)");
   149                      "TRootBrowser", 
this,
   150                      "EventInfo(Int_t, Int_t, Int_t, TObject*)");
   212                       "HandleMenu(Int_t)");
   229 #if defined(R__HAS_COCOA)   255    fTabRight->
Connect(
"Selected(Int_t)", 
"TRootBrowser", 
this, 
"DoTab(Int_t)");
   256    fTabRight->
Connect(
"CloseTab(Int_t)", 
"TRootBrowser", 
this, 
"CloseTab(Int_t)");
   276    int parts[] = { 33, 10, 10, 47 };
   294    if (!strcmp(
gROOT->GetDefCanvasName(), 
"c1"))
   295       gROOT->SetDefCanvasName(
"Canvas_1");
   402                         this, 
"EventInfo(Int_t, Int_t, Int_t, TObject*)");
   409       if (!container) 
continue;
   437       if (!container) 
continue;
   467       if (!container) 
continue;
   492    Emit(
"CloseWindow()");
   501                         this, 
"EventInfo(Int_t, Int_t, Int_t, TObject*)");
   522    const Int_t kTMAX=256;
   523    static char atext[kTMAX];
   534       snprintf(atext, kTMAX, 
"%c", (
char) px);
   536       snprintf(atext, kTMAX, 
"%d,%d", px, py);
   552    if (cmd && strlen(cmd)) {
   554       if (name) pname = 
name;
   558    else if (fname && strlen(fname)) {
   561       if (t > 0) pname.
Remove(t);
   567    retval = 
gROOT->ProcessLine(command.
Data());
   568    if (command.
Contains(
"new TCanvas")) {
   569       pname = 
gPad->GetName();
   609       gVirtualX->LookupString(event, input, 
sizeof(input), keysym);
   628          switch ((
EKeySym)keysym & ~0x20) {   
   671    static Int_t eNr = 1;
   693                   gROOT->ProcessLine(
Form(
"new TFile(\"%s\");",
   699                gROOT->ProcessLine(
Form(
"new TFile(\"%s\");",
   720             sprintf(str, 
"About ROOT %s...", 
gROOT->GetVersion());
   739          hd = 
new TRootHelpDialog(
this, 
"Help on Graphics Editor...", 600, 400);
   767          cmd.
Form(
"new TGTextEditor((const char *)0, gClient->GetRoot())");
   775          cmd.
Form(
"new TGHtmlBrowser(\"%s\", gClient->GetRoot())",
   776                   gEnv->
GetValue(
"Browser.StartUrl", 
"http://root.cern.ch"));
   796             strlcpy(command, 
"new TGLSAViewer(gClient->GetRoot(), 0);",
   799                               "Enter plugin command line:",
   801             if (strcmp(command, 
"")) {
   835    if ((opt == 0) || (!opt[0]))
   840    if (strchr(opt, 
'F')) {
   841       cmd.
Form(
"new TGFileBrowser(gClient->GetRoot(), (TBrowser *)0x%lx, 200, 500);", (
ULong_t)
fBrowser);
   848    Int_t i, len = strlen(opt);
   849    for (i=0; i<len; ++i) {
   852          cmd.
Form(
"new TGTextEditor((const char *)0, gClient->GetRoot());");
   860             cmd.
Form(
"new TGHtmlBrowser(\"%s\", gClient->GetRoot());",
   862                      "http://root.cern.ch/root/html/ClassIndex.html"));
   870          cmd.
Form(
"new TCanvas();");
   877          cmd.
Form(
"new TGLSAViewer(gClient->GetRoot(), 0);");
   884          cmd.
Form(
"new TSessionViewer();");
   892    if (strchr(opt, 
'I')) {
   893       cmd.
Form(
"new TGCommandPlugin(gClient->GetRoot(), 700, 300);");
  1122          el->
fFrame->
Connect(
"ProcessedConfigure(Event_t*)", 
"TGCompositeFrame",
  1134    if (name && strlen(name)) {
  1158    if (embed && embed->
GetList()) {
  1161          if (el->fFrame->InheritsFrom(
"TGMenuBar")) {
  1168                if (nw->
fFrame == menu) {
  1184                   if (popup->GetEntry(
"Close Canvas")) {
  1185                      TGMenuEntry *exit = popup->GetEntry(
"Close Canvas");
  1188                   if (popup->GetEntry(
"Close Viewer")) {
  1189                      TGMenuEntry *exit = popup->GetEntry(
"Close Viewer");
  1192                   if (popup->GetEntry(
"Quit ROOT")) {
  1196                   if (popup->GetEntry(
"Exit")) {
  1216    Emit(
"DoubleClicked(TObject*)", (
Long_t)obj);
  1229    Emit(
"Checked(TObject*,Bool_t)", args);
  1237    Emit(
"ExecuteDefaultAction(TObject*)", (
Long_t)obj);
 TGCompositeFrame * fEditFrame
void SetBrowserImp(TBrowserImp *i)
virtual void HideFrame(TGFrame *f)
Hide sub frame. 
const Mask_t kKeyReleaseMask
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root. 
virtual const char * GetName() const
Returns name of object. 
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame. 
virtual void ShowClose(Bool_t on=kTRUE)
Show/hide close icon on the tab element, then apply layout to compute correct elements size...
void CloneBrowser()
Clone the browser. 
virtual void Checked(TObject *obj, Bool_t check)
Emits signal when double clicking on icon. 
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets). 
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects. 
virtual void StartEmbedding(Int_t pos=kRight, Int_t subpos=-1)
Start embedding external frame in the tab "pos" and tab element "subpos". 
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame. 
R__EXTERN const char gHelpPostscript[]
TGCompositeFrame * GetTabContainer(Int_t tabIndex) const
Return container of tab with index tabIndex. 
const Mask_t kKeyMod2Mask
virtual void BrowseObj(TObject *)
Collectable string class. 
TGPopupMenu * fMenuExecPlugin
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle. 
const Mask_t kKeyShiftMask
virtual void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add items to the actual browser. 
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events. 
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager. 
R__EXTERN void * gTQSender
const Mask_t kKeyMod1Mask
const TGWindow * GetRoot() const
Returns current root (i.e. 
virtual void SetName(const char *name)
Set the name of the TNamed. 
virtual void SetFrame(TGFrame *frame, Bool_t left)
Set frame to be resized. 
void InitPlugins(Option_t *opt="")
Initialize default plugins. 
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty. 
R__EXTERN const char gHelpPullDownMenus[]
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name. 
TGHorizontalFrame * fToolbarFrame
TGCompositeFrame * fActMenuBar
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library. 
virtual void ShowFrame(TGFrame *f)
Show sub frame. 
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
R__EXTERN TApplication * gApplication
virtual Long_t ExecPlugin(const char *name=0, const char *fname=0, const char *cmd=0, Int_t pos=kRight, Int_t subpos=-1)
Execute a macro and embed the created frame in the tab "pos" and tab element "subpos". 
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager. 
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py). 
R__EXTERN const char gHelpBrowser[]
virtual void Layout()
Layout the elements of the composite frame. 
R__EXTERN const char gHelpAbout[]
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object. 
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname. 
virtual void DoubleClicked(TObject *obj)
Emits signal when double clicking on icon. 
virtual void ReallyDelete()
Really delete the browser and the this GUI. 
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView. 
void SetText(TGString *text)
Set new tab text. 
virtual void Selected(Int_t id)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds. 
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints. 
Option_t * GetDrawOption() const
Returns drawing option. 
TGHorizontalFrame * fTopMenuFrame
virtual void ExecuteDefaultAction(TObject *obj)
Emits signal "ExecuteDefaultAction(TObject*)". 
virtual void Refresh(Bool_t force=kFALSE)
Refresh the actual browser contents. 
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent...
const Mask_t kKeyLockMask
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events. 
virtual void RecursiveRemove(TObject *)
TGTab * GetTab(Int_t pos) const
Returns the TGTab at position pos. 
virtual TList * GetList() const
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name. 
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window. 
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar. 
const Mask_t kKeyPressMask
Using a TBrowser one can browse all ROOT objects. 
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
const TString & GetString() const
Long_t ExecPlugin(const char *name=0, const char *fname=0, const char *cmd=0, Int_t pos=1, Int_t subpos=-1)
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty. 
R__EXTERN TSystem * gSystem
void Popup()
Show help dialog. 
Bool_t fMultipleSelection
R__EXTERN const char gHelpCanvas[]
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl; 
void SetTabTitle(const char *title, Int_t pos=kRight, Int_t subpos=-1)
Set text "title" of Tab "subpos" in TGTab "pos". 
virtual void SetStatusText(const char *txt, Int_t col)
Set text in culumn col in status bar. 
virtual TObject * Remove(TObject *obj)
Remove object from the list. 
void HandleMenu(Int_t id)
Handle menu entries events. 
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget. 
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname". 
virtual void BrowseObj(TObject *obj)
Browse object. 
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
static TGLayoutHints * fgDefaultHints
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor. 
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from browser. 
char * Form(const char *fmt,...)
virtual void SetFrame(TGFrame *frame, Bool_t above)
Set frame to be resized. 
virtual void CloseTab(Int_t id)
Remove tab element id from right tab. 
virtual Int_t Exec(const char *shellcmd)
Execute a command. 
UInt_t References() const
void SetTab(Int_t pos=kRight, Int_t subpos=-1)
Switch to Tab "subpos" in TGTab "pos". 
virtual void RemoveTab(Int_t tabIndex=-1, Bool_t storeRemoved=kTRUE)
Remove container and tab of tab with index tabIndex. 
virtual void Refresh(Bool_t=kFALSE)
void RecursiveReparent(TGPopupMenu *popup)
Recursively reparent TGPopupMenu to gClient->GetDefaultRoot(). 
R__EXTERN const char gHelpObjects[]
void Selected(char *)
A ROOT File has been selected in TGHtmlBrowser. 
char * StrDup(const char *str)
Duplicate the string str. 
static const char * gPluginFileTypes[]
virtual void CloseTabs()
Properly close the mainframes embedded in the different tabs. 
TString & Remove(Ssiz_t pos)
virtual Bool_t IsEmpty() const
virtual void Add(TObject *, const char *, Int_t)
virtual void CloseWindow()
Called when window is closed via the window manager. 
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor. 
Ssiz_t Last(char c) const
Find last occurrence of a character c. 
virtual ~TRootBrowser()
Clean up all widgets, frames and layouthints that were used. 
static const char * gOpenFileTypes[]
TGHorizontalFrame * fPreMenuFrame
const TGPicture * fIconPic
R__EXTERN const char gHelpGraphicsEditor[]
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver. 
virtual void StopEmbedding(const char *name=0)
void RemoveTab(Int_t pos, Int_t subpos)
Remove tab element "subpos" from tab "pos". 
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints. 
const TGWindow * GetParent() const
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame. 
R__EXTERN C unsigned int sleep(unsigned int seconds)
Mother of all ROOT objects. 
TGHorizontalFrame * fMenuFrame
TBrowserImp * fActBrowser
virtual const char * GetTitle() const
Returns title of object. 
virtual void UnmapWindow()
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint. 
void SetFrameElement(TGFrameElement *fe)
virtual void Add(TObject *obj)
void CreateBrowser(const char *name)
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex. 
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
const char * GetString() const
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts. 
void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected)
Display a tooltip with infos about the primitive below the cursor. 
virtual Option_t * GetDrawOption() const
R__EXTERN const char gHelpRemote[]
static void Terminate()
Close the global pad editor. Static method. 
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function. 
void Emit(const char *signal, const T &arg)
Activate signal with single parameter. 
const Mask_t kKeyControlMask
void ShowMenu(TGCompositeFrame *menu)
Show the selected frame's menu and hide previous one. 
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode. 
virtual const char * GetName() const
Returns name of object. 
virtual Int_t GetSize() const
virtual void DeleteWindow()
Delete window. 
TRootBrowser(const TRootBrowser &)
Int_t GetNumberOfTabs() const
Return number of tabs. 
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource. 
void SwitchMenus(TGCompositeFrame *from)
Move the menu from original frame to our TGMenuFrame, or display the menu associated to the current t...
void DoTab(Int_t id)
Handle Tab navigation. 
static TBrowserImp * NewBrowser(TBrowser *b=0, const char *title="ROOT Browser", UInt_t width=800, UInt_t height=500, Option_t *opt="")
static contructor returning TBrowserImp, as needed by the plugin mechanism. 
ABC describing GUI independent browser implementation protocol. 
const char * Data() const