81 wattr.fBitGravity = 5;
82 wattr.fWinGravity = 1;
268 static TGGC *gc1 = 0;
269 static TGGC *gc2 = 0;
273 gc1 =
new TGGC(*gc1);
280 gc2 =
new TGGC(*gc2);
467 TGFont *ufont =
fClient->GetResourcePool()->GetFontPool()->FindFont(
fFont->GetFontStruct());
470 parFont.
Form(
"ufont->GetFontStruct()");
476 parGC.
Form(
"uGC->GetGC()");
485 out <<
" TGLabel *" <<
GetName() <<
" = new TGLabel("<<
fParent->GetName()
488 out <<
"," << parGC <<
"," << parFont << extra_args;
490 out <<
", " << parGC;
493 if (option && strstr(option,
"keep_names"))
494 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
497 out <<
" " <<
GetName() <<
"->Disable();\n";
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.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
const char Option_t
Option string (const char).
Encapsulate fonts used in the GUI system.
void SavePrimitive(std::ostream &out, Option_t *="") override
Save the used font as a C++ statement(s) on output stream out.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
TGFrame(const TGFrame &)=delete
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.
virtual UInt_t GetOptions() const
static const TGGC & GetShadowGC()
Get shadow color graphics context.
TString SaveCtorArgs(std::ostream &out, UInt_t dflt_options=kChildFrame, Bool_t check_white_pixel=kFALSE)
Return options and custom color as constructor args Used in the SavePrimitive methods,...
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.
Pixel_t GetForeground() const
void SetForeground(Pixel_t v)
Set foreground color.
const GCValues_t * GetAttributes() const
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.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
const char * GetString() const
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.
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
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