]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/gauge.h
The rounded corners look really dumb at this size.
[wxWidgets.git] / include / wx / msw / gauge.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/gauge.h
3 // Purpose: wxGauge implementation for MSW
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_MSW_GAUGE_H_
12 #define _WX_MSW_GAUGE_H_
13
14 #if wxUSE_GAUGE
15
16 extern WXDLLIMPEXP_DATA_CORE(const char) wxGaugeNameStr[];
17
18 // Group box
19 class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase
20 {
21 public:
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)
32 {
33 (void)Create(parent, id, range, pos, size, style, validator, name);
34 }
35
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);
44
45 // set gauge range/value
46 virtual void SetRange(int range);
47 virtual void SetValue(int pos);
48
49 // overridden base class virtuals
50 virtual bool SetForegroundColour(const wxColour& col);
51 virtual bool SetBackgroundColour(const wxColour& col);
52
53 virtual void Pulse();
54
55 WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
56
57 // returns true if the platform should explicitly apply a theme border
58 virtual bool CanApplyThemeBorder() const { return false; }
59
60 protected:
61 virtual wxSize DoGetBestSize() const;
62
63 private:
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
72 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge)
73 };
74
75 #endif // wxUSE_GAUGE
76
77 #endif // _WX_MSW_GAUGE_H_