ROOT logo
// @(#)root/hist:$Id: TVirtualGraphPainter.cxx 24084 2008-06-01 15:34:01Z brun $
// Author: Olivier Couet 20/05/08

/*************************************************************************
 * 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 "TROOT.h"
#include "TVirtualGraphPainter.h"
#include "TPluginManager.h"
#include "TClass.h"

TVirtualGraphPainter *TVirtualGraphPainter::fgPainter = 0;

ClassImp(TVirtualGraphPainter)

//______________________________________________________________________________
//
//  TVirtualGraphPainter is an abstract interface to a histogram painter.
//


//______________________________________________________________________________
TVirtualGraphPainter *TVirtualGraphPainter::GetPainter()
{
   // Static function returning a pointer to the current graph painter.
   // If the graph painter does not exist a default painter (singleton) is created.

   // if no painter set yet, create a default painter via the PluginManager
   if (!fgPainter) {
      TPluginHandler *h;
      if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualGraphPainter"))) {
         if (h->LoadPlugin() == -1) return 0;
         fgPainter = (TVirtualGraphPainter*)gROOT->GetClass("TGraphPainter")->New();
      }
   }

   // Create an instance of the graph painter
   return fgPainter;
}

//______________________________________________________________________________
void TVirtualGraphPainter::SetPainter(TVirtualGraphPainter *painter)
{
   // Static function to set an alternative histogram painter.

   fgPainter = painter;
}
 TVirtualGraphPainter.cxx:1
 TVirtualGraphPainter.cxx:2
 TVirtualGraphPainter.cxx:3
 TVirtualGraphPainter.cxx:4
 TVirtualGraphPainter.cxx:5
 TVirtualGraphPainter.cxx:6
 TVirtualGraphPainter.cxx:7
 TVirtualGraphPainter.cxx:8
 TVirtualGraphPainter.cxx:9
 TVirtualGraphPainter.cxx:10
 TVirtualGraphPainter.cxx:11
 TVirtualGraphPainter.cxx:12
 TVirtualGraphPainter.cxx:13
 TVirtualGraphPainter.cxx:14
 TVirtualGraphPainter.cxx:15
 TVirtualGraphPainter.cxx:16
 TVirtualGraphPainter.cxx:17
 TVirtualGraphPainter.cxx:18
 TVirtualGraphPainter.cxx:19
 TVirtualGraphPainter.cxx:20
 TVirtualGraphPainter.cxx:21
 TVirtualGraphPainter.cxx:22
 TVirtualGraphPainter.cxx:23
 TVirtualGraphPainter.cxx:24
 TVirtualGraphPainter.cxx:25
 TVirtualGraphPainter.cxx:26
 TVirtualGraphPainter.cxx:27
 TVirtualGraphPainter.cxx:28
 TVirtualGraphPainter.cxx:29
 TVirtualGraphPainter.cxx:30
 TVirtualGraphPainter.cxx:31
 TVirtualGraphPainter.cxx:32
 TVirtualGraphPainter.cxx:33
 TVirtualGraphPainter.cxx:34
 TVirtualGraphPainter.cxx:35
 TVirtualGraphPainter.cxx:36
 TVirtualGraphPainter.cxx:37
 TVirtualGraphPainter.cxx:38
 TVirtualGraphPainter.cxx:39
 TVirtualGraphPainter.cxx:40
 TVirtualGraphPainter.cxx:41
 TVirtualGraphPainter.cxx:42
 TVirtualGraphPainter.cxx:43
 TVirtualGraphPainter.cxx:44
 TVirtualGraphPainter.cxx:45
 TVirtualGraphPainter.cxx:46
 TVirtualGraphPainter.cxx:47
 TVirtualGraphPainter.cxx:48
 TVirtualGraphPainter.cxx:49
 TVirtualGraphPainter.cxx:50
 TVirtualGraphPainter.cxx:51
 TVirtualGraphPainter.cxx:52