]> git.saurik.com Git - wxWidgets.git/blob - src/cocoa/statline2.mm
Make GTK callbacks passed to GTKConnectWidget() extern "C".
[wxWidgets.git] / src / cocoa / statline2.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/cocoa/statline2.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 licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/wxprec.h"
13 #ifndef WX_PRECOMP
14 #include "wx/app.h"
15 #endif //WX_PRECOMP
16 #include "wx/statline.h"
17
18 #include "wx/cocoa/autorelease.h"
19
20 #import <AppKit/NSBox.h>
21
22 BEGIN_EVENT_TABLE(wxStaticLine, wxStaticLineBase)
23 END_EVENT_TABLE()
24 // WX_IMPLEMENT_COCOA_OWNER(wxStaticLine,NSTextField,NSControl,NSView)
25
26 bool wxStaticLine::Create(wxWindow *parent, wxWindowID winid,
27 const wxPoint& pos,
28 const wxSize& size,
29 long style,
30 const wxString& name)
31 {
32 wxAutoNSAutoreleasePool pool;
33 if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name))
34 return false;
35 SetNSView([[NSBox alloc] initWithFrame: MakeDefaultNSRect(size)]);
36 [m_cocoaNSView release];
37 [(NSBox*)m_cocoaNSView setBoxType: NSBoxSeparator];
38 if(m_parent)
39 m_parent->CocoaAddChild(this);
40 SetInitialFrameRect(pos,size);
41
42 return true;
43 }
44
45 wxStaticLine::~wxStaticLine()
46 {
47 }
48