Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGResourcePool.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/gui:$Id$
0002 // Author: Fons Rademakers   19/5/2003
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGResourcePool
0013 #define ROOT_TGResourcePool
0014 
0015 
0016 #include "TGObject.h"
0017 
0018 class TGClient;
0019 class TGFontPool;
0020 class TGFont;
0021 class TGGCPool;
0022 class TGGC;
0023 class TGPicturePool;
0024 class TGPicture;
0025 class TGMimeTypes;
0026 
0027 
0028 class TGResourcePool : public TGObject {
0029 
0030 private:
0031    Pixel_t          fBackColor;        ///< default background color
0032    Pixel_t          fForeColor;        ///< default foreground color
0033    Pixel_t          fHilite;           ///< default highlight color
0034    Pixel_t          fShadow;           ///< default shadow color
0035    Pixel_t          fHighLightColor;   ///< highlight color
0036    Pixel_t          fSelBackColor;     ///< default selection background color
0037    Pixel_t          fSelForeColor;     ///< default selection foreground color
0038    Pixel_t          fDocBackColor;     ///< default document background color
0039    Pixel_t          fDocForeColor;     ///< default document foreground color
0040    Pixel_t          fTipBackColor;     ///< default tip background color
0041    Pixel_t          fTipForeColor;     ///< default tip foreground color
0042    Pixel_t          fWhite;            ///< white color index
0043    Pixel_t          fBlack;            ///< black color index
0044 
0045    TGFontPool      *fFontPool;         ///< font pool manager
0046 
0047    TGFont          *fDefaultFont;      ///< default font
0048    TGFont          *fMenuFont;         ///< menu font
0049    TGFont          *fMenuHiFont;       ///< menu highlight font
0050    TGFont          *fDocFixedFont;     ///< document fixed font
0051    TGFont          *fDocPropFont;      ///< document proportional font
0052    TGFont          *fIconFont;         ///< icon font
0053    TGFont          *fStatusFont;       ///< status bar font
0054 
0055    TGPicturePool   *fPicturePool;        ///< picture pool manager
0056 
0057    const TGPicture *fDefaultBackPicture;    ///< default background picture
0058    const TGPicture *fDefaultDocBackPicture; ///< default document background picture
0059 
0060    TGGCPool        *fGCPool;           ///< graphics drawing context pool manager
0061 
0062    TGGC            *fWhiteGC;          ///< white gc
0063    TGGC            *fBlackGC;          ///< black gc
0064    TGGC            *fFrameGC;          ///< frame gc
0065    TGGC            *fBckgndGC;         ///< frame background gc
0066    TGGC            *fHiliteGC;         ///< frame hilite gc
0067    TGGC            *fShadowGC;         ///< frame shadow gc
0068    TGGC            *fFocusGC;          ///< frame focus gc
0069    TGGC            *fDocGC;            ///< document gc
0070    TGGC            *fDocbgndGC;        ///< document background gc
0071    TGGC            *fSelGC;            ///< selection gc
0072    TGGC            *fSelbgndGC;        ///< selection background gc
0073    TGGC            *fTipGC;            ///< tooltip gc
0074 
0075    Pixmap_t        fCheckered;         ///< checkered pixmap
0076    Pixmap_t        fCheckeredBitmap;   ///< checkered bitmap
0077 
0078    Cursor_t        fDefaultCursor;     ///< default cursor
0079    Cursor_t        fGrabCursor;        ///< grab cursor
0080    Cursor_t        fTextCursor;        ///< text cursor
0081    Cursor_t        fWaitCursor;        ///< wait cursor
0082 
0083    Colormap_t      fDefaultColormap;   ///< default colormap
0084 
0085    Atom_t          fClipboardAtom;     ///< handle to clipboard
0086 
0087    TGMimeTypes    *fMimeTypeList;      ///< list of mime types
0088 
0089 public:
0090    TGResourcePool(TGClient *client);
0091    ~TGResourcePool() override;
0092 
0093    TGGCPool       *GetGCPool() const { return fGCPool; }
0094    TGFontPool     *GetFontPool() const { return fFontPool; }
0095    TGPicturePool  *GetPicturePool() const { return fPicturePool; }
0096 
0097    //--- inline functions:
0098 
0099    // Color values...
0100 
0101    Pixel_t GetWhiteColor()        const { return fWhite; }
0102    Pixel_t GetBlackColor()        const { return fBlack; }
0103 
0104    Pixel_t GetFrameFgndColor()    const { return fForeColor; }
0105    Pixel_t GetFrameBgndColor()    const { return fBackColor; }
0106    Pixel_t GetFrameHiliteColor()  const { return fHilite; }
0107    Pixel_t GetFrameShadowColor()  const { return fShadow; }
0108 
0109    Pixel_t GetHighLightColor()    const { return fHighLightColor; }
0110 
0111    Pixel_t GetDocumentFgndColor() const { return fDocForeColor; }
0112    Pixel_t GetDocumentBgndColor() const { return fDocBackColor; }
0113 
0114    Pixel_t GetSelectedFgndColor() const { return fSelForeColor; }
0115    Pixel_t GetSelectedBgndColor() const { return fSelBackColor; }
0116 
0117    Pixel_t GetTipFgndColor()      const { return fTipForeColor; }
0118    Pixel_t GetTipBgndColor()      const { return fTipBackColor; }
0119 
0120    // Fonts...
0121 
0122    const TGFont *GetDefaultFont()       const { return fDefaultFont; }
0123    const TGFont *GetMenuFont()          const { return fMenuFont; }
0124    const TGFont *GetMenuHiliteFont()    const { return fMenuHiFont; }
0125    const TGFont *GetDocumentFixedFont() const { return fDocFixedFont; }
0126    const TGFont *GetDocumentPropFont()  const { return fDocPropFont; }
0127    const TGFont *GetIconFont()          const { return fIconFont; }
0128    const TGFont *GetStatusFont()        const { return fStatusFont; }
0129 
0130    // GCs...
0131 
0132    const TGGC *GetWhiteGC()          const { return fWhiteGC; }
0133    const TGGC *GetBlackGC()          const { return fBlackGC; }
0134 
0135    const TGGC *GetFrameGC()          const { return fFrameGC; }
0136    const TGGC *GetFrameBckgndGC()    const { return fBckgndGC; }
0137    const TGGC *GetFrameHiliteGC()    const { return fHiliteGC; }
0138    const TGGC *GetFrameShadowGC()    const { return fShadowGC; }
0139    const TGGC *GetFocusHiliteGC()    const { return fFocusGC; }
0140 
0141    const TGGC *GetDocumentGC()       const { return fDocGC; }
0142    const TGGC *GetDocumentBckgndGC() const { return fDocbgndGC; }
0143 
0144    const TGGC *GetSelectedGC()       const { return fSelGC; }
0145    const TGGC *GetSelectedBckgndGC() const { return fSelbgndGC; }
0146 
0147    const TGGC *GetTipGC()            const { return fTipGC; }
0148 
0149    // Pixmaps...
0150 
0151    Pixmap_t GetCheckeredPixmap() const { return fCheckered; }
0152    Pixmap_t GetCheckeredBitmap() const { return fCheckeredBitmap; }
0153 
0154    const TGPicture *GetFrameBckgndPicture() const
0155          { return fDefaultBackPicture; }
0156    const TGPicture *GetDocumentBckgndPicture() const
0157          { return fDefaultDocBackPicture; }
0158 
0159    // Cursors...
0160 
0161    Cursor_t GetDefaultCursor() const { return fDefaultCursor; }
0162    Cursor_t GetGrabCursor()    const { return fGrabCursor; }
0163    Cursor_t GetTextCursor()    const { return fTextCursor; }
0164    Cursor_t GetWaitCursor()    const { return fWaitCursor; }
0165 
0166    // Colormaps...
0167 
0168    Colormap_t GetDefaultColormap() const { return fDefaultColormap; }
0169 
0170    // Miscellaneous...
0171 
0172    TGMimeTypes *GetMimeTypes() const { return fMimeTypeList; }
0173 
0174    Atom_t       GetClipboard() const { return fClipboardAtom; }
0175 
0176    ClassDefOverride(TGResourcePool,0)  // Graphics resource pool
0177 };
0178 
0179 #endif