]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: gauge.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Created: 01/02/97 | |
6 | // Id: | |
7 | // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | ||
12 | #ifndef __GTKGAUGEH__ | |
13 | #define __GTKGAUGEH__ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface | |
17 | #endif | |
18 | ||
19 | #include "wx/defs.h" | |
20 | #include "wx/object.h" | |
21 | #include "wx/list.h" | |
22 | #include "wx/control.h" | |
23 | ||
24 | //----------------------------------------------------------------------------- | |
25 | // classes | |
26 | //----------------------------------------------------------------------------- | |
27 | ||
28 | class wxGauge; | |
29 | ||
1a56f55c RR |
30 | //----------------------------------------------------------------------------- |
31 | // global data | |
32 | //----------------------------------------------------------------------------- | |
33 | ||
34 | extern const char* wxGaugeNameStr; | |
35 | ||
c801d85f KB |
36 | //----------------------------------------------------------------------------- |
37 | // wxGaugeBox | |
38 | //----------------------------------------------------------------------------- | |
39 | ||
1a56f55c RR |
40 | class wxGauge: public wxControl |
41 | { | |
42 | DECLARE_DYNAMIC_CLASS(wxGauge) | |
43 | ||
44 | public: | |
45 | inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; } | |
46 | ||
debe6624 JS |
47 | inline wxGauge(wxWindow *parent, wxWindowID id, |
48 | int range, | |
1a56f55c RR |
49 | const wxPoint& pos = wxDefaultPosition, |
50 | const wxSize& size = wxDefaultSize, | |
debe6624 | 51 | long style = wxGA_HORIZONTAL, |
1a56f55c RR |
52 | const wxString& name = wxGaugeNameStr) |
53 | { | |
54 | Create(parent, id, range, pos, size, style, name); | |
55 | }; | |
56 | ||
debe6624 JS |
57 | bool Create(wxWindow *parent, wxWindowID id, |
58 | int range, | |
1a56f55c RR |
59 | const wxPoint& pos = wxDefaultPosition, |
60 | const wxSize& size = wxDefaultSize, | |
debe6624 | 61 | long style = wxGA_HORIZONTAL, |
1a56f55c RR |
62 | const wxString& name = wxGaugeNameStr ); |
63 | ||
debe6624 JS |
64 | void SetShadowWidth( int WXUNUSED(w) ) {}; |
65 | void SetBezelFace( int WXUNUSED(w) ) {}; | |
66 | void SetRange( int r ); | |
67 | void SetValue( int pos ); | |
1a56f55c RR |
68 | int GetShadowWidth(void) const { return 0; }; |
69 | int GetBezelFace(void) const { return 0; }; | |
70 | int GetRange(void) const; | |
71 | int GetValue(void) const; | |
72 | ||
73 | // Are we a Win95/GTK progress bar, or a normal gauge? | |
74 | inline bool GetProgressBar(void) const { return m_useProgressBar; } | |
75 | ||
76 | protected: | |
77 | ||
78 | int m_rangeMax; | |
79 | int m_gaugePos; | |
80 | bool m_useProgressBar; | |
81 | }; | |
82 | ||
c801d85f | 83 | #endif // __GTKGAUGEH__ |