ROOT logo
// @(#)root/base:$Id$
// Author: Rene Brun   05/12/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TVirtualPad.h"
#include "X3DBuffer.h"
#include "TClass.h"
#include "TThreadSlots.h"

//______________________________________________________________________________
//
//  TVirtualPad is an abstract base class for the Pad and Canvas classes.
//

Size3D gVarSize3D;
Size3D* gFuncSize3D(){ return &gVarSize3D; }

Int_t (*gThreadXAR)(const char *xact, Int_t nb, void **ar, Int_t *iret) = 0;

//______________________________________________________________________________
TVirtualPad *&TVirtualPad::Pad()
{
   // Return the current pad for the current thread.

   static TVirtualPad *currentPad = 0;
   if (!gThreadTsd)
      return currentPad;
   else
      return *(TVirtualPad**)(*gThreadTsd)(&currentPad,ROOT::kPadThreadSlot);
}

ClassImp(TVirtualPad)

//______________________________________________________________________________
TVirtualPad::TVirtualPad() : TAttPad()
{
   // VirtualPad default constructor

   fResizing = kFALSE;
}

//______________________________________________________________________________
TVirtualPad::TVirtualPad(const char *, const char *, Double_t,
           Double_t, Double_t, Double_t, Color_t color, Short_t , Short_t)
          : TAttPad()
{
   // VirtualPad constructor

   fResizing = kFALSE;

   SetFillColor(color);
   SetFillStyle(1001);
}

//______________________________________________________________________________
TVirtualPad::~TVirtualPad()
{
   // VirtualPad destructor

}

//______________________________________________________________________________
void TVirtualPad::Streamer(TBuffer &R__b)
{
   // Stream an object of class TVirtualPad.

   if (R__b.IsReading()) {
      UInt_t R__s, R__c;
      Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
      if (R__v > 1) {
         R__b.ReadClassBuffer(TVirtualPad::Class(), this, R__v, R__s, R__c);
         return;
      }
      //====process old versions before automatic schema evolution
      TObject::Streamer(R__b);
      TAttLine::Streamer(R__b);
      TAttFill::Streamer(R__b);
      TAttPad::Streamer(R__b);
      //====end of old versions

   } else {
      R__b.WriteClassBuffer(TVirtualPad::Class(),this);
   }
}

//______________________________________________________________________________
Bool_t TVirtualPad::PadInSelectionMode() const
{
   // Should always return false unless you have non-standard picking.

   return kFALSE;
}

//______________________________________________________________________________
Bool_t TVirtualPad::PadInHighlightMode() const
{
   // Should always return false, unless you can highlight selected object in pad.

   return kFALSE;
}

//______________________________________________________________________________
void TVirtualPad::PushTopLevelSelectable(TObject * /*object*/)
{
   // Does nothing, unless you implement your own picking.
   // When complex object containing sub-objects (which can be picked)
   // is painted in a pad, this "top-level" object is pushed into 
   // the selectables stack.
}

//______________________________________________________________________________
void TVirtualPad::PushSelectableObject(TObject * /*object*/)
{
   // Does nothing, unless you implement your own picking.
   // "Complete" object, or part of complex object, which
   // can be picked.
}

//______________________________________________________________________________
void TVirtualPad::PopTopLevelSelectable()
{
   // Does nothing, unless you implement your own picking.
   // Remove top level selectable and all its' children.
}

//______________________________________________________________________________
TPickerStackGuard::TPickerStackGuard(TObject *obj)
{
   // Scope-guards ctor, pushe the object on stack.

   gPad->PushTopLevelSelectable(obj);
}

