TGLabel
class description - source file - inheritance tree
protected:
virtual void DoRedraw()
public:
TGLabel(const TGWindow* p, TGString* text, GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground())
TGLabel(const TGWindow* p, const char* text, GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground())
TGLabel(const TGLabel&)
virtual ~TGLabel()
static TClass* Class()
static FontStruct_t GetDefaultFontStruct()
static const TGGC& GetDefaultGC() const
virtual TGDimension GetDefaultSize() const
const TGString* GetText() const
virtual TClass* IsA() const
Bool_t IsOwnTextFont() const
virtual void SavePrimitive(ofstream& out, Option_t* option)
void SetText(TGString* newText)
void SetText(const char* newText)
void SetText(Int_t number)
virtual void SetTextColor(Pixel_t color, Option_t* opt = "0")
virtual void SetTextColor(TColor* color, Option_t* opt = "0")
virtual void SetTextFont(TGFont* font, Option_t* opt = "0")
virtual void SetTextFont(FontStruct_t font, Option_t* opt = "0")
virtual void SetTextFont(const char* fontName, Option_t* opt = "0")
void SetTextJustify(Int_t tmode)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
protected:
TGString* fText label text
UInt_t fTWidth text width
UInt_t fTHeight text height
Int_t fTMode text drawing mode (ETextJustification)
Bool_t fTextChanged has text changed
GContext_t fNormGC graphics context used for drawing label
FontStruct_t fFontStruct font to draw label
Bool_t fIsOwnFont kTRUE - font defined locally, kFALSE - globally
static const TGFont* fgDefaultFont
static const TGGC* fgDefaultGC
TGLabel
This class handles GUI labels.
TGLabel(const TGWindow *p, TGString *text, GContext_t norm,
FontStruct_t font, UInt_t options, ULong_t back) :
TGFrame(p, 1, 1, options, back)
Create a label GUI object. TGLabel will become the owner of the
text and will delete it in its dtor.
TGLabel(const TGWindow *p, const char *text, GContext_t norm,
FontStruct_t font, UInt_t options, ULong_t back) :
TGFrame(p, 1, 1, options, back)
Create a label GUI object.
~TGLabel()
Delete label.
void SetText(TGString *new_text)
Set new text in label. After calling this method one needs to call
the parents frame's Layout() method to force updating of the label size.
The new_text is adopted by the TGLabel and will be properly deleted.
void DoRedraw()
Redraw label widget.
FontStruct_t GetDefaultFontStruct()
const TGGC& GetDefaultGC()
void SetTextFont(FontStruct_t font, Option_t *opt)
Changes text font
if opt is non-zero font is changed globally
void SetTextFont(const char *fontName, Option_t *opt)
Changes text font specified by name
if opt is non-zero font is changed globally
void SetTextFont(TGFont *font, Option_t *opt)
Changes text font specified bypointer to TGFont object
if opt is non-zero font is changed globally
void SetTextColor(Pixel_t color, Option_t *opt)
Changes text color
if opt is non-zero color is changed globally
void SetTextColor(TColor *color, Option_t *opt)
Changes text color
if opt is non-zero color is changed globally
Bool_t IsOwnTextFont() const
returns kTRUE if text attributes are unique
returns kFALSE if text attributes are shared (global)
void SavePrimitive(ofstream &out, Option_t *option)
Save a label widget as a C++ statement(s) on output stream out
Inline Functions
TGDimension GetDefaultSize() const
const TGString* GetText() const
void SetText(const char* newText)
void SetText(Int_t number)
void SetTextJustify(Int_t tmode)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TGLabel TGLabel(const TGLabel&)
Author: Fons Rademakers 06/01/98
Last update: root/gui:$Name: $:$Id: TGLabel.cxx,v 1.7 2003/12/15 18:04:27 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.