Use NSBox with the NSBoxSeparator box type
[wxWidgets.git] / src / cocoa / statline2.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        cocoa/statline.mm
3 // Purpose:     wxStaticLine
4 // Author:      David Elliott
5 // Modified by:
6 // Created:     2003/02/15
7 // RCS-ID:      $Id: 
8 // Copyright:   (c) 2003 David Elliott
9 // Licence:     wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/app.h"
13 #include "wx/statline.h"
14
15 #import <AppKit/NSBox.h>
16
17 IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
18 BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase)
19 END_EVENT_TABLE()
20 // WX_IMPLEMENT_COCOA_OWNER(wxStaticLine,NSTextField,NSControl,NSView)
21
22 bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid,
23            const wxPoint& pos,
24            const wxSize& size,
25            long style,
26            const wxString& name)
27 {
28     if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
29         return false;
30     SetNSView([[NSBox alloc] initWithFrame: MakeDefaultNSRect(size)]);
31     [m_cocoaNSView release];
32     [(NSBox*)m_cocoaNSView setBoxType: NSBoxSeparator];
33     if(m_parent)
34         m_parent->CocoaAddChild(this);
35     SetInitialFrameRect(pos,size);
36
37     return true;
38 }
39
40 wxStaticLine::~wxStaticLine()
41 {
42 }
43