Re: Re: [ROOT] Confused about ROOT GUI under Windows

From: Valeriy Onuchin (Valeri.Onoutchine@cern.ch)
Date: Thu Jul 31 2003 - 16:17:19 MEST


 Hi H.-Gerd Rosarius,
I appologize for some typos in my previous message.

 4.  use ClassDef( MFTest, 0)
     0 - you don't need object I/O 
     Check also  http://root.cern.ch/root/Using.html

Regards. Valeriy

> H.-Gerd Rosarius,
> 0. look at  test/guiviewer.h test/guivieer.cxx code and Makefile 
> 1.  use TApplication (not TGApplication). 
> 2.  do not include RQ_OBJECT( "MFTest" )
>      That is required anly for interpreted classes.
> 3.  create LinkDef.h and dictionary for MFTest  class
> 
> Must work.
> 
> HTH. Regards. Valeriy
> 
> > Hey Rene,
> > 
> > thanks for your explanation about the latest development in windows GUI
> > matters. Now I have a clear picture!
> >  
> > However, I would like to use the chance and show you my code that should
> > work with the ROOT win32gdk-release for windows. (See below) Maybe I can
> > get it to work with yours and the lists help. :o)
> > 
> > As I wrote it simply doesn't work. It crashes at runtime when reaching
> > MapWindow() in the constructor of my class MFTest. 
> > It works fine if I compile it without the ClassDef macro and ignore the
> > dictionary. Because of the GUI event handling which I need later 
> > I cannot ignore the dictionary. By the way: rootcint does not complain
> > while I create the dictionary.
> > 
> > Any ideas?
> > 
> > Tech: Using ROOT 3.05/07 (Win32gdk) on Win2000 with MS VC++6 installed.
> >       Problem happend with binary and self-compiled release.
> > 
> > Thanks in advance
> > 
> >   H.-Gerd Rosarius
> > 
> > 
> > 
> > file://- Main --------------------------------------------------------------
> > // Root-Libraries
> > #include <TGApplication.h>
> > #include <TGClient.h>
> > 
> > // Own class
> > #include "MFTest.h"
> > 
> > int main ( int argc, char** argv )
> > {
> >   TGApplication application( "ROOT GUI in Windows 2000", &argc, argv );
> >   MFTest t( gClient->GetRoot() );
> >   application.Run();
> >   return 0;
> > }
> > 
> > 
> > file://- MainFrame-Test Header -------------------------------------------
> > #ifndef MFTEST_H
> > #define MFTEST_H
> > 
> > #include <TGFrame.h>
> > #include <RQ_OBJECT.h>
> > using namespace std;
> > 
> > class MFTest : public TGMainFrame
> > {
> >   RQ_OBJECT( "MFTest" )
> > 
> > public:
> >   MFTest( const TGWindow*, UInt_t = 800, UInt_t = 600 );
> >   ~MFTest();
> > 
> >   // Macro
> >   ClassDef( MFTest, 1 );
> > };
> > #endif
> > 
> > file://- MainFrame-Test Implementation -----------------------------------
> > #include "MFTest.h"
> > 
> > MFTest::MFTest( const TGWindow* p, UInt_t height, UInt_t width ) :
> > TGMainFrame( p, height, width )
> > {
> >   // Causes crash
> >   MapWindow();
> > }
> > 
> > MFTest::~MFTest() {}
> > 
> > 
> > 
> > 
> > On Thu, 2003-07-31 at 09:36, Rene Brun wrote:
> > > Hi,
> > > 
> > > Unfortunately, you must have been very confused by Valeri Fine's 
> > > posting. His version of ROOT with Qt is not yet ready for
> > > distribution. It is not yet fully compliant with the TVirtualX
> > > interface. Valeri's version will be incorporated into the ROOT
> > > official distribution only in a few weeks from now.
> > > 
> > > The only interface fully TVirtualX compliant is the win32gdk version.
> > > Please download this version from the Web site and nothing else.
> > > The win32gdk version in release 3.05/07 is still a slow version.
> > > We had no time to include a much faster version before the release,
> > > but it will be available before end of August.
> > > 
> > > Rene Brun
> > > 
> > > On 31 
> > > Jul 
> > > 2003, 
> > > H.-Gerd Rosarius wrote:
> > > 
> > > > Hello Rooters,
> > > > 
> > > > after a lot of roottalk reading and unsuccessful coding I am 
> > > > quite confused as well as frustrated about ROOT's ability to create 
> > > > GUI applications for windows.
> > > > 
> > > > My mission is simple: Creating a standalone GUI application that
> > > > has no other functionality than to display ROOT histograms and is
> > > > portable between Windows and Linux. (while Linux isn't the problem)
> > > > The histograms are serialized in a root-file.
> > > > 
> > > > First I tried to build such an application for MS Windows 2000 with 
> > > > the ROOT TG*-Classes. To cut a long story short: I didn't manage
> > > > to do it, because the application always crashed when I used
> > > > a simple self-written class that was derived from TGMainFrame,
> > > > included the RQ_OBJECT- and ClassDef-Makro. It goes without saying
> > > > that I made a dictionary, too.
> > > > 
> > > > However, another attempt was to build a QT-Application that used
> > > > the TQtWidget-class out of the "ROOT Qt-Edition" from BNL.
> > > > (See http://root.cern.ch/root/roottalk/roottalk03/3194.html and 
> > > > http://root.cern.ch/root/roottalk/roottalk03/3197.html)
> > > > 
> > > > Valeri wrote back that this won't work. 
> > > > (See http://root.cern.ch/root/roottalk/roottalk03/3203.html)
> > > > 
> > > > Just a few minutes ago I read this posting from 1999.
> > > > (http://root.cern.ch/root/roottalk/roottalk99/0491.html)
> > > > Fons wrote on a similar task that "this should be not much of a
> > > > problem". But on a first glance the posting seems heavily 
> > > > Linux related, but I'll try it in this way next.
> > > > 
> > > > But please, could you clear my picture about the status of Windows 
> > > > GUI and the different GUI related ROOT "distributions" (Qt-Edition,
> > > > win32gdk, etc.)??
> > > > 
> > > > Greetings 
> > > > 
> > > >   H.-Gerd Rosarius
> > 
> > 
> > 
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:14 MET