A gauge is a horizontal or vertical bar which shows the progress of some operation, or perhaps an amount of something.
Use SetValue to set the value of the gauge. You can use wxItem::SetButtonColour and wxItem::SetBackgroundColour to set the gauge value and background colours respectively.
Note that wxWindows support for wxGauge is off by default; to enable it, the file wx_setup.h must be edited, and the gauge code in contrib/gauge (for Windows) and contrib/xmgauge (for Motif) must be compiled.
wxGauge::wxGauge
wxGauge::~wxGauge
wxGauge::Create
wxGauge::GetBezelFace
wxGauge::GetRange
wxGauge::GetValue
wxGauge::SetBezelFace
wxGauge::SetRange
wxGauge::SetShadowWidth
wxGauge::SetValue
void wxGauge(void)
Constructor, for deriving classes.
void wxGauge(wxPanel *parent, char *label,
int range, int x = -1, int y = -1,
int width = -1, int height = -1,
long style = wxHORIZONTAL, char *name = "gauge")
Constructor, creating and showing a gauge.
If label is non-NULL, it will be used as the gauge label.
range is an integer specifying the number of units the guage is divided into.
The parameters x and y are used to specify an absolute position, or a position after the previous panel item if omitted or default.
If width or height are omitted (or are less than zero), an appropriate size will be used for the gauge.
style may be a bit list of the following:
wxGA_HORIZONTAL | Creates a horizontal gauge. |
wxGA_VERTICAL | Creates a vertical gauge. |
wxGA_PROGRESSBAR | Under Windows 95, creates a horizontal progress bar. |
The name parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual gauges.
void ~wxGauge(void)
Destructor, destroying the gauge.
Bool Create(wxPanel *parent, char *label,
int range, int x = -1, int y = -1,
int width = -1, int height = -1,
long style = wxHORIZONTAL, char *name = "gauge")
Creates the gauge for two-step construction. Derived classes should call or replace this function. See wxGauge::wxGauge for further details.
int GetBezelFace(void)
Returns the width of the 3D bezel face.
int GetRange(void)
Returns the maximum position of the gauge.
int GetValue(void)
Returns the current position of the gauge.
void SetBezelFace(int width)
Sets the 3D bezel face width.
void SetRange(int range)
Sets the range of the gauge.
void SetShadowWidth(int width)
Sets the 3D shadow width.
void SetValue(int pos)
Sets the position of the gauge.