Re: misc; using shared libs

Fons Rademakers (Fons.Rademakers@cern.ch)
Wed, 05 Mar 1997 11:37:02 +0100


Message-ID: <331C8587.7660@cern.ch>
Date: Tue, 04 Mar 1997 21:26:47 +0100
From: Fons Rademakers <Fons.Rademakers@cern.ch>
Organization: CERN, European Research Center for High Energy Physics
X-Mailer: Mozilla 3.0Gold (X11; I; HP-UX B.10.20 9000/819)
MIME-Version: 1.0
To: "Jens Racky [ET]" <racky@rhrk.uni-kl.de>
Subject: Re: misc; using shared libs
References: <m0w1z4l-00006FC@aix12>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Jens,

in principle you can load any shared library in ROOT.
However, to have your classes and methods visible via the
interpreter you have to make a dictionary for them. All this
can be done as one large or many small shared libraries
(like the ROOT system itself).

ROOT contains in libMotif.so a full C++ interface to most
Motif widgets. In principle you can use these classes
directly to create whatever you want. However, the Motif
class interface is currently not on the web (will be there
for release 1.00). Although it is no problem to use
these Motif components to extend your application
remember that it will not automatically run on Windoze.
For that you would have to build the Win32 equivalent of
you Motif component. The XEvents for such components will
be handled correctly by the main application eventloop.

Better would be if you could create your GUI components
via the available ROOT graphics primitives available in
the TPad or TGXW classes (see
http://root.cern.ch/root/html/TPad.html
and
http://root.cern.ch/root/html/TGXW.html
)

For example to see how an arrow is drawn:
http://root.cern.ch/root/html/src/TArrow.C.html#TArrow:PaintArrow
or a histogram:
http://root.cern.ch/root/html/src/TGraph.C.html#TGraph:PaintGrapHist

The advantage of this approach is that your GUI component will
work on all supported platforms, incl. win32.

Cheers, Fons.

Jens Racky [ET] wrote:
>
> Hi,
>
> is it possible to integrate precompiled classes, which have to be
> linked (dynamically) with other libraries for using 'ld.so' (under
> Linux) (I'm thinking of using "really big"
> libraries, which can't be compiled using a "simple" (single)
> Makefile, as in the CINT Dictionary Generator example)?
>
> Another question concerns the creation of ROOT Applications with
> GUIs, which
> can't be build using only the components provided by root (i.e.
> which have to access Xlib, Motif etc. directly). Is this possible
> (what happens to the XEvents created by such components)? Is there
> any proposed way to do this? Are there any (simple) examples for
> this? How are the provided GUI components and graphic routines
> integrated into ROOT, I mean, would ROOT have to be rebuild from its
> sources to provide additional components, i.e. for integrating a
> kind of TPaveImage to display an image as I can do with TPaveText to
> display text?
>
> Is it possible to have a look on the code for the graphic routines
> of the histogram class, as thats in the way of what I finally want
> to have for simple arrays/images.
>
> thanx for reading all this
>
> Jens
>
> -------------
> Jens Racky
> racky@e-technik.uni-kl.de

-- 
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 7822601