wxgaugea gauge is a horizontal or vertical bar which shows a quantity (often time). wxgauge supports two working modes: determinate and indeterminate progress. the first is the usual working mode (see setvalue and setrange) while the second can be used when the program is doing some processing but you don't know how much progress is being done. in this case, you can periodically call the pulse function to make the progress bar switch to indeterminate mode (graphically it's usually a set of blocks which move or bounce in the bar control). wxgauge supports dynamic switch between these two work modes. there are no user commands for the gauge. derived from
wxcontrol include files <wx/gauge.h> window styles
see also window styles overview. event handling wxgauge is read-only so generates no events. see also members
wxgauge::wxgauge
wxgauge::wxgaugewxgauge() default constructor. wxgauge(wxwindow* parent, wxwindowid id, int range, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxga_horizontal, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "gauge") constructor, creating and showing a gauge. parameters parent
id
range
pos
size
style
name
see also
wxgauge::~wxgauge~wxgauge() destructor, destroying the gauge.
wxgauge::createbool create(wxwindow* parent, wxwindowid id, int range, const wxpoint& pos = wxdefaultposition, const wxsize& size = wxdefaultsize, long style = wxga_horizontal, const wxvalidator& validator = wxdefaultvalidator, const wxstring& name = "gauge") creates the gauge for two-step construction. see wxgauge::wxgauge for further details.
wxgauge::getbezelfaceint getbezelface() const returns the width of the 3d bezel face. remarks this method is not implemented (returns 0) for most platforms. see also
wxgauge::getrangeint getrange() const returns the maximum position of the gauge. see also
wxgauge::getshadowwidthint getshadowwidth() const returns the 3d shadow margin width. remarks this method is not implemented (returns 0) for most platforms. see also
wxgauge::getvalueint getvalue() const returns the current position of the gauge. see also
wxgauge::isverticalbool isvertical() const returns true if the gauge is vertical (has wxga_vertical style) and false otherwise.
wxgauge::setbezelfacevoid setbezelface(int width) sets the 3d bezel face width. remarks this method is not implemented (doesn't do anything) for most platforms. see also
wxgauge::setrangevoid setrange(int range) sets the range (maximum value) of the gauge. this function makes the gauge switch to determinate mode, if it's not already. see also
wxgauge::setshadowwidthvoid setshadowwidth(int width) sets the 3d shadow width. remarks this method is not implemented (doesn't do anything) for most platforms.
wxgauge::setvaluevoid setvalue(int pos) sets the position of the gauge. this function makes the gauge switch to determinate mode, if it's not already. parameters pos
see also
wxgauge::pulsevoid pulse() switch the gauge to indeterminate mode (if required) and makes the gauge move a bit to indicate the user that some progress has been made. note that after calling this function the value returned by getvalue is undefined and thus you need to explicitely call setvalue if you want to restore the determinate mode.
|