library: libGui #include "TGGC.h"

# TGGCPool

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

## class TGGCPool : public TGObject

| Inheritance Chart:

`TObject`

<-

`TGObject`

<-

`TGGCPool`

        private:

           void ForceFreeGC(const TGGC* gc)
          Int_t MatchGC(const TGGC* gc, GCValues_t* values)
           void UpdateGC(TGGC* gc, GCValues_t* values)

        public:

                          TGGCPool(TGClient* client)
                          TGGCPool(const TGGCPool&)
                  virtual ~TGGCPool()
           static TClass* Class()
                    TGGC* FindGC(const TGGC* gc)
                    TGGC* FindGC(GContext_t gc)
                     void FreeGC(const TGGC* gc)
                     void FreeGC(GContext_t gc)
                    TGGC* GetGC(GCValues_t* values, Bool_t rw = kFALSE)
                    TGGC* GetGC(GContext_t gct)
          virtual TClass* IsA() const
                TGGCPool& operator=(const TGGCPool&)
             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

        private:

          THashTable* fList  hash table of graphics contexts in pool

## Class Description

     TGGC and TGGCPool

     Encapsulate a graphics context used in the low level graphics.
     TGGCPool provides a pool of graphics contexts.

TGGCPool(TGClient *client)

     Create graphics context pool.

~TGGCPool()

     Delete graphics context pool.

void ForceFreeGC(const TGGC *gct)

     Force remove graphics context from list. Is only called via ~TGGC().

void FreeGC(const TGGC *gct)

     Delete graphics context if it is not used anymore.

void FreeGC(GContext_t gct)

     Delete graphics context if it is not used anymore.

TGGC* FindGC(const TGGC *gct)

     Find graphics context. Returns 0 in case gc is not found.

TGGC* FindGC(GContext_t gct)

     Find graphics context based on its GContext_t handle. Returns 0
     in case gc is not found.

TGGC* GetGC(GContext_t gct)

     returns graphics context based on its GContext_t handle.

TGGC* GetGC(GCValues_t *values, Bool_t rw)

     Get the best matching graphics context depending on values.
     If rw is false only a readonly, not modifiable graphics context
     is returned. If rw is true a new modifiable graphics context is
     returned.

Int_t MatchGC(const TGGC *gc, GCValues_t *values)

     Try to find matching graphics context. On success returns the amount
     of matching bits (which may be zero if masks have no common bits),
     -1 on failure (when there are common bits but not a single match).

void UpdateGC(TGGC *gc, GCValues_t *values)

     Update graphics context with the values spcified in values->fMask.

void Print(Option_t *) const

     List all graphics contexts in the pool.

### Inline Functions

                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
               TGGCPool TGGCPool(const TGGCPool&)
              TGGCPool& operator=(const TGGCPool&)

Author: Fons Rademakers 20/9/2000
Last update: root/gui:$Name: $:$Id: TGGC.cxx,v 1.11 2004/09/06 14:12:51 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *