1
/////////////////////////////////////////////////////////////////////////////
2
// Name: wx/cocoa/gauge.h
3
// Purpose: wxGauge class
4
// Author: David Elliott
7
// Copyright: (c) 2003 David Elliott
8
// Licence: wxWindows licence
9
/////////////////////////////////////////////////////////////////////////////
11
#ifndef __WX_COCOA_GAUGE_H__
12
#define __WX_COCOA_GAUGE_H__
14
// #include "wx/cocoa/NSProgressIndicator.h"
16
DECLARE_WXCOCOA_OBJC_CLASS(NSProgressIndicator);
18
// ========================================================================
20
// ========================================================================
21
class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase// , protected wxCocoaNSProgressIndicator
23
DECLARE_DYNAMIC_CLASS(wxGauge)
25
// WX_DECLARE_COCOA_OWNER(NSProgressIndicator,NSView,NSView)
26
// ------------------------------------------------------------------------
28
// ------------------------------------------------------------------------
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)
38
Create(parent, winid, range, pos, size, style, validator, name);
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);
49
// ------------------------------------------------------------------------
51
// ------------------------------------------------------------------------
53
inline WX_NSProgressIndicator GetNSProgressIndicator() const { return (WX_NSProgressIndicator)m_cocoaNSView; }
55
// NSProgressIndicator cannot be enabled/disabled
56
virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { }
57
// ------------------------------------------------------------------------
59
// ------------------------------------------------------------------------
62
virtual int GetValue() const;
63
virtual void SetValue(int value);
65
// retrieve/change the range
66
virtual void SetRange(int maxValue);
67
int GetRange(void) const;
69
virtual wxSize DoGetBestSize() const;
73
// __WX_COCOA_GAUGE_H__