Hi all,
I’am writting a standalone application with TRootBrowser in order to create the GUI. Using the plugins system I added a TGFileBrowser (I will add later other plugins).
The problem is : I don’t know how to create the link between the TRootBrowser and the TGFileBrower plugin (using the HandleMenu method of TRootBrowser) in order to load a file in the TGFileBrowser opened through the Menu file of the TRootBrowser.
Thanks
Here is the code :
[code]
#include “Spectroscopy.h”
#include “TRootBrowser.h”
#include “TBrowser.h”
#include “TApplication.h”
#include “TROOT.h”
#include “TStyle.h”
#include “TGTab.h”
#include
using namespace std;
Spectroscopy::Spectroscopy(const TGWindow *p,UInt_t w,UInt_t h) : TGMainFrame(p,w,h)
{
fRootBrowser = new TRootBrowser(fBrowser, “Spectroscopy Analysis Tool”,0,0,1640,900,“FI”);
fRootBrowser->ShowCloseTab(kFALSE);
//fRootBrowser->ExecPlugin(“Calibration”, “Calibration.C”);
//fRootBrowser->ExecPlugin(“Background”, “Background.C”);
//fRootBrowser->ExecPlugin(“Deconvolution”, “Deconvolution.C”);
//fRootBrowser->ExecPlugin(“Fit”, “Fit.C”);
//Signal/slot between TRootBrowser and TGFileBRowser ??
}
//_____________________________________________________________________________________________________________________________________________________________________________
//Destructeur
Spectroscopy::~Spectroscopy()
{
Cleanup();
}
//_____________________________________________________________________________________________________________________________________________________________________________
//Main
int main(int argc, char **argv)
{
TApplication theApp(“App”, &argc, argv);
if (gROOT->IsBatch())
{
fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]); return 1;
}
Spectroscopy Spectro(gClient->GetRoot(),1024,768);
theApp.Run();
return 0;
}[/code]