]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/gauge.mm
* Use wxTopLevelWindow::Show() for modeless dialogs
[wxWidgets.git] / src / cocoa / gauge.mm
CommitLineData
24e97652
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: cocoa/gauge.mm
3// Purpose: wxGauge
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#include "wx/setup.h"
13#if wxUSE_GAUGE
14
15#include "wx/app.h"
16#include "wx/gauge.h"
17
18#import <AppKit/NSProgressIndicator.h>
19
20IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
21BEGIN_EVENT_TABLE(wxGauge, wxGaugeBase)
22END_EVENT_TABLE()
23// WX_IMPLEMENT_COCOA_OWNER(wxGauge,NSProgressIndicator,NSView,NSView)
24
25bool wxGauge::Create(wxWindow *parent, wxWindowID winid, int range,
26 const wxPoint& pos, const wxSize& size, long style,
27 const wxValidator& validator, const wxString& name)
28{
29 if(!CreateControl(parent,winid,pos,size,style,validator,name))
30 return false;
8d656ea9 31 SetNSView([[NSProgressIndicator alloc] initWithFrame: MakeDefaultNSRect(size)]);
24e97652
DE
32 [m_cocoaNSView release];
33 if(m_parent)
34 m_parent->CocoaAddChild(this);
8d656ea9
DE
35 SetInitialFrameRect(pos,size);
36
24e97652
DE
37 return true;
38}
39
40wxGauge::~wxGauge()
41{
42}
43
44#endif // wxUSE_GAUGE