I am developing a ROOT application where the command input comes from the shell. The application is put into the background and joins the shell’s process group. My earlier post concerning signal handling in general is related to this. Because I wanted the application to able to trap SIGHUP when the shell exits. The application is working quite well, but I have now encountered a problem which may require a redesign. Perhaps, subclassing TApplication?? The problem is this:
In order to draw histograms in canvases, I instantiate TApplication. But I do not call Run(), because I want to be in control of the command loop. However, by not calling Run(), I have lost Notify events to redraw the canvas when it is exposed or resized. So, the question is: how do I can get access to these notifications? I see that events in TApplication are handled by TSystem. Is it possible to bypass TApplication::Run() and work directly with TSystem? Or, would it be easier to subclass TApplication? I could thread the program, translate the command strings and call TApplication’s ProcessLine().
I would appreciate any advice you may have on how I should proceed and which source files to look at for help and inspiration.
Thanks in advance!!