]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/slider.mm
return the index of the inserted/appended item
[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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
e7f11f60 12#include "wx/setup.h"
ef3e4a2c
DE
13#if wxUSE_SLIDER
14
2ec55dc0 15#include "wx/app.h"
bfddb923 16#include "wx/slider.h"
2ec55dc0
DE
17
18#import <AppKit/NSView.h>
19
20IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
21BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
22END_EVENT_TABLE()
23// WX_IMPLEMENT_COCOA_OWNER(wxSlider,NSSlider,NSControl,NSView)
24
25bool wxSlider::Create(wxWindow *parent, wxWindowID winid,
26 int value, int minValue, int maxValue,
27 const wxPoint& pos, const wxSize& size, long style,
28 const wxValidator& validator, const wxString& name)
29{
30 if(!CreateControl(parent,winid,pos,size,style,validator,name))
31 return false;
8d656ea9 32 SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
2ec55dc0
DE
33 [m_cocoaNSView release];
34 if(m_parent)
35 m_parent->CocoaAddChild(this);
8d656ea9
DE
36 SetInitialFrameRect(pos,size);
37
2ec55dc0
DE
38 return true;
39}
40
41wxSlider::~wxSlider()
42{
2ec55dc0
DE
43}
44
ef3e4a2c 45#endif // wxUSE_SLIDER