]> git.saurik.com Git - wxWidgets.git/blob - src/cocoa/statline2.mm
Small fixes
[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/NSView.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([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
31 [m_cocoaNSView release];
32 if(m_parent)
33 m_parent->CocoaAddChild(this);
34 return true;
35 }
36
37 wxStaticLine::~wxStaticLine()
38 {
39 CocoaRemoveFromParent();
40 SetNSView(NULL);
41 }
42