]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/gauge.h
259b5616747df764a44d0811175d81adfb111c39
[wxWidgets.git] / include / wx / cocoa / gauge.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/gauge.h
3 // Purpose: wxGauge class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/07/15
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_GAUGE_H__
13 #define __WX_COCOA_GAUGE_H__
14
15 // #include "wx/cocoa/NSProgressIndicator.h"
16
17 // ========================================================================
18 // wxGauge
19 // ========================================================================
20 class WXDLLEXPORT wxGauge: public wxGaugeBase// , protected wxCocoaNSProgressIndicator
21 {
22 DECLARE_DYNAMIC_CLASS(wxGauge)
23 DECLARE_EVENT_TABLE()
24 // WX_DECLARE_COCOA_OWNER(NSProgressIndicator,NSView,NSView)
25 // ------------------------------------------------------------------------
26 // initialization
27 // ------------------------------------------------------------------------
28 public:
29 wxGauge() { }
30 wxGauge(wxWindow *parent, wxWindowID winid, 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)
36 {
37 Create(parent, winid, range, pos, size, style, validator, name);
38 }
39
40 bool Create(wxWindow *parent, wxWindowID winid, int range,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = wxSL_HORIZONTAL,
44 const wxValidator& validator = wxDefaultValidator,
45 const wxString& name = wxGaugeNameStr);
46 virtual ~wxGauge();
47
48 // ------------------------------------------------------------------------
49 // Cocoa callbacks
50 // ------------------------------------------------------------------------
51 protected:
52 // NSProgressIndicator cannot be enabled/disabled
53 virtual void CocoaSetEnabled(bool enable) { }
54 // ------------------------------------------------------------------------
55 // Implementation
56 // ------------------------------------------------------------------------
57 public:
58 // Pure Virtuals
59 virtual int GetValue() const { return 0; }
60 virtual void SetValue(int value) { }
61
62 // retrieve/change the range
63 virtual void SetRange(int maxValue) { }
64 int GetRange(void) const { return 0; }
65 };
66
67 #endif // __WX_COCOA_GAUGE_H__