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");
97 TString mime_file =
".root.mimes";
106 mime_file =
"root.mimes";
111 fClient->GetColorByName(
"white", fWhite);
112 fClient->GetColorByName(
"black", fBlack);
113 if (!fClient->GetColorByName(backcolor, fBackColor))
115 if (!fClient->GetColorByName(forecolor, fForeColor))
117 if (!fClient->GetColorByName(highlightcolor, fHighLightColor))
118 fHighLightColor = fWhite;
119 fHilite = fClient->GetHilite(fBackColor);
120 fShadow = fClient->GetShadow(fBackColor);
121 if (!fClient->GetColorByName(selbackcolor, fSelBackColor))
122 fSelBackColor = fBlack;
123 if (!fClient->GetColorByName(selforecolor, fSelForeColor))
124 fSelForeColor = fWhite;
125 if (!fClient->GetColorByName(docbackcolor, fDocBackColor))
126 fDocBackColor = fWhite;
127 if (!fClient->GetColorByName(docforecolor, fDocForeColor))
128 fDocForeColor = fBlack;
129 if (!fClient->GetColorByName(tipbackcolor, fTipBackColor))
130 fTipBackColor = fWhite;
131 if (!fClient->GetColorByName(tipforecolor, fTipForeColor))
132 fTipForeColor = fBlack;
135 fCheckered =
gVirtualX->CreatePixmap(fClient->GetDefaultRoot()->GetId(),
140 fCheckeredBitmap =
gVirtualX->CreatePixmap(fClient->GetDefaultRoot()->GetId(),
150 fDefaultBackPicture = 0;
151 fDefaultDocBackPicture = 0;
152 if (!framebgpixmap.
IsNull())
153 fDefaultBackPicture = fPicturePool->GetPicture(framebgpixmap);
154 if (!docbgpixmap.
IsNull())
155 fDefaultDocBackPicture = fPicturePool->GetPicture(docbgpixmap);
159 fDefaultFont = fFontPool->GetFont(default_font);
160 fMenuFont = fFontPool->GetFont(menu_font);
161 fMenuHiFont = fFontPool->GetFont(menu_hi_font);
162 fDocFixedFont = fFontPool->GetFont(doc_fixed_font);
163 fDocPropFont = fFontPool->GetFont(doc_prop_font);
164 fIconFont = fFontPool->GetFont(icon_font);
165 fStatusFont = fFontPool->GetFont(status_font);
175 gval.
fFont = fDefaultFont->GetFontHandle();
178 fBlackGC = fGCPool->GetGC(&gval,
kTRUE);
181 fWhiteGC = fGCPool->GetGC(&gval,
kTRUE);
184 fHiliteGC = fGCPool->GetGC(&gval,
kTRUE);
187 fShadowGC = fGCPool->GetGC(&gval,
kTRUE);
190 fBckgndGC = fGCPool->GetGC(&gval,
kTRUE);
193 fFrameGC = fGCPool->GetGC(&gval,
kTRUE);
196 fSelbgndGC = fGCPool->GetGC(&gval,
kTRUE);
200 fSelGC = fGCPool->GetGC(&gval,
kTRUE);
202 gval.
fFont = fDocPropFont->GetFontHandle();
205 fDocGC = fGCPool->GetGC(&gval,
kTRUE);
208 fDocbgndGC = fGCPool->GetGC(&gval,
kTRUE);
210 gval.
fFont = fStatusFont->GetFontHandle();
213 fTipGC = fGCPool->GetGC(&gval,
kTRUE);
225 fFocusGC = fGCPool->GetGC(&gval,
kTRUE);
228 fDefaultCursor =
kNone;
234 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.
static const TString & GetIconPath()
Get the icon path in the installation. Static utility function.
virtual ~TGResourcePool()
Cleanup the resource pool...
TGPicturePool * fPicturePool
virtual const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
static unsigned char gray_bits[]
const Mask_t kGCLineWidth
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
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
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
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 ~.
const char * Data() const