]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/cocoa/gauge.h
no changes, just remove #if'd out code
[wxWidgets.git] / include / wx / cocoa / gauge.h
... / ...
CommitLineData
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
17DECLARE_WXCOCOA_OBJC_CLASS(NSProgressIndicator);
18
19// ========================================================================
20// wxGauge
21// ========================================================================
22class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase// , protected wxCocoaNSProgressIndicator
23{
24 DECLARE_DYNAMIC_CLASS(wxGauge)
25 DECLARE_EVENT_TABLE()
26// WX_DECLARE_COCOA_OWNER(NSProgressIndicator,NSView,NSView)
27// ------------------------------------------------------------------------
28// initialization
29// ------------------------------------------------------------------------
30public:
31 wxGauge() { }
32 wxGauge(wxWindow *parent, wxWindowID winid, int range,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
35 long style = wxGA_HORIZONTAL,
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxGaugeNameStr)
38 {
39 Create(parent, winid, range, pos, size, style, validator, name);
40 }
41
42 bool Create(wxWindow *parent, wxWindowID winid, int range,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = wxGA_HORIZONTAL,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxGaugeNameStr);
48 virtual ~wxGauge();
49
50// ------------------------------------------------------------------------
51// Cocoa callbacks
52// ------------------------------------------------------------------------
53public:
54 inline WX_NSProgressIndicator GetNSProgressIndicator() const { return (WX_NSProgressIndicator)m_cocoaNSView; }
55protected:
56 // NSProgressIndicator cannot be enabled/disabled
57 virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { }
58// ------------------------------------------------------------------------
59// Implementation
60// ------------------------------------------------------------------------
61public:
62 // Pure Virtuals
63 virtual int GetValue() const;
64 virtual void SetValue(int value);
65
66 // retrieve/change the range
67 virtual void SetRange(int maxValue);
68 int GetRange(void) const;
69protected:
70 virtual wxSize DoGetBestSize() const;
71};
72
73#endif
74 // __WX_COCOA_GAUGE_H__