]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/cocoa/slider.mm
Backed-out PNG8 patch (no time to look at why
[wxWidgets.git] / src / cocoa / slider.mm
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: cocoa/slider.mm
3// Purpose: wxSlider
4// Author: David Elliott
5// Modified by:
6// Created: 2003/06/19
7// RCS-ID: $Id$
8// Copyright: (c) 2003 David Elliott
9// Licence: wxWidgets licence
10/////////////////////////////////////////////////////////////////////////////
11
12#include "wx/wxprec.h"
13#if wxUSE_SLIDER
14
15#ifndef WX_PRECOMP
16 #include "wx/app.h"
17 #include "wx/slider.h"
18#endif //WX_PRECOMP
19
20#import <AppKit/NSSlider.h>
21
22IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
23BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
24END_EVENT_TABLE()
25// WX_IMPLEMENT_COCOA_OWNER(wxSlider,NSSlider,NSControl,NSView)
26
27bool wxSlider::Create(wxWindow *parent, wxWindowID winid,
28 int value, int minValue, int maxValue,
29 const wxPoint& pos, const wxSize& size, long style,
30 const wxValidator& validator, const wxString& name)
31{
32 if(!CreateControl(parent,winid,pos,size,style,validator,name))
33 return false;
34 SetNSView([[NSSlider alloc] initWithFrame: MakeDefaultNSRect(size)]);
35 [m_cocoaNSView release];
36 if(m_parent)
37 m_parent->CocoaAddChild(this);
38 SetInitialFrameRect(pos,size);
39
40 return true;
41}
42
43wxSlider::~wxSlider()
44{
45}
46
47#endif // wxUSE_SLIDER