Re: Building GUIs with ROOT...

From: Valery Fine (fine@bnl.gov)
Date: Sat Oct 16 1999 - 21:11:21 MEST


Hello,

----- Original Message -----
From: Daniel Flath <dflath@SLAC.stanford.edu>
To: <roottalk@hpsalo.cern.ch>
Subject: Building GUIs with ROOT...



>
> I am evaluating the possibility of making an ROOT based GUI for event
> analysis and am having problems with a few things with my test GUI.
>
>
> (2) Since I've assumed '1' I've been using the old stuff (TCanvas, TPad,
> etc) -- My main problem here is that I can't find an 'edit box'
> component for users to enter text.  I took a look at TPaveText, but
> there doesn't seem to be a way for the user to enter text into it.  Is
> there a way to do this?  Do I have to capture user input and manually
> fill a TPaveText (and how would I do this), or is there another way?

  Try to

   1. create TCanvas,
   2. click "Edit"->"Editor"
   3. Select either "Text" or "PaveLabel"

   You will get the "regular" Windows "Edit control".
   I mean to enter the text one can use all "edit" features
   provided for the WIN32 control including "clipboard" operations:

    "Copy" -> Ctrl-Insert
    "Cut"  -> Ctrl-Delete
    "Paste -> Shift-Insert

   By some reason ROOT doesn't provide any direct feedback for TText and
   TPaveLabel classes. It is not constrain of Windows implementation rather
   those ROOT classes. One can still change thext but via "Context Menu"

   Click over with the "right mouse button" the object of TPaveLabel and
   select "Properties" -> "Set Label"  to introduced the new "text".

  The "Low level" method:

  virtual Int_t  TGXW::RequestString(Int_t x, Int_t y, char *text);

  can be used too. It is available via global pointer gGXW
  (replaced with  gVirtualX
   -TVirtualX:   abstract interface to the basic windowing system (was TGXW)
                 real implementations are TGX11 (Unix) or TGWin32
Windows/NT)
    with ROOT 2.23/4
  )

  Of course all above can not replace the "regular" GUI interface
  the Windows user are familiar with. But this shows the feature
  you were speaking about can be implemented easily via
  "ExecuteMethod" of those classes as a response to "left click"
  event for the "TText" and "TPaveLabel" instances.
  May be Rene will find this feature is useful enough to change the
  behavior of those classes.

> Since most of our collaborators will be using Windows NT, it is
> important for us to be able to support both the UNIXes and NT.

  I am very happy to learn there is some demand for Windows NT
  version of ROOT from very "physics" groups.

  ROOT under Windows NT can be used three different ways:

   - "classical  UNIX" approach by implementing and enhancing
      the current ROOT towards Windows NT

   - as DDE server

   - as ActiveX Server

      see http://glast.phys.washington.edu/~haas/winroot/index.html
      from http://root.cern.ch/root/ExApplications.html


  The last two appoaches assume the Windows featured applications
  are build aside of ROOT framework and needs less effort from the
  current ROOT team but eventually can be broken just the "central"
  ROOT is changed. If the UNIX compatibility is not main concern
  I would recommend very last two approaches.

>
> Regards,
> Dan.
>
> Daniel Flath
> LCD Group
> Stanford Linear Accelerator Center
> <dflath@slac.stanford.edu>
> (650) 926-8794
>
>



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