|
ROOT
Reference Guide |
|
Go to the documentation of this file.
12 #ifndef ROOT_TGProgressBar
13 #define ROOT_TGProgressBar
80 virtual void Format(
const char *format =
"%.2f");
114 const char *format =
"%.2f");
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.
EFillType fFillType
OPTION={GetMethod="GetFillType";SetMethod="SetFillType";Items=(kSolidFill=Solid",kBlockFill="Block")}
virtual void ShowPos(Bool_t on)
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
ROOT GUI Window base class.
virtual void Reset()
Reset progress bar (i.e. set pos to 0).
void SetPosition(Float_t pos)
Set progress position between [min,max].
Pixel_t GetForeground() const
static const TGFont * fgDefaultFont
const char * Data() const
ULong_t Pixel_t
Pixel value.
Handle_t FontStruct_t
Pointer to font structure.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a vertical progress bar as a C++ statement(s) on output stream out.
Bool_t fPercent
show position in percent (default true)
Float_t fPos
logical position [fMin,fMax]
virtual ~TGVProgressBar()
void SetRange(Float_t min, Float_t max)
Set min and max of progress bar.
TString GetFormat() const
EBarType fBarType
OPTION={GetMethod="GetBarType";SetMethod="SetBarType";Items=(kStandard="Standard",...
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save progress bar parameters as a C++ statement(s) on output stream out.
virtual ~TGHProgressBar()
Handle_t GContext_t
Graphics context handle.
static TGGC * fgDefaultGC
Bool_t UsePercent() const
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void Format(const char *format="%.2f")
Set format for displaying a value.
void SetFillType(EFillType type)
Set fill type.
virtual void Percent(Bool_t on)
TString fFormat
format used to show position not in percent
EBarType GetBarType() const
Encapsulate a graphics context used in the low level graphics.
Pixel_t GetBarColor() const
static const TGGC & GetDefaultGC()
Return default graphics context in use.
Float_t fMax
logical maximum value (default 100)
EFillType GetFillType() const
FontStruct_t GetFontStruct() const
virtual void DoRedraw()
Draw vertical progress bar.
Bool_t fShowPos
show position value (default false)
Float_t GetPosition() const
FontStruct_t fFontStruct
font used to draw position text
virtual void DoRedraw()
Draw horizontal progress bar.
void ShowPosition(Bool_t set=kTRUE, Bool_t percent=kTRUE, const char *format="%.2f")
Show postion text, either in percent or formatted according format.
void SetBarType(EBarType type)
Set bar type.
GContext_t fNormGC
text drawing graphics context
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Int_t fPosPix
position of progress bar in pixel coordinates
The classes in this file implement progress bars.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a horizontal progress bar as a C++ statement(s) on output stream out.
TGClient * fClient
Connection to display server.
@ kProgressBarStandardWidth
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.
#define ClassDef(name, id)
Float_t fMin
logical minimum value (default 0)
TGGC fBarColorGC
progress bar drawing context
Bool_t fDrawBar
if true draw only bar in DoRedraw()
static Pixel_t GetWhitePixel()
Get white pixel value.
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
Int_t fBarWidth
progress bar width
Bool_t GetShowPos() const
UInt_t fHeight
frame height
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)
Constructor.
Encapsulate fonts used in the GUI system.
virtual void DoRedraw()=0
Redraw the frame.
virtual void SetForegroundColor(Pixel_t pixel)
Change text color drawing.
void Increment(Float_t inc)
Increment progress position.
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
GContext_t GetNormGC() const
const char * GetValueFormat() const