Re: GUI vs Non-GUI Graphical Objects

From: Fons Rademakers (rdm@pcsalo.cern.ch)
Date: Fri Jul 03 1998 - 01:20:36 MEST


Hi Nathan,

   the TPad structure is aimed at graph drawing (functions, histograms, etc.).
A TPad defines linear and log scales, supports scaling (when pad is resized), 
postscript output, etc. However, as you noticed, it lacks many features 
to build nice GUI's (the button and slider were "quick hacks" to get some
basic GUI going). After many requests from our users we introduced the 
XClass'95 derived widget set. In principle there is no problem
using the TPad and TG widgets in the same window. However, we've not yet
exported the necessary hooks from the basic TCanvas class yet. We were waiting
with this because we hoped to get also the Win32 version of the TG classes
implemented, so we would not break ROOT's cross-platform capabilities
(TPad's work on both X11 and Win32). Alas, we did not yet find the
resources (i.e. volunteers) for a Win32 version of the TG classes. Anyway,
to not longer hold up the X11 users we will come in August with TCanvas
that can also accept TG widgets.

Any volunteers who want to work on the Win32 port of the TG classes are
welcome. In principle only the functions in the ROOT source file
X11_GX11Gui.cxx should be ported to Win32. All TG classes use the basic
functions defined in this file. 

Cheers, Fons.


> 
> Rene Brun wrote:
> 
> > In the recently released version 2.09, I have added a new tutorial
> > xyslider illustrating how to use two sliders to control the bondaries
> > of a 2 dim plot. The control is via a user interpreted function.
> > For more info and the example, see:
> >  http://root.cern.ch/root/html/TSlider.html
> 
> Thanks! Good tutorial, and one that will help with my immediate problem.
> 
> But I'm still confused about one thing: the interface (or
> non-interface) between the GUI classes (TG[A-Z]...) and the non-GUI
> classes.  While there are a handful of GUI-like components you can use in
> TPads (TButton, TSlider, etc.), there is an entire collection of
> GUI components (all the stuff ported from XClass '95) that is not
> compatible for use in TPads -- as far as I can tell. Am I wrong?
> 
> Maybe I just need to play with things some more. To be honest, as a
> longtime X/Motif programmer, I understand the GUI classes -- the hierarchy,
> geometry management, etc. -- while I find the TPad-derived classes quite
> mysterious: for example, how does your xslider know to be a horizontal
> slider and your yslider know to be vertical? I guess I just haven't wrapped
> my mind around the TPad way of managing objects.
> 
> Nathan Meyers
> nmeyers@teleport.com
> 
> 
> 
> --------------597732635FBD--


-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:34 MET