library: libGui
#include "TGLabel.h"

TGLabel


class description - header file - source file - inheritance tree (.pdf)

class TGLabel : public TGFrame

Inheritance Chart:
TObject
<-
TGObject
<-
TGWindow
TQObject
<-
TGFrame
<-
TGLabel

    protected:
TGLabel(const TGLabel&) virtual void DoRedraw() TGLabel& operator=(const TGLabel&) 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 = 0, const char* text = "0", GContext_t norm = GetDefaultGC()(), FontStruct_t font = GetDefaultFontStruct(), UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground()) virtual ~TGLabel() virtual void ChangeText(const char* newText) static TClass* Class() virtual void Disable(Bool_t on = kTRUE) virtual void Enable() static FontStruct_t GetDefaultFontStruct() static const TGGC& GetDefaultGC() virtual TGDimension GetDefaultSize() const FontStruct_t GetFontStruct() const GContext_t GetNormGC() const const TGString* GetText() const Int_t GetTextJustify() const virtual const char* GetTitle() const Bool_t HasOwnFont() const virtual TClass* IsA() const Bool_t IsDisabled() const virtual void SavePrimitive(ostream& out, Option_t* option = "") virtual void SetForegroundColor(Pixel_t fore) virtual void SetText(TGString* newText) void SetText(const char* newText) void SetText(Int_t number) virtual void SetTextColor(Pixel_t color, Bool_t global = kFALSE) virtual void SetTextColor(TColor* color, Bool_t global = kFALSE) virtual void SetTextFont(TGFont* font, Bool_t global = kFALSE) virtual void SetTextFont(FontStruct_t font, Bool_t global = kFALSE) virtual void SetTextFont(const char* fontName, Bool_t global = kFALSE) void SetTextJustify(Int_t tmode) virtual void SetTitle(const char* label) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
TGString* fText label text UInt_t fTWidth text width UInt_t fTHeight text height Int_t fTMode text justify Bool_t fTextChanged has text changed GContext_t fNormGC graphics context used for drawing label FontStruct_t fFontStruct font to draw label Bool_t fHasOwnFont kTRUE - font defined locally, kFALSE - globally Bool_t fDisabled if kTRUE label looks disabled (shaded text) static const TGFont* fgDefaultFont static const TGGC* fgDefaultGC

Class Description

                                                                      
 TGLabel                                                              
                                                                      
 This class handles GUI labels.                                       
                                                                      

TGLabel(const TGWindow *p, TGString *text, GContext_t norm, FontStruct_t font, UInt_t options, ULong_t 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)
 Create a label GUI object.
TGLabel(const TGLabel& gl)
copy constructor
TGLabel& operator=(const TGLabel& gl)
assignment operator
~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.
void SetTextFont(FontStruct_t font, Bool_t global)
 Changes text font.
 If global is true font is changed globally - otherwise locally.
void SetTextFont(const char *fontName, Bool_t global)
 Changes text font specified by name.
 If global is true font is changed globally - otherwise locally.
void SetTextFont(TGFont *font, Bool_t global)
 Changes text font specified by pointer to TGFont object.
 If global is true font is changed globally - otherwise locally.
void SetTextColor(Pixel_t color, Bool_t global)
 Changes text color.
 If global is true color is changed globally - otherwise locally.
void SetTextColor(TColor *color, Bool_t global)
 Changes text color.
 If global is true color is changed globally - otherwise locally.
void SetTextJustify(Int_t mode)
 Set text justification. Mode is an OR of the bits:
 kTextTop, kTextLeft, kTextLeft, kTextRight, kTextCenterX and
 kTextCenterY.
Bool_t HasOwnFont()
 Returns kTRUE if text attributes are unique.
 Returns kFALSE if text attributes are shared (global).
void SavePrimitive(ostream &out, Option_t *option /*= ""*/)
 Save a label widget as a C++ statement(s) on output stream out.
FontStruct_t GetDefaultFontStruct()
 Static returning label default font struct.
const TGGC & GetDefaultGC()
 Static returning label default graphics context.
TGDimension GetDefaultSize()
void SetText(TGString *newText)
void SetText(const char *newText)
void ChangeText(const char *newText)
void SetTitle(const char *label)
Int_t GetTextJustify()
void SetForegroundColor(Pixel_t fore)
void Disable(Bool_t on = kTRUE)
void Enable()
Bool_t IsDisabled()
GContext_t GetNormGC()
FontStruct_t GetFontStruct()

Author: Fons Rademakers 06/01/98
Last update: root/gui:$Name: $:$Id: TGLabel.cxx,v 1.28 2006/07/09 05:27:54 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - 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.