]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/gauge.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGauge class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "gauge.h"
19 #include "wx/control.h"
21 WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr
;
24 class WXDLLEXPORT wxGauge
: public wxControl
26 DECLARE_DYNAMIC_CLASS(wxGauge
)
28 inline wxGauge(void) { m_rangeMax
= 0; m_gaugePos
= 0; m_useProgressBar
= FALSE
; }
30 inline wxGauge(wxWindow
*parent
, const wxWindowID id
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
34 const long style
= wxGA_HORIZONTAL
,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxGaugeNameStr
)
38 Create(parent
, id
, range
, pos
, size
, style
, validator
, name
);
41 bool Create(wxWindow
*parent
, const wxWindowID id
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
45 const long style
= wxGA_HORIZONTAL
,
46 const wxValidator
& validator
= wxDefaultValidator
,
47 const wxString
& name
= wxGaugeNameStr
);
49 void SetShadowWidth(const int w
);
50 void SetBezelFace(const int w
);
51 void SetRange(const int r
);
52 void SetValue(const int pos
);
54 int GetShadowWidth(void) const ;
55 int GetBezelFace(void) const ;
56 int GetRange(void) const ;
57 int GetValue(void) const ;
59 void SetForegroundColour(const wxColour
& col
);
60 void SetBackgroundColour(const wxColour
& col
);
62 // Backward compatibility
63 #if WXWIN_COMPATIBILITY
64 inline void SetButtonColour(const wxColour
& col
) { SetForegroundColour(col
); }
67 void SetSize(const int x
, const int y
, const int width
, const int height
, const int sizeFlags
= wxSIZE_AUTO
);
69 // Are we a Win95 progress bar, or a normal gauge?
70 inline bool GetProgressBar(void) const { return m_useProgressBar
; }
72 virtual void Command(wxCommandEvent
& WXUNUSED(event
)) {} ;
77 bool m_useProgressBar
;