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