33 #include "RConfigure.h"
51 0x55, 0xaa, 0x55, 0xaa,
52 0x55, 0xaa, 0x55, 0xaa
64 fDefaultColormap =
gVirtualX->GetColormap();
67 TString default_font =
gEnv->
GetValue(
"Gui.DefaultFont",
"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1");
68 TString menu_font =
gEnv->
GetValue(
"Gui.MenuFont",
"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1");
69 TString menu_hi_font =
gEnv->
GetValue(
"Gui.MenuHiFont",
"-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1");
70 TString doc_fixed_font =
gEnv->
GetValue(
"Gui.DocFixedFont",
"-*-courier-medium-r-*-*-12-*-*-*-*-*-iso8859-1");
71 TString doc_prop_font =
gEnv->
GetValue(
"Gui.DocPropFont",
"-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1");
72 TString icon_font =
gEnv->
GetValue(
"Gui.IconFont",
"-*-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1");
73 TString status_font =
gEnv->
GetValue(
"Gui.StatusFont",
"-*-helvetica-medium-r-*-*-10-*-*-*-*-*-iso8859-1");
95 icon_path +=
gEnv->
GetValue(
"Gui.IconPath", EXTRAICONPATH);
128 fClient->GetColorByName(
"white", fWhite);
129 fClient->GetColorByName(
"black", fBlack);
130 if (!fClient->GetColorByName(backcolor, fBackColor))
132 if (!fClient->GetColorByName(forecolor, fForeColor))
134 if (!fClient->GetColorByName(highlightcolor, fHighLightColor))
135 fHighLightColor = fWhite;
136 fHilite = fClient->GetHilite(fBackColor);
137 fShadow = fClient->GetShadow(fBackColor);
138 if (!fClient->GetColorByName(selbackcolor, fSelBackColor))
139 fSelBackColor = fBlack;
140 if (!fClient->GetColorByName(selforecolor, fSelForeColor))
141 fSelForeColor = fWhite;
142 if (!fClient->GetColorByName(docbackcolor, fDocBackColor))
143 fDocBackColor = fWhite;
144 if (!fClient->GetColorByName(docforecolor, fDocForeColor))
145 fDocForeColor = fBlack;
146 if (!fClient->GetColorByName(tipbackcolor, fTipBackColor))
147 fTipBackColor = fWhite;
148 if (!fClient->GetColorByName(tipforecolor, fTipForeColor))
149 fTipForeColor = fBlack;
152 fCheckered =
gVirtualX->CreatePixmap(fClient->GetDefaultRoot()->GetId(),
157 fCheckeredBitmap =
gVirtualX->CreatePixmap(fClient->GetDefaultRoot()->GetId(),
167 fDefaultBackPicture = 0;
168 fDefaultDocBackPicture = 0;
169 if (!framebgpixmap.
IsNull())
170 fDefaultBackPicture = fPicturePool->GetPicture(framebgpixmap);
171 if (!docbgpixmap.
IsNull())
172 fDefaultDocBackPicture = fPicturePool->GetPicture(docbgpixmap);
176 fDefaultFont = fFontPool->GetFont(default_font);
177 fMenuFont = fFontPool->GetFont(menu_font);
178 fMenuHiFont = fFontPool->GetFont(menu_hi_font);
179 fDocFixedFont = fFontPool->GetFont(doc_fixed_font);
180 fDocPropFont = fFontPool->GetFont(doc_prop_font);
181 fIconFont = fFontPool->GetFont(icon_font);
182 fStatusFont = fFontPool->GetFont(status_font);
192 gval.
fFont = fDefaultFont->GetFontHandle();
195 fBlackGC = fGCPool->GetGC(&gval,
kTRUE);
198 fWhiteGC = fGCPool->GetGC(&gval,
kTRUE);
201 fHiliteGC = fGCPool->GetGC(&gval,
kTRUE);
204 fShadowGC = fGCPool->GetGC(&gval,
kTRUE);
207 fBckgndGC = fGCPool->GetGC(&gval,
kTRUE);
210 fFrameGC = fGCPool->GetGC(&gval,
kTRUE);
213 fSelbgndGC = fGCPool->GetGC(&gval,
kTRUE);
217 fSelGC = fGCPool->GetGC(&gval,
kTRUE);
219 gval.
fFont = fDocPropFont->GetFontHandle();
222 fDocGC = fGCPool->GetGC(&gval,
kTRUE);
225 fDocbgndGC = fGCPool->GetGC(&gval,
kTRUE);
227 gval.
fFont = fStatusFont->GetFontHandle();
230 fTipGC = fGCPool->GetGC(&gval,
kTRUE);
242 fFocusGC = fGCPool->GetGC(&gval,
kTRUE);
245 fDefaultCursor =
kNone;
251 fMimeTypeList =
new TGMimeTypes(fClient, mime_file);
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual ~TGResourcePool()
Cleanup the resource pool...
TGPicturePool * fPicturePool
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
ClassImp(TGResourcePool) TGResourcePool
Create the global GUI resource pool manager.
static unsigned char gray_bits[]
virtual const char * Getenv(const char *env)
Get environment variable.
const Mask_t kGCLineWidth
const Mask_t kGCGraphicsExposures
TGMimeTypes * fMimeTypeList
Bool_t fGraphicsExposures
Pixmap_t fCheckeredBitmap
R__EXTERN TSystem * gSystem
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
const Mask_t kGCFillStyle
const Mask_t kGCForeground
const Mask_t kGCSubwindowMode
const Mask_t kGCBackground
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.