1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/gauge.mm
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
20 #import <AppKit/NSProgressIndicator.h>
22 IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
23 BEGIN_EVENT_TABLE(wxGauge, wxGaugeBase)
25 // WX_IMPLEMENT_COCOA_OWNER(wxGauge,NSProgressIndicator,NSView,NSView)
27 bool wxGauge::Create(wxWindow *parent, wxWindowID winid, int range,
28 const wxPoint& pos, const wxSize& size, long style,
29 const wxValidator& validator, const wxString& name)
31 if(!CreateControl(parent,winid,pos,size,style,validator,name))
33 SetNSView([[NSProgressIndicator alloc] initWithFrame: MakeDefaultNSRect(size)]);
34 [m_cocoaNSView release];
36 m_parent->CocoaAddChild(this);
37 SetInitialFrameRect(pos,size);