//______________________________________________________________________________
TPickerStackGuard::~TPickerStackGuard()
{
   // Guard does out of scope, pop object from stack.

   gPad->PopTopLevelSelectable();
}
 TVirtualPad.cxx:1
 TVirtualPad.cxx:2
 TVirtualPad.cxx:3
 TVirtualPad.cxx:4
 TVirtualPad.cxx:5
 TVirtualPad.cxx:6
 TVirtualPad.cxx:7
 TVirtualPad.cxx:8
 TVirtualPad.cxx:9
 TVirtualPad.cxx:10
 TVirtualPad.cxx:11
 TVirtualPad.cxx:12
 TVirtualPad.cxx:13
 TVirtualPad.cxx:14
 TVirtualPad.cxx:15
 TVirtualPad.cxx:16
 TVirtualPad.cxx:17
 TVirtualPad.cxx:18
 TVirtualPad.cxx:19
 TVirtualPad.cxx:20
 TVirtualPad.cxx:21
 TVirtualPad.cxx:22
 TVirtualPad.cxx:23
 TVirtualPad.cxx:24
 TVirtualPad.cxx:25
 TVirtualPad.cxx:26
 TVirtualPad.cxx:27
 TVirtualPad.cxx:28
 TVirtualPad.cxx:29
 TVirtualPad.cxx:30
 TVirtualPad.cxx:31
 TVirtualPad.cxx:32
 TVirtualPad.cxx:33
 TVirtualPad.cxx:34
 TVirtualPad.cxx:35
 TVirtualPad.cxx:36
 TVirtualPad.cxx:37
 TVirtualPad.cxx:38
 TVirtualPad.cxx:39
 TVirtualPad.cxx:40
 TVirtualPad.cxx:41
 TVirtualPad.cxx:42
 TVirtualPad.cxx:43
 TVirtualPad.cxx:44
 TVirtualPad.cxx:45
 TVirtualPad.cxx:46
 TVirtualPad.cxx:47
 TVirtualPad.cxx:48
 TVirtualPad.cxx:49
 TVirtualPad.cxx:50
 TVirtualPad.cxx:51
 TVirtualPad.cxx:52
 TVirtualPad.cxx:53
 TVirtualPad.cxx:54
 TVirtualPad.cxx:55
 TVirtualPad.cxx:56
 TVirtualPad.cxx:57
 TVirtualPad.cxx:58
 TVirtualPad.cxx:59
 TVirtualPad.cxx:60
 TVirtualPad.cxx:61
 TVirtualPad.cxx:62
 TVirtualPad.cxx:63
 TVirtualPad.cxx:64
 TVirtualPad.cxx:65
 TVirtualPad.cxx:66
 TVirtualPad.cxx:67
 TVirtualPad.cxx:68
 TVirtualPad.cxx:69
 TVirtualPad.cxx:70
 TVirtualPad.cxx:71
 TVirtualPad.cxx:72
 TVirtualPad.cxx:73
 TVirtualPad.cxx:74
 TVirtualPad.cxx:75
 TVirtualPad.cxx:76
 TVirtualPad.cxx:77
 TVirtualPad.cxx:78
 TVirtualPad.cxx:79
 TVirtualPad.cxx:80
 TVirtualPad.cxx:81
 TVirtualPad.cxx:82
 TVirtualPad.cxx:83
 TVirtualPad.cxx:84
 TVirtualPad.cxx:85
 TVirtualPad.cxx:86
 TVirtualPad.cxx:87
 TVirtualPad.cxx:88
 TVirtualPad.cxx:89
 TVirtualPad.cxx:90
 TVirtualPad.cxx:91
 TVirtualPad.cxx:92
 TVirtualPad.cxx:93
 TVirtualPad.cxx:94
 TVirtualPad.cxx:95
 TVirtualPad.cxx:96
 TVirtualPad.cxx:97
 TVirtualPad.cxx:98
 TVirtualPad.cxx:99
 TVirtualPad.cxx:100
 TVirtualPad.cxx:101
 TVirtualPad.cxx:102
 TVirtualPad.cxx:103
 TVirtualPad.cxx:104
 TVirtualPad.cxx:105
 TVirtualPad.cxx:106
 TVirtualPad.cxx:107
 TVirtualPad.cxx:108
 TVirtualPad.cxx:109
 TVirtualPad.cxx:110
 TVirtualPad.cxx:111
 TVirtualPad.cxx:112
 TVirtualPad.cxx:113
 TVirtualPad.cxx:114
 TVirtualPad.cxx:115
 TVirtualPad.cxx:116
 TVirtualPad.cxx:117
 TVirtualPad.cxx:118
 TVirtualPad.cxx:119
 TVirtualPad.cxx:120
 TVirtualPad.cxx:121
 TVirtualPad.cxx:122
 TVirtualPad.cxx:123
 TVirtualPad.cxx:124
 TVirtualPad.cxx:125
 TVirtualPad.cxx:126
 TVirtualPad.cxx:127
 TVirtualPad.cxx:128
 TVirtualPad.cxx:129
 TVirtualPad.cxx:130
 TVirtualPad.cxx:131
 TVirtualPad.cxx:132
 TVirtualPad.cxx:133
 TVirtualPad.cxx:134
 TVirtualPad.cxx:135
 TVirtualPad.cxx:136
 TVirtualPad.cxx:137
 TVirtualPad.cxx:138
 TVirtualPad.cxx:139
 TVirtualPad.cxx:140
 TVirtualPad.cxx:141
 TVirtualPad.cxx:142
 TVirtualPad.cxx:143
 TVirtualPad.cxx:144
 TVirtualPad.cxx:145
 TVirtualPad.cxx:146
 TVirtualPad.cxx:147