]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/palmos/gauge.h | |
3 | // Purpose: wxGauge class | |
4 | // Author: William Osborne - minimal working wxPalmOS port | |
5 | // Modified by: | |
6 | // Created: 10/13/04 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) William Osborne | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _GAUGE_H_ | |
13 | #define _GAUGE_H_ | |
14 | ||
15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) | |
16 | #pragma interface "gauge95.h" | |
17 | #endif | |
18 | ||
19 | #if wxUSE_GAUGE | |
20 | ||
21 | WXDLLEXPORT_DATA(extern const wxChar*) wxGaugeNameStr; | |
22 | ||
23 | // Group box | |
24 | class WXDLLEXPORT wxGauge : public wxGaugeBase | |
25 | { | |
26 | public: | |
27 | wxGauge() { } | |
28 | ||
29 | wxGauge(wxWindow *parent, | |
30 | wxWindowID id, | |
31 | int range, | |
32 | const wxPoint& pos = wxDefaultPosition, | |
33 | const wxSize& size = wxDefaultSize, | |
34 | long style = wxGA_HORIZONTAL, | |
35 | const wxValidator& validator = wxDefaultValidator, | |
36 | const wxString& name = wxGaugeNameStr) | |
37 | { | |
38 | (void)Create(parent, id, range, pos, size, style, validator, name); | |
39 | } | |
40 | ||
41 | bool Create(wxWindow *parent, | |
42 | wxWindowID id, | |
43 | int range, | |
44 | const wxPoint& pos = wxDefaultPosition, | |
45 | const wxSize& size = wxDefaultSize, | |
46 | long style = wxGA_HORIZONTAL, | |
47 | const wxValidator& validator = wxDefaultValidator, | |
48 | const wxString& name = wxGaugeNameStr); | |
49 | ||
50 | // set gauge range/value | |
51 | virtual void SetRange(int range); | |
52 | virtual void SetValue(int pos); | |
53 | ||
54 | // overriden base class virtuals | |
55 | virtual bool SetForegroundColour(const wxColour& col); | |
56 | virtual bool SetBackgroundColour(const wxColour& col); | |
57 | ||
58 | protected: | |
59 | virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; | |
60 | virtual wxSize DoGetBestSize() const; | |
61 | ||
62 | ||
63 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge) | |
64 | }; | |
65 | ||
66 | #endif // wxUSE_GAUGE | |
67 | ||
68 | #endif | |
69 | // _GAUGE_H_ |