TGLSAFrame.cxx

Go to the documentation of this file.
00001 // @(#)root/gl:$Id: TGLSAFrame.cxx 20882 2007-11-19 11:31:26Z rdm $
00002 // Author:  Richard Maunder  10/08/2005
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #include "TGLSAFrame.h"
00013 #include "TGLSAViewer.h"
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TGLSAFrame                                                           //
00018 //                                                                      //
00019 // Standalone GL Viewer GUI main frame. Is aggregated in TGLSAViewer -  //
00020 // top level standalone viewer object.                                  //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 ClassImp(TGLSAFrame)
00024 
00025 //______________________________________________________________________________
00026 TGLSAFrame::TGLSAFrame(TGLSAViewer & viewer) :
00027    TGMainFrame(gClient->GetRoot()),
00028    fViewer(viewer)
00029 {
00030    // Construct GUI frame, bound to passed 'viewer'
00031 }
00032 
00033 //______________________________________________________________________________
00034 TGLSAFrame::TGLSAFrame(const TGWindow* parent, TGLSAViewer & viewer) :
00035    TGMainFrame(parent),
00036    fViewer(viewer)
00037 {
00038    // Construct GUI frame, bound to passed 'viewer'
00039 }
00040 
00041 //______________________________________________________________________________
00042 TGLSAFrame::~TGLSAFrame()
00043 {
00044    // Destroy the GUI frame
00045 }
00046 
00047 //______________________________________________________________________________
00048 Bool_t TGLSAFrame::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
00049 {
00050    // Process GUI message - defered back up to TGLSAViewer::ProcessFrameMessage()
00051    return fViewer.ProcessFrameMessage(msg, parm1, parm2);
00052 }
00053 
00054 //______________________________________________________________________________
00055 void TGLSAFrame::CloseWindow()
00056 {
00057    // Close the GUI frame
00058 
00059    // Ask our owning viewer to close
00060    // Has to be defered so that our GUI event thread can process this event
00061    // and emit signals - otherwise deleted object is called to emit events
00062    // Not very nice but seems to be only reliable way to close down
00063    TTimer::SingleShot(50, "TGLSAViewer", &fViewer, "Close()");
00064 }

Generated on Tue Jul 5 14:18:08 2011 for ROOT_528-00b_version by  doxygen 1.5.1