249 gc->SetForeground(
hi);
251 gc->SetForeground(sh);
269 static TGGC *gc1 = 0;
270 static TGGC *gc2 = 0;
274 gc1 =
new TGGC(*gc1);
281 gc2 =
new TGGC(*gc2);
374 gc->SetForeground(color);
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;
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.
ULong_t Pixel_t
Pixel value.
Handle_t FontStruct_t
Pointer to font structure.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char forecolor
Option_t Option_t SetTextFont
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint DrawText
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
Option_t Option_t TPoint TPoint const char text
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
void SavePrimitive(std::ostream &out, Option_t *="") override
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,...
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
static Pixel_t GetWhitePixel()
Get white pixel value.
UInt_t fHeight
frame height
void DoRedraw() override
Redraw the frame.
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.
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 SetFont(FontH_t v)
Set font.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save graphics context info as a C++ statement(s) on output stream out.
This class handles GUI labels.
TClass * IsA() const override
void SetTextJustify(Int_t tmode)
Set text justification.
void Layout() override
Layout label.
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)
~TGLabel() override
Delete label.
static const TGGC * fgDefaultGC
GContext_t fNormGC
graphics context used for drawing label
Int_t GetTextJustify() const
void DoRedraw() override
Redraw label widget.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a label widget as a C++ statement(s) on output stream out.
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.
TGDimension GetDefaultSize() const override
Return default size.
Int_t fTMode
text alignment
Bool_t fTextChanged
has text changed
static const TGFont * fgDefaultFont
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.
const TGWindow * fParent
Parent window.
virtual void SetWindowName(const char *name=nullptr)
Set window name.
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
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