TGIdleHandler.cxx

Go to the documentation of this file.
00001 // @(#)root/gui:$Id: TGIdleHandler.cxx 23115 2008-04-10 13:35:37Z rdm $
00002 // Author: Fons Rademakers   2/8/2004
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 //////////////////////////////////////////////////////////////////////////
00013 //                                                                      //
00014 // TGIdleHandler                                                        //
00015 //                                                                      //
00016 // Handle idle events, i.e. process GUI actions when there is nothing   //
00017 // else anymore to do.                                                  //
00018 //                                                                      //
00019 //////////////////////////////////////////////////////////////////////////
00020 
00021 #include "TGIdleHandler.h"
00022 #include "TGWindow.h"
00023 
00024 
00025 ClassImp(TGIdleHandler)
00026 
00027 //______________________________________________________________________________
00028 TGIdleHandler::TGIdleHandler(TGWindow *w)
00029 {
00030    // Create idle handler.
00031 
00032    if (w) {
00033       fWindow = w;
00034       if (fWindow->GetClient())
00035          fWindow->GetClient()->AddIdleHandler(this);
00036    } else
00037       Error("TGIdleHandler", "window cannot be 0");
00038 }
00039 
00040 //______________________________________________________________________________
00041 TGIdleHandler::~TGIdleHandler()
00042 {
00043    // Delete idle handler.
00044 
00045    if (fWindow->GetClient())
00046       fWindow->GetClient()->RemoveIdleHandler(this);
00047 }
00048 
00049 //______________________________________________________________________________
00050 Bool_t TGIdleHandler::HandleEvent()
00051 {
00052    // Handle the idle event. Returns true if the event has been handled,
00053    // false otherwise.
00054 
00055    return fWindow->HandleIdleEvent(this);
00056 }

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