]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/gauge.h
1) APPCONF_ constants renamed to wxCONFIG_
[wxWidgets.git] / include / wx / gtk / gauge.h
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
30 //-----------------------------------------------------------------------------
31 // global data
32 //-----------------------------------------------------------------------------
33
34 extern const char* wxGaugeNameStr;
35
36 //-----------------------------------------------------------------------------
37 // wxGaugeBox
38 //-----------------------------------------------------------------------------
39
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
47 inline wxGauge(wxWindow *parent, wxWindowID id,
48 int range,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxGA_HORIZONTAL,
52 const wxString& name = wxGaugeNameStr)
53 {
54 Create(parent, id, range, pos, size, style, name);
55 };
56
57 bool Create(wxWindow *parent, wxWindowID id,
58 int range,
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& size = wxDefaultSize,
61 long style = wxGA_HORIZONTAL,
62 const wxString& name = wxGaugeNameStr );
63
64 void SetShadowWidth( int WXUNUSED(w) ) {};
65 void SetBezelFace( int WXUNUSED(w) ) {};
66 void SetRange( int r );
67 void SetValue( int pos );
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
83 #endif // __GTKGAUGEH__