61 fMLeft = fMRight = fMTop = fMBottom = 0;
64 norm = GetDefaultGC().GetGC();
69 font = fgDefaultFont->GetFontStruct();
72 fFont = fClient->GetFontPool()->GetFont(font);
73 fTLayout = fFont->ComputeTextLayout(fText->GetString(), fText->GetLength(),
81 gVirtualX->ChangeWindowAttributes(fId, &wattr);
266 static TGGC *gc1 = 0;
267 static TGGC *gc2 = 0;
271 gc1 =
new TGGC(*gc1);
278 gc2 =
new TGGC(*gc2);
463 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
464 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
470 parFont.
Form(
"ufont->GetFontStruct()");
476 parGC.
Form(
"uGC->GetGC()");
488 <<
"," << quote << label << quote;
493 out <<
");" << std::endl;
495 out <<
"," << parGC.
Data() <<
");" << std::endl;
498 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
");" << std::endl;
506 if (option && strstr(option,
"keep_names"))
507 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
510 out <<
" " <<
GetName() <<
"->Disable();" << std::endl;
static FontStruct_t GetDefaultFontStruct()
Static returning label default font struct.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique.
virtual void DrawText(GContext_t gc, Int_t x, Int_t y)
Draw text at position (x, y).
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
TGGCPool * GetGCPool() const
static const TGFont * fgDefaultFont
TGTextLayout * ComputeTextLayout(const char *string, Int_t numChars, Int_t wrapLength, Int_t justify, Int_t flags, UInt_t *width, UInt_t *height) const
Computes the amount of screen space needed to display a multi-line, justified string of text...
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
TString & ReplaceAll(const TString &s1, const TString &s2)
void SetForeground(Pixel_t v)
Set foreground color.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
static Pixel_t GetWhitePixel()
Get white pixel value.
FontH_t GetFontHandle() const
const Mask_t kWABitGravity
virtual void SetTextFont(TGFont *font, Bool_t global=kFALSE)
Changes text font specified by pointer to TGFont object.
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
ULong_t GetPixel() const
Return pixel value corresponding to this color.
const char * Data() const
virtual void DoRedraw()
Redraw the frame.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
virtual void SetText(TGString *newText)
Set new text in label.
static const TGGC & GetDefaultGC()
Static returning label default graphics context.
void DrawText(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t firstChar, Int_t lastChar) const
Use the information in the TGTextLayout object to display a multi-line, justified string of text...
TGFontPool * GetFontPool() const
TGFontPool * GetFontPool() const
void SetFont(FontH_t v)
Set font.
void FreeFont(const TGFont *font)
Free a font.
void FreeFont(const TGFont *font)
Free font. If ref count is 0 delete font.
virtual TGDimension GetDefaultSize() const
Return default size.
virtual void Layout()
Layout label.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Pixel_t GetForeground() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a label widget as a C++ statement(s) on output stream out.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get the specified font.
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
const TGResourcePool * GetResourcePool() const
const Mask_t kWAWinGravity
The color creation and management class.
TGGCPool * GetGCPool() const
void SetTextJustify(Int_t tmode)
Set text justification.
FontStruct_t GetFontStruct() const
TGFont * FindFont(FontStruct_t font) const
Find font based on its font struct. Returns 0 if font is not found.
virtual void DoRedraw()
Redraw label widget.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
const TGString * GetText() const
static const TGGC * fgDefaultGC
float type_of_call hi(const int &, const int &)
const char * GetString() const
double norm(double *x, double *p)
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
Int_t GetTextJustify() const
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
const GCValues_t * GetAttributes() const
virtual void SetWindowName(const char *name=0)
Set window name.
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
virtual ~TGLabel()
Delete label.