Is it possible to modify the example below so it would close a canvas after
the first call to TApplication::Run() and reopen it at the second call?
I'd appreciate any hints on this subject.
Thanks, Pasha.
--------------------------------------------------------------------------------
#include "TROOT.h"
#include "TApplication.h"
#include "TCanvas.h"
#include "TLine.h"
#include "TPaveLabel.h"
extern void InitGui();
VoidFuncPtr_t initfuncs[] = { InitGui, 0 };
int Error;
TROOT root("hello","Hello World", initfuncs);
TApplication* theApp;
main(int argc, char **argv) {
TApplication theApp("App", &argc, argv);
TCanvas c("c", "The Hello Canvas", 400, 400);
c.Update();
theApp.Run(kTRUE);
c.Close();
c.Update();
theApp.Run(kTRUE);
}
--------------------------------------------------------------------------------