]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/slider.mm
cast fix, workaround for pickeir compilers
[wxWidgets.git] / src / cocoa / slider.mm
CommitLineData
2ec55dc0
DE
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
065e208e 9// Licence: wxWidgets licence
2ec55dc0
DE
10/////////////////////////////////////////////////////////////////////////////
11
449c5673 12#include "wx/wxprec.h"
ef3e4a2c
DE
13#if wxUSE_SLIDER
14
449c5673
DE
15#ifndef WX_PRECOMP
16 #include "wx/app.h"
17 #include "wx/slider.h"
18#endif //WX_PRECOMP
2ec55dc0 19
7e41e564 20#import <AppKit/NSSlider.h>
2ec55dc0
DE
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;
7e41e564 34 SetNSView([[NSSlider alloc] initWithFrame: MakeDefaultNSRect(size)]);
2ec55dc0
DE
35 [m_cocoaNSView release];
36 if(m_parent)
37 m_parent->CocoaAddChild(this);
8d656ea9
DE
38 SetInitialFrameRect(pos,size);
39
2ec55dc0
DE
40 return true;
41}
42
43wxSlider::~wxSlider()
44{
2ec55dc0
DE
45}
46
ef3e4a2c 47#endif // wxUSE_SLIDER