12#ifndef ROOT_TGProgressBar
13#define ROOT_TGProgressBar
92 virtual void Format(
const char *format =
"%.2f");
126 const char *format =
"%.2f");
#define ClassDef(name, id)
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
static Pixel_t GetWhitePixel()
Get white pixel value.
Pixel_t GetForeground() const
TGHProgressBar(const TGWindow *p=0, UInt_t w=4, UInt_t h=kProgressBarTextWidth, Pixel_t back=GetWhitePixel(), Pixel_t barcolor=GetDefaultSelectedBackground(), GContext_t norm=GetDefaultGC()(), FontStruct_t font=GetDefaultFontStruct(), UInt_t options=kDoubleBorder|kSunkenFrame)
Horizontal progress bar constructor.
virtual void DoRedraw()
Draw horizontal progress bar.
virtual ~TGHProgressBar()
void ShowPosition(Bool_t set=kTRUE, Bool_t percent=kTRUE, const char *format="%.2f")
Show postion text, either in percent or formatted according format.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a horizontal progress bar as a C++ statement(s) on output stream out.
static const TGFont * fgDefaultFont
void Increment(Float_t inc)
Increment progress position.
Pixel_t GetBarColor() const
static TGGC * fgDefaultGC
virtual void DoRedraw()=0
Redraw the frame.
@ kProgressBarStandardWidth
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Bool_t UsePercent() const
TGProgressBar(const TGWindow *p, UInt_t w, UInt_t h, Pixel_t back=GetWhitePixel(), Pixel_t barcolor=GetDefaultSelectedBackground(), GContext_t norm=GetDefaultGC()(), FontStruct_t font=GetDefaultFontStruct(), UInt_t options=kDoubleBorder|kSunkenFrame)
Create progress bar.
virtual void SetForegroundColor(Pixel_t pixel)
Change text color drawing.
FontStruct_t GetFontStruct() const
void SetPosition(Float_t pos)
Set progress position between [min,max].
Bool_t GetShowPos() const
TString GetFormat() const
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
virtual void Format(const char *format="%.2f")
Set format for displaying a value.
void SetFillType(EFillType type)
Set fill type.
Float_t GetPosition() const
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
void SetBarType(EBarType type)
Set bar type.
EBarType GetBarType() const
GContext_t GetNormGC() const
const char * GetValueFormat() const
virtual void Percent(Bool_t on)
void SetRange(Float_t min, Float_t max)
Set min and max of progress bar.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save progress bar parameters as a C++ statement(s) on output stream out.
EFillType GetFillType() const
virtual void ShowPos(Bool_t on)
virtual void Reset()
Reset progress bar (i.e. set pos to 0).
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
TGVProgressBar(const TGWindow *p=0, UInt_t w=kProgressBarTextWidth, UInt_t h=4, Pixel_t back=GetWhitePixel(), Pixel_t barcolor=GetDefaultSelectedBackground(), GContext_t norm=GetDefaultGC()(), FontStruct_t font=GetDefaultFontStruct(), UInt_t options=kDoubleBorder|kSunkenFrame)
cconstructor
virtual void DoRedraw()
Draw vertical progress bar.
virtual ~TGVProgressBar()
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a vertical progress bar as a C++ statement(s) on output stream out.
const char * Data() const