]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/gauge.h
Define __VISUALC__ for ICC under Windows again.
[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 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __WX_COCOA_GAUGE_H__
12 #define __WX_COCOA_GAUGE_H__
13
14 // #include "wx/cocoa/NSProgressIndicator.h"
15
16 DECLARE_WXCOCOA_OBJC_CLASS(NSProgressIndicator);
17
18 // ========================================================================
19 // wxGauge
20 // ========================================================================
21 class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase// , protected wxCocoaNSProgressIndicator
22 {
23 DECLARE_DYNAMIC_CLASS(wxGauge)
24 DECLARE_EVENT_TABLE()
25 // WX_DECLARE_COCOA_OWNER(NSProgressIndicator,NSView,NSView)
26 // ------------------------------------------------------------------------
27 // initialization
28 // ------------------------------------------------------------------------
29 public:
30 wxGauge() { }
31 wxGauge(wxWindow *parent, wxWindowID winid, 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 Create(parent, winid, range, pos, size, style, validator, name);
39 }
40
41 bool Create(wxWindow *parent, wxWindowID winid, int range,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 long style = wxGA_HORIZONTAL,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxGaugeNameStr);
47 virtual ~wxGauge();
48
49 // ------------------------------------------------------------------------
50 // Cocoa callbacks
51 // ------------------------------------------------------------------------
52 public:
53 inline WX_NSProgressIndicator GetNSProgressIndicator() const { return (WX_NSProgressIndicator)m_cocoaNSView; }
54 protected:
55 // NSProgressIndicator cannot be enabled/disabled
56 virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { }
57 // ------------------------------------------------------------------------
58 // Implementation
59 // ------------------------------------------------------------------------
60 public:
61 // Pure Virtuals
62 virtual int GetValue() const;
63 virtual void SetValue(int value);
64
65 // retrieve/change the range
66 virtual void SetRange(int maxValue);
67 int GetRange(void) const;
68 protected:
69 virtual wxSize DoGetBestSize() const;
70 };
71
72 #endif
73 // __WX_COCOA_GAUGE_H__