Tweaking the Editor

From: Tom Roberts <tjrob_at_fnal.gov>
Date: Sun, 18 Feb 2007 00:13:52 -0600


There is a lot of magic surrounding the editors, and I have been unable to penetrate it by reading the documentation and code. Here's what I want to do:

My application displays a plot (TH1, TH2, or TGraph) in its own TCanvas, with the editor enabled in the TCanvas, and the plot selected, so when the window appears the editor is visible and editing the plot. I would like to get the editor's fTabContainer and add a new tab "Sliders" (which contains sliders that apply cuts to the plot by re-scanning the TNtuple from which the plot was constructed). At present the sliders are in a separate TGMainFrame, and it works, but it would be better to draw them in the same window as the plot.

Any suggestions how to do that would be most welcome.

An alternative would be to divide the TCanvas into 2 TPad-s, and draw the plot in one and the sliders in the other. But I cannot figure out how to put a TGFrame into a TPad -- their class hierarchies seem completely orthogonal.... Perhaps this is not a TPad but some other collection. Somehow TGedEditor solved this but I could not find it. I would also like to add an entry in the View menu to control visibility -- how can I do that?

Any help would be appreciated.

Note that I prefer to simply distribute a macro for my application, rather than compiling it for each target system. So solutions that can be put into a macro.C file are preferred (my users probably have no C++ compiler). I can distribute a .so/.dll/.dylib if necessary.

Tom Roberts Received on Sun Feb 18 2007 - 07:13:58 CET

This archive was generated by hypermail 2.2.0 : Sun Feb 18 2007 - 17:50:01 CET