Re: new GUI into existing application

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Wed Mar 11 1998 - 17:50:04 MET


Otto Schaile wrote:
> 
> Dear Rooters,
> 
> first I would like to say you did an impressive job to integrate
> such a thing in such a short time.
> 

Thanks.... was basically day and night for two months. -:)

> Could you give a hint (or a hyperlink) how to integrate the new gui
> elements into an existing program:
> typically one has:
> 
> TCanvas *c=new TCanvas(...)
> TButton *b = new TButton(...)
> b->Draw()
> ..
> // more buttons
> c->cd()
> hist->Draw()
> 

Sorry no doc or html yet. This is next on the TODO list. On how to make
dialogs have a look at the guitest.cxx program and for example
TRootDialog (http://root.cern.ch/root/html/src/TRootDialog.cxx.html)
which is the dialog box that is dynamically created when a method that
requires arguments is executed via a context popup menu.

> Now I would like to replace the TButtons by the new elements and "glue"
> them (in addition to the one prvided by root: File, Option etc) onto the
> menubar on top of the Canvas.
>

A next version will provide hooks to the menu bar so that items can be
changed, added, deleted, etc.

> 
> Also I would like to profit from the scroll bars to display a hist
> with many channels.
> 

You could do something like:

TCanvas c("c")
c.SetCanvas(2000, 400)  // makes the canvas 2000x400 pixels without
                        // changing window size, also turns off the
                        // autofit option in the View menu so when
                        // you resize the window it stays at 2000x400
histo.Draw()


Cheers, Fons.

-- 
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:30 MET