Logo ROOT  
Reference Guide
TGLSAFrame.cxx
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Richard Maunder 10/08/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #include "TGLSAFrame.h"
13 #include "TGLSAViewer.h"
14 
15 /** \class TGLSAFrame
16 \ingroup opengl
17 Standalone GL Viewer GUI main frame. Is aggregated in TGLSAViewer -
18 top level standalone viewer object.
19 */
20 
22 
23 ////////////////////////////////////////////////////////////////////////////////
24 /// Construct GUI frame, bound to passed 'viewer'
25 
27  TGMainFrame(gClient->GetRoot()),
28  fViewer(viewer)
29 {
30 }
31 
32 ////////////////////////////////////////////////////////////////////////////////
33 /// Construct GUI frame, bound to passed 'viewer'
34 
35 TGLSAFrame::TGLSAFrame(const TGWindow* parent, TGLSAViewer & viewer) :
36  TGMainFrame(parent),
37  fViewer(viewer)
38 {
39 }
40 
41 ////////////////////////////////////////////////////////////////////////////////
42 /// Destroy the GUI frame
43 
45 {
46 }
47 
48 ////////////////////////////////////////////////////////////////////////////////
49 /// Process GUI message - deferred back up to TGLSAViewer::ProcessFrameMessage()
50 
52 {
53  return fViewer.ProcessFrameMessage(msg, parm1, parm2);
54 }
55 
56 ////////////////////////////////////////////////////////////////////////////////
57 /// Close the GUI frame
58 
60 {
61  // Ask our owning viewer to close
62  // Has to be deferred so that our GUI event thread can process this event
63  // and emit signals - otherwise deleted object is called to emit events
64  // Not very nice but seems to be only reliable way to close down
65  TTimer::SingleShot(50, "TGLSAViewer", &fViewer, "Close()");
66 }
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
TGLSAFrame::ProcessMessage
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process GUI message - deferred back up to TGLSAViewer::ProcessFrameMessage()
Definition: TGLSAFrame.cxx:51
TGMainFrame
Defines top level windows that interact with the system Window Manager.
Definition: TGFrame.h:398
TGLSAFrame.h
TGLSAFrame::~TGLSAFrame
virtual ~TGLSAFrame()
Destroy the GUI frame.
Definition: TGLSAFrame.cxx:44
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGLSAViewer
The top level standalone GL-viewer - created via plugin manager.
Definition: TGLSAViewer.h:38
bool
gClient
#define gClient
Definition: TGClient.h:157
TGLSAFrame
Standalone GL Viewer GUI main frame.
Definition: TGLSAFrame.h:29
Long_t
long Long_t
Definition: RtypesCore.h:54
TGLSAViewer.h
TTimer::SingleShot
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
Definition: TTimer.cxx:256
TGLSAFrame::CloseWindow
void CloseWindow()
Close the GUI frame.
Definition: TGLSAFrame.cxx:59
TGLSAFrame::fViewer
TGLSAViewer & fViewer
Definition: TGLSAFrame.h:31
TGLSAViewer::ProcessFrameMessage
Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t)
Process GUI message capture by the main GUI frame (TGLSAFrame).
Definition: TGLSAViewer.cxx:663
TGLSAFrame::TGLSAFrame
TGLSAFrame(const TGLSAFrame &)