1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cocoa/statline.mm
3 // Purpose: wxStaticLine
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
16 #include "wx/statline.h"
18 #include "wx/cocoa/autorelease.h"
20 #import <AppKit/NSBox.h>
22 IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
23 BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase)
25 // WX_IMPLEMENT_COCOA_OWNER(wxStaticLine,NSTextField,NSControl,NSView)
27 bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid,
33 wxAutoNSAutoreleasePool pool;
34 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
36 SetNSView([[NSBox alloc] initWithFrame: MakeDefaultNSRect(size)]);
37 [m_cocoaNSView release];
38 [(NSBox*)m_cocoaNSView setBoxType: NSBoxSeparator];
40 m_parent->CocoaAddChild(this);
41 SetInitialFrameRect(pos,size);
46 wxStaticLine::~wxStaticLine()