]> git.saurik.com Git - wxWidgets.git/blame - src/cocoa/slider.mm
update button style to include BS_MULTILINE when a multiline label is set
[wxWidgets.git] / src / cocoa / slider.mm
CommitLineData
2ec55dc0 1/////////////////////////////////////////////////////////////////////////////
f4da9a94 2// Name: src/cocoa/slider.mm
2ec55dc0
DE
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
f4da9a94 9// Licence: wxWidgets licence
2ec55dc0
DE
10/////////////////////////////////////////////////////////////////////////////
11
449c5673 12#include "wx/wxprec.h"
f4da9a94 13
ef3e4a2c
DE
14#if wxUSE_SLIDER
15
f4da9a94
WS
16#include "wx/slider.h"
17
449c5673
DE
18#ifndef WX_PRECOMP
19 #include "wx/app.h"
449c5673 20#endif //WX_PRECOMP
2ec55dc0 21
7e41e564 22#import <AppKit/NSSlider.h>
2ec55dc0
DE
23
24IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
f4da9a94 25 BEGIN_EVENT_TABLE(wxSlider, wxSliderBase)
2ec55dc0
DE
26END_EVENT_TABLE()
27// WX_IMPLEMENT_COCOA_OWNER(wxSlider,NSSlider,NSControl,NSView)
28
29bool wxSlider::Create(wxWindow *parent, wxWindowID winid,
30 int value, int minValue, int maxValue,
31 const wxPoint& pos, const wxSize& size, long style,
32 const wxValidator& validator, const wxString& name)
33{
34 if(!CreateControl(parent,winid,pos,size,style,validator,name))
35 return false;
7e41e564 36 SetNSView([[NSSlider alloc] initWithFrame: MakeDefaultNSRect(size)]);
2ec55dc0
DE
37 [m_cocoaNSView release];
38 if(m_parent)
39 m_parent->CocoaAddChild(this);
8d656ea9
DE
40 SetInitialFrameRect(pos,size);
41
2ec55dc0
DE
42 return true;
43}
44
45wxSlider::~wxSlider()
46{
2ec55dc0
DE
47}
48
ef3e4a2c 49#endif // wxUSE_SLIDER