library: libGui #include "TGPicture.h"

# TGPicturePool

class description - source file - inheritance tree (.pdf)

## class TGPicturePool : public TObject

| Inheritance Chart:
`TObject`
| <- | `TGPicturePool` |

        public:

                           TGPicturePool(const TGClient* client, const char* path)
                           TGPicturePool(const TGPicturePool&)
                   virtual ~TGPicturePool()
            static TClass* Class()
                      void FreePicture(const TGPicture* pic)
               const char* GetPath() const
          const TGPicture* GetPicture(const char* name) const
          const TGPicture* GetPicture(const char* name, char** xpm) const
          const TGPicture* GetPicture(const char* name, UInt_t new_width, UInt_t new_height) const
          const TGPicture* GetPicture(const char* name, Pixmap_t pxmap, Pixmap_t mask = 0) const
           virtual TClass* IsA() const
              virtual void Print(Option_t* option = "") const
              virtual void ShowMembers(TMemberInspector& insp, char* parent)
              virtual void Streamer(TBuffer& b)
                      void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

          const TGClient* fClient   client for which we keep icon pool
                  TString fPath     icon search path
              THashTable* fPicList  hash table containing the icons

## Class Description

     TGPicture & TGPicturePool

     The TGPicture class implements pictures and icons used in the
     different GUI elements and widgets. The TGPicturePool class
     implements a TGPicture cache. TGPictures are created, managed and
     destroyed by the TGPicturePool.

const TGPicture* GetPicture(const char *name)

     Get a picture from the picture pool. Picture must be freed using
     TGPicturePool::FreePicture(). If picture is not found 0 is returned.

const TGPicture* GetPicture(const char *name, UInt_t new_width, UInt_t new_height)

     Get picture with specified size from pool (picture will be scaled if
     necessary). Picture must be freed using TGPicturePool::FreePicture(). If
     picture is not found 0 is returned.

const TGPicture* GetPicture(const char *name, Pixmap_t pxmap, Pixmap_t mask)

     Get picture with specified pixmap and mask from pool.
     Picture must be freed using TGPicturePool::FreePicture().
     If picture is not found 0 is returned.

const TGPicture* GetPicture(const char *name, char **xpm)

     Create picture from XPM data.
     Picture must be freed using TGPicturePool::FreePicture().
     If picture creation failed 0 is returned.

void FreePicture(const TGPicture *fpic)

     Remove picture from cache if nobody is using it anymore.

~TGPicturePool()

     Delete picture cache.

void Print(Option_t *) const

     List all pictures in the pool.

### Inline Functions

            TGPicturePool TGPicturePool(const TGClient* client, const char* path)
              const char* GetPath() const
                  TClass* Class()
                  TClass* IsA() const
                     void ShowMembers(TMemberInspector& insp, char* parent)
                     void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)
            TGPicturePool TGPicturePool(const TGPicturePool&)

Author: Fons Rademakers 01/01/98
Last update: root/gui:$Name: $:$Id: TGPicture.cxx,v 1.24 2005/06/26 23:37:27 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *