]>
Commit | Line | Data |
---|---|---|
9b6dbb09 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: gauge.h | |
3 | // Purpose: wxGauge class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_GAUGE_H_ | |
13 | #define _WX_GAUGE_H_ | |
14 | ||
3399051e | 15 | #if defined(__GNUG__) && !defined(__APPLE__) |
9b6dbb09 JS |
16 | #pragma interface "gauge.h" |
17 | #endif | |
18 | ||
9b6dbb09 JS |
19 | WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr; |
20 | ||
21 | // Group box | |
93e73c74 | 22 | class WXDLLEXPORT wxGauge : public wxGaugeBase |
9b6dbb09 | 23 | { |
bfc6fde4 | 24 | DECLARE_DYNAMIC_CLASS(wxGauge) |
83df96d6 | 25 | |
bfc6fde4 VZ |
26 | public: |
27 | inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; } | |
83df96d6 | 28 | |
bfc6fde4 | 29 | inline wxGauge(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
30 | int range, |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, | |
33 | long style = wxGA_HORIZONTAL, | |
34 | const wxValidator& validator = wxDefaultValidator, | |
35 | const wxString& name = wxGaugeNameStr) | |
bfc6fde4 VZ |
36 | { |
37 | Create(parent, id, range, pos, size, style, validator, name); | |
38 | } | |
83df96d6 | 39 | |
bfc6fde4 | 40 | bool Create(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
41 | int range, |
42 | const wxPoint& pos = wxDefaultPosition, | |
43 | const wxSize& size = wxDefaultSize, | |
44 | long style = wxGA_HORIZONTAL, | |
45 | const wxValidator& validator = wxDefaultValidator, | |
46 | const wxString& name = wxGaugeNameStr); | |
47 | ||
bfc6fde4 | 48 | void SetShadowWidth(int w); |
bfc6fde4 VZ |
49 | void SetRange(int r); |
50 | void SetValue(int pos); | |
83df96d6 | 51 | |
bfc6fde4 | 52 | int GetShadowWidth() const ; |
bfc6fde4 VZ |
53 | int GetRange() const ; |
54 | int GetValue() const ; | |
83df96d6 | 55 | |
bfc6fde4 | 56 | virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ; |
93e73c74 MB |
57 | |
58 | private: | |
59 | virtual wxSize DoGetBestSize() const; | |
60 | virtual void DoMoveWindow(int x, int y, int width, int height); | |
9b6dbb09 JS |
61 | }; |
62 | ||
63 | #endif | |
83df96d6 | 64 | // _WX_GAUGE_H_ |