X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12f5e1e78fe906050ff2fee9529476db332633f0..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/gauge.h?ds=sidebyside diff --git a/interface/wx/gauge.h b/interface/wx/gauge.h index 2cb391e1b2..1d3b593478 100644 --- a/interface/wx/gauge.h +++ b/interface/wx/gauge.h @@ -2,10 +2,20 @@ // Name: gauge.h // Purpose: interface of wxGauge // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// wxGauge style flags +// ---------------------------------------------------------------------------- + +#define wxGA_HORIZONTAL wxHORIZONTAL +#define wxGA_VERTICAL wxVERTICAL + +// Win32 only, is default (and only) on some other platforms +#define wxGA_SMOOTH 0x0020 + /** @class wxGauge @@ -37,7 +47,7 @@ @library{wxcore} @category{ctrl} - + @appearance{gauge} @see wxSlider, wxScrollBar */ @@ -48,6 +58,7 @@ public: Default constructor. */ wxGauge(); + /** Constructor, creating and showing a gauge. @@ -56,14 +67,17 @@ public: @param id Window identifier. @param range - Integer range (maximum value) of the gauge. It is ignored when the - gauge is used in indeterminate mode. + Integer range (maximum value) of the gauge. + See SetRange() for more details about the meaning of this value + when using the gauge in indeterminate mode. @param pos Window position. @param size Window size. @param style Gauge style. + @param validator + Window validator. @param name Window name. @@ -74,12 +88,12 @@ public: const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "gauge"); + const wxString& name = wxGaugeNameStr); /** Destructor, destroying the gauge. */ - ~wxGauge(); + virtual ~wxGauge(); /** Creates the gauge for two-step construction. See wxGauge() for further @@ -87,10 +101,9 @@ public: */ bool Create(wxWindow* parent, wxWindowID id, int range, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxGA_HORIZONTAL, + const wxSize& size = wxDefaultSize, long style = wxGA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "gauge"); + const wxString& name = wxGaugeNameStr); /** Returns the width of the 3D bezel face. @@ -135,10 +148,10 @@ public: gauge move a bit to indicate the user that some progress has been made. @note After calling this function the value returned by GetValue() is - undefined and thus you need to explicitely call SetValue() if you + undefined and thus you need to explicitly call SetValue() if you want to restore the determinate mode. */ - void Pulse(); + virtual void Pulse(); /** Sets the 3D bezel face width. @@ -154,6 +167,10 @@ public: Sets the range (maximum value) of the gauge. This function makes the gauge switch to determinate mode, if it's not already. + When the gauge is in indeterminate mode, under wxMSW the gauge + repeatedly goes from zero to @a range and back; under other ports + when in indeterminate mode, the @a range setting is ignored. + @see GetRange() */ void SetRange(int range);