Revision 3e7673472eedd975f9b5fcc1ced44ddbd8db476d authored by Pere Mato on 02 December 2014, 17:12:03 UTC, committed by Pere Mato on 02 December 2014, 17:12:03 UTC
1 parent bc6a48d
Raw File
fileopen.C
// @(#)macros:$Id$
// Author: Axel Naumann, 2008-05-22
//
// This script gets executed when double-clicking a ROOT file (currently only on Windows).
// The file that got double clicked and opened is accessible as _file0.

void onBrowserClose() {
   gApplication->Terminate(0);
}

void fileopen() 
{
   TBrowser *b = new TBrowser;
   // or, to only browse the file:
   // new TBrowser(_file0);

   // Quit ROOT when the browser gets closed:
   b->GetBrowserImp()->GetMainFrame()->Connect("CloseWindow()", 0, 0, "onBrowserClose()");
} 
back to top