TVirtualPad.cxx

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TVirtualPad.cxx 21346 2007-12-12 16:18:29Z couet $
00002 // Author: Rene Brun   05/12/95
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, 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 "TVirtualPad.h"
00013 #include "X3DBuffer.h"
00014 #include "TClass.h"
00015 
00016 //______________________________________________________________________________
00017 //
00018 //  TVirtualPad is an abstract base class for the Pad and Canvas classes.
00019 //
00020 
00021 Size3D gVarSize3D;
00022 Size3D* gFuncSize3D(){ return &gVarSize3D; }
00023 
00024 void **(*gThreadTsd)(void*,Int_t) = 0;
00025 Int_t (*gThreadXAR)(const char *xact, Int_t nb, void **ar, Int_t *iret) = 0;
00026 
00027 //______________________________________________________________________________
00028 TVirtualPad *&TVirtualPad::Pad()
00029 {
00030    // Return the current pad for the current thread.
00031 
00032    static TVirtualPad *currentPad = 0;
00033    if (!gThreadTsd)
00034       return currentPad;
00035    else
00036       return *(TVirtualPad**)(*gThreadTsd)(&currentPad,0);
00037 }
00038 
00039 
00040 ClassImp(TVirtualPad)
00041 
00042 //______________________________________________________________________________
00043 TVirtualPad::TVirtualPad() : TAttPad()
00044 {
00045    // VirtualPad default constructor
00046 
00047    fResizing = kFALSE;
00048 }
00049 
00050 //______________________________________________________________________________
00051 TVirtualPad::TVirtualPad(const char *, const char *, Double_t,
00052            Double_t, Double_t, Double_t, Color_t color, Short_t , Short_t)
00053           : TAttPad()
00054 {
00055    // VirtualPad constructor
00056 
00057    fResizing = kFALSE;
00058 
00059    SetFillColor(color);
00060    SetFillStyle(1001);
00061 }
00062 
00063 //______________________________________________________________________________
00064 TVirtualPad::~TVirtualPad()
00065 {
00066    // VirtualPad destructor
00067 
00068 }
00069 
00070 //______________________________________________________________________________
00071 void TVirtualPad::Streamer(TBuffer &R__b)
00072 {
00073    // Stream an object of class TVirtualPad.
00074 
00075    if (R__b.IsReading()) {
00076       UInt_t R__s, R__c;
00077       Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
00078       if (R__v > 1) {
00079          R__b.ReadClassBuffer(TVirtualPad::Class(), this, R__v, R__s, R__c);
00080          return;
00081       }
00082       //====process old versions before automatic schema evolution
00083       TObject::Streamer(R__b);
00084       TAttLine::Streamer(R__b);
00085       TAttFill::Streamer(R__b);
00086       TAttPad::Streamer(R__b);
00087       //====end of old versions
00088 
00089    } else {
00090       R__b.WriteClassBuffer(TVirtualPad::Class(),this);
00091    }
00092 }
00093 

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