269 static TGGC *gc1 = 0;
270 static TGGC *gc2 = 0;
274 gc1 =
new TGGC(*gc1);
281 gc2 =
new TGGC(*gc2);
466 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
467 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
473 parFont.
Form(
"ufont->GetFontStruct()");
479 parGC.
Form(
"uGC->GetGC()");
491 <<
"," << quote << label << quote;
496 out <<
");" << std::endl;
498 out <<
"," << parGC.
Data() <<
");" << std::endl;
501 out <<
"," << parGC.
Data() <<
"," << parFont.
Data() <<
");" << std::endl;
509 if (option && strstr(option,
"keep_names"))
510 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
513 out <<
" " <<
GetName() <<
"->Disable();" << std::endl;
const Mask_t kWABitGravity
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
const Mask_t kWAWinGravity
Handle_t GContext_t
Graphics context handle.
Handle_t FontStruct_t
Pointer to font structure.
ULong_t Pixel_t
Pixel value.
The color creation and management class.
ULong_t GetPixel() const
Return pixel value corresponding to this color.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
const TGResourcePool * GetResourcePool() const
void FreeFont(const TGFont *font)
Free a font.
TGGCPool * GetGCPool() const
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
TGFontPool * GetFontPool() const
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get the specified font.
void FreeFont(const TGFont *font)
Free font. If ref count is 0 delete font.
TGFont * FindFont(FontStruct_t font) const
Find font based on its font struct. Returns 0 if font is not found.
Encapsulate fonts used in the GUI system.
FontStruct_t GetFontStruct() const
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
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.
FontH_t GetFontHandle() const
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
virtual void DoRedraw()
Redraw the frame.
static Pixel_t GetWhitePixel()
Get white pixel value.
UInt_t fHeight
frame height
static const TGGC & GetHilightGC()
Get highlight color graphics context.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Pixel_t fBackground
frame background color
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
Encapsulate a graphics context used in the low level graphics.
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
void SetFont(FontH_t v)
Set font.
Pixel_t GetForeground() const
void SetForeground(Pixel_t v)
Set foreground color.
const GCValues_t * GetAttributes() const
This class handles GUI labels.
virtual ~TGLabel()
Delete label.
void SetTextJustify(Int_t tmode)
Set text justification.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
Int_t f3DStyle
3D style (0 - normal, kRaisedFrame - raised, kSunkenFrame - sunken)
TGLabel(const TGLabel &)=delete
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).
Bool_t fDisabled
if kTRUE label looks disabled (shaded text)
static const TGGC * fgDefaultGC
GContext_t fNormGC
graphics context used for drawing label
Int_t GetTextJustify() const
virtual void Layout()
Layout label.
virtual void DoRedraw()
Redraw label widget.
virtual void SetText(TGString *newText)
Set new text in label.
static const TGGC & GetDefaultGC()
Static returning label default graphics context.
Bool_t fHasOwnFont
kTRUE - font defined locally, kFALSE - globally
Int_t fMRight
margin right
TGFont * fFont
font to draw label
UInt_t fTHeight
text height
Int_t fWrapLength
wrap length
static FontStruct_t GetDefaultFontStruct()
Static returning label default font struct.
Int_t fTMode
text alignment
Bool_t fTextChanged
has text changed
static const TGFont * fgDefaultFont
virtual TGDimension GetDefaultSize() const
Return default size.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a label widget as a C++ statement(s) on output stream out.
Int_t fMBottom
margin bottom
virtual void SetTextFont(TGFont *font, Bool_t global=kFALSE)
Changes text font specified by pointer to TGFont object.
Int_t fTFlags
text flags (see TGFont.h ETextLayoutFlags)
TGTextLayout * fTLayout
text layout
const TGString * GetText() const
TGString * fText
label text
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
TGFontPool * GetFontPool() const
TGGCPool * GetGCPool() const
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
const char * GetString() const
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.
ROOT GUI Window base class.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
const TGWindow * fParent
Parent window.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Graphics context structure.
Attributes that can be used when creating or changing a window.
Mask_t fMask
bit mask specifying which fields are valid
Int_t fWinGravity
one of the window gravity values
Int_t fBitGravity
one of bit gravity values