]>
Commit | Line | Data |
---|---|---|
24e97652 DE |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/cocoa/gauge.h | |
3 | // Purpose: wxGauge class | |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2003/07/15 | |
24e97652 | 7 | // Copyright: (c) 2003 David Elliott |
1b88201f | 8 | // Licence: wxWindows licence |
24e97652 DE |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef __WX_COCOA_GAUGE_H__ | |
12 | #define __WX_COCOA_GAUGE_H__ | |
13 | ||
14 | // #include "wx/cocoa/NSProgressIndicator.h" | |
15 | ||
15bc1a64 DE |
16 | DECLARE_WXCOCOA_OBJC_CLASS(NSProgressIndicator); |
17 | ||
24e97652 DE |
18 | // ======================================================================== |
19 | // wxGauge | |
20 | // ======================================================================== | |
53a2db12 | 21 | class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase// , protected wxCocoaNSProgressIndicator |
24e97652 DE |
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, | |
4930046b | 44 | long style = wxGA_HORIZONTAL, |
24e97652 DE |
45 | const wxValidator& validator = wxDefaultValidator, |
46 | const wxString& name = wxGaugeNameStr); | |
47 | virtual ~wxGauge(); | |
48 | ||
49 | // ------------------------------------------------------------------------ | |
50 | // Cocoa callbacks | |
51 | // ------------------------------------------------------------------------ | |
15bc1a64 DE |
52 | public: |
53 | inline WX_NSProgressIndicator GetNSProgressIndicator() const { return (WX_NSProgressIndicator)m_cocoaNSView; } | |
24e97652 | 54 | protected: |
faad1887 | 55 | // NSProgressIndicator cannot be enabled/disabled |
2d80da5f | 56 | virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { } |
24e97652 DE |
57 | // ------------------------------------------------------------------------ |
58 | // Implementation | |
59 | // ------------------------------------------------------------------------ | |
60 | public: | |
61 | // Pure Virtuals | |
363f7de0 DE |
62 | virtual int GetValue() const; |
63 | virtual void SetValue(int value); | |
24e97652 DE |
64 | |
65 | // retrieve/change the range | |
363f7de0 DE |
66 | virtual void SetRange(int maxValue); |
67 | int GetRange(void) const; | |
15bc1a64 DE |
68 | protected: |
69 | virtual wxSize DoGetBestSize() const; | |
24e97652 DE |
70 | }; |
71 | ||
1b88201f WS |
72 | #endif |
73 | // __WX_COCOA_GAUGE_H__ |