]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/gauge.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / msw / gauge.h
CommitLineData
780d37ac 1/////////////////////////////////////////////////////////////////////////////
936f6353
VZ
2// Name: wx/msw/gauge.h
3// Purpose: wxGauge implementation for MSW
780d37ac
JS
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
bbcdf8bc 7// Copyright: (c) Julian Smart
65571936 8// Licence: wxWindows licence
780d37ac
JS
9/////////////////////////////////////////////////////////////////////////////
10
936f6353
VZ
11#ifndef _WX_MSW_GAUGE_H_
12#define _WX_MSW_GAUGE_H_
780d37ac 13
f4998a1c 14#if wxUSE_GAUGE
780d37ac 15
53a2db12 16extern WXDLLIMPEXP_DATA_CORE(const char) wxGaugeNameStr[];
780d37ac
JS
17
18// Group box
53a2db12 19class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase
780d37ac 20{
bfc6fde4 21public:
936f6353
VZ
22 wxGauge() { }
23
24 wxGauge(wxWindow *parent,
25 wxWindowID id,
26 int range,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxGA_HORIZONTAL,
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxGaugeNameStr)
bfc6fde4 32 {
da0f19f8 33 (void)Create(parent, id, range, pos, size, style, validator, name);
bfc6fde4
VZ
34 }
35
da0f19f8
VZ
36 bool Create(wxWindow *parent,
37 wxWindowID id,
38 int range,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxGA_HORIZONTAL,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxGaugeNameStr);
bfc6fde4 44
da0f19f8
VZ
45 // set gauge range/value
46 virtual void SetRange(int range);
47 virtual void SetValue(int pos);
bfc6fde4 48
4c51a665 49 // overridden base class virtuals
da0f19f8
VZ
50 virtual bool SetForegroundColour(const wxColour& col);
51 virtual bool SetBackgroundColour(const wxColour& col);
780d37ac 52
aaaa6070 53 virtual void Pulse();
6f02a879 54
1c3693e8
PC
55 WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
56
a047aff2
JS
57 // returns true if the platform should explicitly apply a theme border
58 virtual bool CanApplyThemeBorder() const { return false; }
59
6f02a879 60protected:
da0f19f8 61 virtual wxSize DoGetBestSize() const;
fc7a2a60 62
aaaa6070
VZ
63private:
64 // returns true if the control is currently in indeterminate (a.k.a.
65 // "marquee") mode
66 bool IsInIndeterminateMode() const;
67
68 // switch to/from indeterminate mode
69 void SetIndeterminateMode();
70 void SetDeterminateMode();
71
936f6353 72 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge)
780d37ac
JS
73};
74
1e6feb95
VZ
75#endif // wxUSE_GAUGE
76
936f6353 77#endif // _WX_MSW_GAUGE_H_