]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/slider.mm
allow to change the event propagation level (modified patch 743086)
[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;
32 SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
33 [m_cocoaNSView release];
34 if(m_parent)
35 m_parent->CocoaAddChild(this);
36 return true;
37}
38
39wxSlider::~wxSlider()
40{
2ec55dc0
DE
41}
42
ef3e4a2c 43#endif // wxUSE_SLIDER